Changeset View
Changeset View
Standalone View
Standalone View
kcms/cursortheme/kcmcursortheme.h
Show First 20 Lines • Show All 100 Lines • ▼ Show 20 Line(s) | 100 | /** Updates the size combo box. It loads the size list of the selected cursor | |||
---|---|---|---|---|---|
101 | theme with the corresponding icons and chooses an appropriate entry. It | 101 | theme with the corresponding icons and chooses an appropriate entry. It | ||
102 | enables the combo box and the label if the theme provides more than one | 102 | enables the combo box and the label if the theme provides more than one | ||
103 | size, otherwise it disables it. If the size setting is looked in kiosk | 103 | size, otherwise it disables it. If the size setting is looked in kiosk | ||
104 | mode, it stays always disabled. */ | 104 | mode, it stays always disabled. */ | ||
105 | void updateSizeComboBox(); | 105 | void updateSizeComboBox(); | ||
106 | 106 | | |||
107 | 107 | | |||
108 | private: | 108 | private: | ||
109 | QModelIndex selectedIndex() const; | 109 | QModelIndex themeSelectedIndex() const; | ||
110 | void installThemeFile(const QString &path); | 110 | void installThemeFile(const QString &path); | ||
111 | /** Applies a given theme, using XFixes, XCursor and KGlobalSettings. | 111 | /** Applies a given theme, using XFixes, XCursor and KGlobalSettings. | ||
112 | @param theme The cursor theme to be applied. It is save to pass 0 here | 112 | @param theme The cursor theme to be applied. It is save to pass 0 here | ||
113 | (will result in \e false as return value). | 113 | (will result in \e false as return value). | ||
114 | @param size The size hint that is used to select the cursor size. | 114 | @param size The size hint that is used to select the cursor size. | ||
115 | @returns If the changes could be applied. Will return \e false if \e theme is | 115 | @returns If the changes could be applied. Will return \e false if \e theme is | ||
116 | 0 or if the XFixes and XCursor libraries aren't available in the required | 116 | 0 or if the XFixes and XCursor libraries aren't available in the required | ||
117 | version, otherwise returns \e true. */ | 117 | version, otherwise returns \e true. */ | ||
118 | bool applyTheme(const CursorTheme *theme, const int size); | 118 | bool applyTheme(const CursorTheme *theme, const int size); | ||
119 | bool iconsIsWritable() const; | 119 | bool iconsIsWritable() const; | ||
120 | 120 | | |||
121 | 121 | | |||
122 | CursorThemeModel *m_model; | 122 | CursorThemeModel *m_themeModel; | ||
123 | SortProxyModel *m_proxyModel; | 123 | SortProxyModel *m_themeProxyModel; | ||
124 | QStandardItemModel *m_sizesModel; | 124 | QStandardItemModel *m_sizesModel; | ||
125 | CursorThemeSettings *m_settings; | 125 | CursorThemeSettings *m_settings; | ||
126 | 126 | | |||
127 | int m_appliedSize; | 127 | int m_appliedSize; | ||
128 | // This index refers to the CursorThemeModel, not the proxy or the view | 128 | // This index refers to the CursorThemeModel, not the proxy or the view | ||
129 | QPersistentModelIndex m_appliedIndex; | 129 | QPersistentModelIndex m_appliedIndex; | ||
130 | 130 | | |||
131 | /** Holds the last size that was chosen by the user. Example: The user chooses | 131 | /** Holds the last size that was chosen by the user. Example: The user chooses | ||
Show All 21 Lines |