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 NOTIFY orcaLaunchFeedbackChanged) | ||||
broulik: You're not writing to this from QML, doesn't need a `WRITE` accessor | |||||
42 | | ||||
broulik: Where is this being used? | |||||
tcanabrava: It was used in the old code, I forgot to add in the Ui. | |||||
43 | // Not used at the moment, but has example strings. I need to discover where to put this in the UI. | ||||
44 | Q_PROPERTY(QString desktopShortcutInfo MEMBER m_desktopShortcutInfo CONSTANT) | ||||
32 | 45 | | |||
33 | public: | 46 | public: | ||
34 | 47 | | |||
35 | KAccessConfig(QWidget *parent, const QVariantList&); | 48 | KAccessConfig(QObject *parent, const QVariantList&); | ||
36 | ~KAccessConfig() override; | 49 | ~KAccessConfig() override; | ||
37 | 50 | | |||
38 | void load() override; | | |||
39 | void save() override; | 51 | void save() override; | ||
40 | void defaults() override; | | |||
41 | 52 | | |||
42 | protected Q_SLOTS: | 53 | Q_INVOKABLE void configureKNotify(QQuickItem *parent); | ||
54 | Q_INVOKABLE void launchOrcaConfiguration(); | ||||
55 | Q_INVOKABLE bool orcaInstalled(); | ||||
43 | 56 | | |||
44 | void configChanged(); | 57 | QString orcaLaunchFeedback() const; | ||
broulik: We typically use `Q_INVOKABLE` for methods exported to QML | |||||
45 | void checkAccess(); | 58 | | ||
46 | void invertClicked(); | 59 | Q_SIGNALS: | ||
47 | void flashClicked(); | 60 | void orcaLaunchFeedbackChanged(); | ||
48 | void selectSound(); | | |||
49 | void changeFlashScreenColor(); | | |||
50 | void configureKNotify(); | | |||
51 | void launchOrcaConfiguration(); | | |||
52 | 61 | | |||
broulik: Make this `private` and no slot | |||||
53 | private: | 62 | private: | ||
54 | Ui::access ui; | 63 | void setOrcaLaunchFeedback(const QString& value); | ||
64 | | ||||
65 | MouseSettings *m_mouseSettings; | ||||
66 | BellSettings *m_bellSettings; | ||||
67 | KeyboardSettings *m_keyboardSettings; | ||||
68 | ScreenReaderSettings *m_screenReaderSettings; | ||||
69 | QString m_orcaLaunchFeedback; | ||||
70 | QString m_desktopShortcutInfo; | ||||
71 | bool m_screenReaderInstalled; | ||||
55 | }; | 72 | }; | ||
56 | 73 | | |||
57 | 74 | | |||
58 | #endif | 75 | #endif |
You're not writing to this from QML, doesn't need a WRITE accessor