Changeset View
Changeset View
Standalone View
Standalone View
kcms/access/kcmaccess.h
Show All 16 Lines | 1 | /* | |||
---|---|---|---|---|---|
17 | 17 | | |||
18 | You should have received a copy of the GNU Lesser General Public | 18 | You should have received a copy of the GNU Lesser General Public | ||
19 | License along with this library. If not, see <http://www.gnu.org/licenses/>. | 19 | License along with this library. If not, see <http://www.gnu.org/licenses/>. | ||
20 | */ | 20 | */ | ||
21 | 21 | | |||
22 | #ifndef __kcmaccess_h__ | 22 | #ifndef __kcmaccess_h__ | ||
23 | #define __kcmaccess_h__ | 23 | #define __kcmaccess_h__ | ||
24 | 24 | | |||
25 | #include <KQuickAddons/ManagedConfigModule> | ||||
26 | #include <QString> | ||||
27 | #include <QColor> | ||||
28 | | ||||
29 | class MouseSettings; | ||||
30 | class BellSettings; | ||||
31 | class KeyboardSettings; | ||||
32 | class ScreenReaderSettings; | ||||
25 | 33 | | |||
26 | #include <kcmodule.h> | 34 | class KAccessConfig : public KQuickAddons::ManagedConfigModule | ||
27 | #include "ui_accessibility.h" | | |||
28 | | ||||
29 | class KAccessConfig : public KCModule | | |||
30 | { | 35 | { | ||
31 | Q_OBJECT | 36 | Q_OBJECT | ||
37 | Q_PROPERTY(MouseSettings *mouseSettings MEMBER m_mouseSettings CONSTANT) | ||||
38 | Q_PROPERTY(BellSettings *bellSettings MEMBER m_bellSettings CONSTANT) | ||||
39 | Q_PROPERTY(KeyboardSettings *keyboardSettings MEMBER m_keyboardSettings CONSTANT) | ||||
40 | Q_PROPERTY(ScreenReaderSettings *screenReaderSettings MEMBER m_screenReaderSettings CONSTANT) | ||||
41 | Q_PROPERTY(QString orcaLaunchFeedback READ orcaLaunchFeedback WRITE setOrcaLaunchFeedback NOTIFY orcaLaunchFeedbackChanged) | ||||
broulik: You're not writing to this from QML, doesn't need a `WRITE` accessor | |||||
42 | Q_PROPERTY(QString desktopShortcutInfo MEMBER m_desktopShortcutInfo CONSTANT) | ||||
broulik: Where is this being used? | |||||
tcanabrava: It was used in the old code, I forgot to add in the Ui. | |||||
32 | 43 | | |||
33 | public: | 44 | public: | ||
34 | 45 | | |||
35 | KAccessConfig(QWidget *parent, const QVariantList&); | 46 | KAccessConfig(QObject *parent, const QVariantList&); | ||
36 | ~KAccessConfig() override; | 47 | ~KAccessConfig() override; | ||
37 | 48 | | |||
38 | void load() override; | | |||
39 | void save() override; | 49 | void save() override; | ||
40 | void defaults() override; | | |||
41 | 50 | | |||
42 | protected Q_SLOTS: | 51 | Q_SCRIPTABLE void configureKNotify(); | ||
52 | Q_SCRIPTABLE void launchOrcaConfiguration(); | ||||
broulik: We typically use `Q_INVOKABLE` for methods exported to QML | |||||
53 | | ||||
54 | QString orcaLaunchFeedback() const; | ||||
55 | public Q_SLOTS: | ||||
56 | void setOrcaLaunchFeedback(const QString& value); | ||||
broulik: Make this `private` and no slot | |||||
43 | 57 | | |||
44 | void configChanged(); | 58 | Q_SIGNALS: | ||
45 | void checkAccess(); | 59 | void orcaLaunchFeedbackChanged(); | ||
46 | void invertClicked(); | | |||
47 | void flashClicked(); | | |||
48 | void selectSound(); | | |||
49 | void changeFlashScreenColor(); | | |||
50 | void configureKNotify(); | | |||
51 | void launchOrcaConfiguration(); | | |||
52 | 60 | | |||
53 | private: | 61 | private: | ||
54 | Ui::access ui; | 62 | MouseSettings *m_mouseSettings; | ||
63 | BellSettings *m_bellSettings; | ||||
64 | KeyboardSettings *m_keyboardSettings; | ||||
65 | ScreenReaderSettings *m_screenReaderSettings; | ||||
66 | QString m_orcaLaunchFeedback; | ||||
67 | QString m_desktopShortcutInfo; | ||||
55 | }; | 68 | }; | ||
56 | 69 | | |||
57 | 70 | | |||
58 | #endif | 71 | #endif |
You're not writing to this from QML, doesn't need a WRITE accessor