Changeset View
Changeset View
Standalone View
Standalone View
kcmkwin/kwindecoration/kcm.h
Show First 20 Lines • Show All 51 Lines • ▼ Show 20 Line(s) | 50 | { | |||
---|---|---|---|---|---|
52 | Q_PROPERTY(QSortFilterProxyModel *themesModel READ themesModel CONSTANT) | 52 | Q_PROPERTY(QSortFilterProxyModel *themesModel READ themesModel CONSTANT) | ||
53 | Q_PROPERTY(QStringList borderSizesModel READ borderSizesModel CONSTANT) | 53 | Q_PROPERTY(QStringList borderSizesModel READ borderSizesModel CONSTANT) | ||
54 | Q_PROPERTY(int borderSize READ borderSize WRITE setBorderSize NOTIFY borderSizeChanged) | 54 | Q_PROPERTY(int borderSize READ borderSize WRITE setBorderSize NOTIFY borderSizeChanged) | ||
55 | Q_PROPERTY(int theme READ theme WRITE setTheme NOTIFY themeChanged) | 55 | Q_PROPERTY(int theme READ theme WRITE setTheme NOTIFY themeChanged) | ||
56 | Q_PROPERTY(QAbstractListModel *leftButtonsModel READ leftButtonsModel NOTIFY buttonsChanged) | 56 | Q_PROPERTY(QAbstractListModel *leftButtonsModel READ leftButtonsModel NOTIFY buttonsChanged) | ||
57 | Q_PROPERTY(QAbstractListModel *rightButtonsModel READ rightButtonsModel NOTIFY buttonsChanged) | 57 | Q_PROPERTY(QAbstractListModel *rightButtonsModel READ rightButtonsModel NOTIFY buttonsChanged) | ||
58 | Q_PROPERTY(QAbstractListModel *availableButtonsModel READ availableButtonsModel CONSTANT) | 58 | Q_PROPERTY(QAbstractListModel *availableButtonsModel READ availableButtonsModel CONSTANT) | ||
59 | Q_PROPERTY(bool closeOnDoubleClickOnMenu READ closeOnDoubleClickOnMenu WRITE setCloseOnDoubleClickOnMenu NOTIFY closeOnDoubleClickOnMenuChanged) | 59 | Q_PROPERTY(bool closeOnDoubleClickOnMenu READ closeOnDoubleClickOnMenu WRITE setCloseOnDoubleClickOnMenu NOTIFY closeOnDoubleClickOnMenuChanged) | ||
60 | Q_PROPERTY(bool showToolTips READ showToolTips WRITE setShowToolTips NOTIFY showToolTipsChanged) | ||||
60 | 61 | | |||
61 | public: | 62 | public: | ||
62 | KCMKWinDecoration(QObject *parent, const QVariantList &arguments); | 63 | KCMKWinDecoration(QObject *parent, const QVariantList &arguments); | ||
63 | 64 | | |||
64 | QSortFilterProxyModel *themesModel() const; | 65 | QSortFilterProxyModel *themesModel() const; | ||
65 | QAbstractListModel *leftButtonsModel(); | 66 | QAbstractListModel *leftButtonsModel(); | ||
66 | QAbstractListModel *rightButtonsModel(); | 67 | QAbstractListModel *rightButtonsModel(); | ||
67 | QAbstractListModel *availableButtonsModel() const; | 68 | QAbstractListModel *availableButtonsModel() const; | ||
68 | QStringList borderSizesModel() const; | 69 | QStringList borderSizesModel() const; | ||
69 | int borderSize() const; | 70 | int borderSize() const; | ||
70 | int theme() const; | 71 | int theme() const; | ||
71 | bool closeOnDoubleClickOnMenu() const; | 72 | bool closeOnDoubleClickOnMenu() const; | ||
73 | bool showToolTips() const; | ||||
72 | 74 | | |||
73 | void setBorderSize(int index); | 75 | void setBorderSize(int index); | ||
74 | void setBorderSize(KDecoration2::BorderSize size); | 76 | void setBorderSize(KDecoration2::BorderSize size); | ||
75 | void setTheme(int index); | 77 | void setTheme(int index); | ||
76 | void setCloseOnDoubleClickOnMenu(bool enable); | 78 | void setCloseOnDoubleClickOnMenu(bool enable); | ||
79 | void setShowToolTips(bool show); | ||||
77 | 80 | | |||
78 | Q_INVOKABLE void getNewStuff(QQuickItem *context); | 81 | Q_INVOKABLE void getNewStuff(QQuickItem *context); | ||
79 | 82 | | |||
80 | Q_SIGNALS: | 83 | Q_SIGNALS: | ||
81 | void themeChanged(); | 84 | void themeChanged(); | ||
82 | void buttonsChanged(); | 85 | void buttonsChanged(); | ||
83 | void borderSizeChanged(); | 86 | void borderSizeChanged(); | ||
84 | void closeOnDoubleClickOnMenuChanged(); | 87 | void closeOnDoubleClickOnMenuChanged(); | ||
88 | void showToolTipsChanged(); | ||||
85 | 89 | | |||
86 | public Q_SLOTS: | 90 | public Q_SLOTS: | ||
87 | void load() override; | 91 | void load() override; | ||
88 | void save() override; | 92 | void save() override; | ||
89 | void defaults() override; | 93 | void defaults() override; | ||
90 | 94 | | |||
91 | private Q_SLOTS: | 95 | private Q_SLOTS: | ||
92 | void updateNeedsSave(); | 96 | void updateNeedsSave(); | ||
Show All 9 Lines | 99 | private: | |||
102 | 106 | | |||
103 | QPointer<KNS3::DownloadDialog> m_newStuffDialog; | 107 | QPointer<KNS3::DownloadDialog> m_newStuffDialog; | ||
104 | 108 | | |||
105 | struct Settings | 109 | struct Settings | ||
106 | { | 110 | { | ||
107 | KDecoration2::BorderSize borderSize; | 111 | KDecoration2::BorderSize borderSize; | ||
108 | int themeIndex; | 112 | int themeIndex; | ||
109 | bool closeOnDoubleClickOnMenu; | 113 | bool closeOnDoubleClickOnMenu; | ||
114 | bool showToolTips; | ||||
110 | DecorationButtonsList buttonsOnLeft; | 115 | DecorationButtonsList buttonsOnLeft; | ||
111 | DecorationButtonsList buttonsOnRight; | 116 | DecorationButtonsList buttonsOnRight; | ||
112 | }; | 117 | }; | ||
113 | 118 | | |||
114 | Settings m_savedSettings; | 119 | Settings m_savedSettings; | ||
115 | Settings m_currentSettings; | 120 | Settings m_currentSettings; | ||
116 | }; | 121 | }; |