Sonnet

configwidget.h
1 /*
2  *
3  * SPDX-FileCopyrightText: 2004 Zack Rusin <[email protected]>
4  *
5  * SPDX-License-Identifier: LGPL-2.1-or-later
6  */
7 #ifndef SONNET_CONFIGWIDGET_H
8 #define SONNET_CONFIGWIDGET_H
9 
10 #include <QWidget>
11 class ConfigWidgetPrivate;
12 #include "sonnetui_export.h"
13 
14 namespace Sonnet
15 {
16 /// The sonnet ConfigWidget
17 class SONNETUI_EXPORT ConfigWidget : public QWidget
18 {
19  Q_OBJECT
20 public:
21  explicit ConfigWidget(QWidget *parent);
22  ~ConfigWidget() override;
23 
24  bool backgroundCheckingButtonShown() const;
25 
26  /**
27  * Sets the language/dictionary that will be selected by default
28  * in this config widget.
29  * This overrides the setting in the config file.
30  *
31  * @param language the language which will be selected by default.
32  * @since 4.1
33  */
34  void setLanguage(const QString &language);
35 
36  /**
37  * Get the currently selected language for spell checking. Returns an empty string if
38  * Sonnet was built without any spellchecking plugins.
39  * @return the language currently selected in the language combobox
40  * @since 4.1
41  */
42  QString language() const;
43 
44 public Q_SLOTS:
45  void save();
46  void setBackgroundCheckingButtonShown(bool);
47  void slotDefault();
48 protected Q_SLOTS:
49  void slotIgnoreWordRemoved();
50  void slotIgnoreWordAdded();
51 private Q_SLOTS:
52  SONNETUI_NO_EXPORT void slotUpdateButton(const QString &text);
53  SONNETUI_NO_EXPORT void slotSelectionChanged();
54 
55 Q_SIGNALS:
56  /**
57  * Signal sends when config was changed
58  * @since 4.1
59  */
60  void configChanged();
61 
62 private:
63  SONNETUI_NO_EXPORT void setFromGui();
64 
65 private:
66  ConfigWidgetPrivate *const d;
67 };
68 }
69 
70 #endif
The sonnet ConfigWidget.
Definition: configwidget.h:17
The sonnet namespace.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Dec 7 2023 04:06:35 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.