Changeset View
Changeset View
Standalone View
Standalone View
src/kcolorschememanager.h
Show First 20 Lines • Show All 100 Lines • ▼ Show 20 Line(s) | 67 | public: | |||
---|---|---|---|---|---|
101 | * @param parent The parent of the KActionMenu | 101 | * @param parent The parent of the KActionMenu | ||
102 | * @return KActionMenu populated with all available color schemes. | 102 | * @return KActionMenu populated with all available color schemes. | ||
103 | * @see activateScheme | 103 | * @see activateScheme | ||
104 | */ | 104 | */ | ||
105 | KActionMenu *createSchemeSelectionMenu(const QIcon &icon, const QString &text, const QString &selectedSchemeName, QObject *parent); | 105 | KActionMenu *createSchemeSelectionMenu(const QIcon &icon, const QString &text, const QString &selectedSchemeName, QObject *parent); | ||
106 | KActionMenu *createSchemeSelectionMenu(const QString &text, const QString &selectedSchemeName, QObject *parent); | 106 | KActionMenu *createSchemeSelectionMenu(const QString &text, const QString &selectedSchemeName, QObject *parent); | ||
107 | KActionMenu *createSchemeSelectionMenu(const QString &selectedSchemeName, QObject *parent); | 107 | KActionMenu *createSchemeSelectionMenu(const QString &selectedSchemeName, QObject *parent); | ||
108 | 108 | | |||
109 | /** | ||||
110 | * Creates a KActionMenu populated with all the available color schemes and a "System" which refers to the | ||||
111 | * system scheme. | ||||
112 | * All actions are in an action group and when one of the actions is triggered the scheme | ||||
113 | * referenced by this action is activated. | ||||
114 | * | ||||
115 | * The KActionMenu will not be updated in case the installed color schemes change. It's the | ||||
116 | * task of the user of the KActionMenu to monitor for changes if required. | ||||
117 | * | ||||
118 | * Actions have model indices as their data | ||||
119 | * | ||||
120 | * @param icon The icon to use for the KActionMenu | ||||
121 | * @param text The text to use for the KActionMenu | ||||
122 | * @param selectedSchemeName The name of the color scheme to select, if empty, system default is selected | ||||
123 | * @param parent The parent of the KActionMenu | ||||
124 | * @return KActionMenu populated with all available color schemes. | ||||
125 | * @see activateScheme | ||||
126 | */ | ||||
127 | KActionMenu *createSchemeSelectionMenuWithDefault(const QIcon &icon, const QString &text, const QString &selectedSchemeName, QObject *parent); | ||||
broulik: `WithDefaultEntry`? | |||||
amhndu: `createSchemeSelectionMenuWithDefaultEntry` ?
won't it be too big ? | |||||
ngraham: I think it's okay. Pixels and characters are cheap. :) | |||||
instead of a custom variant, what about creating new versions of the createSchemeSelectionMenu functions that take flags instead? pino: instead of a custom variant, what about creating new versions of the… | |||||
128 | | ||||
109 | public Q_SLOTS: | 129 | public Q_SLOTS: | ||
110 | /** | 130 | /** | ||
111 | * @brief Activates the KColorScheme identified by the provided @p index. | 131 | * @brief Activates the KColorScheme identified by the provided @p index. | ||
112 | * | 132 | * | ||
113 | * Installs the KColorScheme as the QApplication's QPalette. | 133 | * Installs the KColorScheme as the QApplication's QPalette. | ||
114 | * | 134 | * | ||
115 | * @param index The index for the KColorScheme to activate. | 135 | * @param index The index for the KColorScheme to activate. | ||
116 | * The index must reference the QAbstractItemModel provided by @link model @endlink | 136 | * The index must reference the QAbstractItemModel provided by @link model @endlink | ||
Show All 9 Lines |
WithDefaultEntry?