Changeset View
Changeset View
Standalone View
Standalone View
src/decoratedclient.h
Show First 20 Lines • Show All 161 Lines • ▼ Show 20 Line(s) | 55 | { | |||
---|---|---|---|---|---|
162 | * DecoratedClient and the Decoration should honor the palette. | 162 | * DecoratedClient and the Decoration should honor the palette. | ||
163 | **/ | 163 | **/ | ||
164 | Q_PROPERTY(QPalette palette READ palette NOTIFY paletteChanged) | 164 | Q_PROPERTY(QPalette palette READ palette NOTIFY paletteChanged) | ||
165 | /** | 165 | /** | ||
166 | * The Edges which are adjacent to a screen edge. E.g. for a maximized DecoratedClient this | 166 | * The Edges which are adjacent to a screen edge. E.g. for a maximized DecoratedClient this | ||
167 | * will include all Edges. The Decoration can use this information to hide borders. | 167 | * will include all Edges. The Decoration can use this information to hide borders. | ||
168 | **/ | 168 | **/ | ||
169 | Q_PROPERTY(Qt::Edges adjacentScreenEdges READ adjacentScreenEdges NOTIFY adjacentScreenEdgesChanged) | 169 | Q_PROPERTY(Qt::Edges adjacentScreenEdges READ adjacentScreenEdges NOTIFY adjacentScreenEdgesChanged) | ||
170 | /** | ||||
171 | * Whether the DecoratedClient has an application menu | ||||
172 | * @since 5.9 | ||||
173 | */ | ||||
174 | Q_PROPERTY(bool hasApplicationMenu READ hasApplicationMenu NOTIFY hasApplicationMenuChanged) | ||||
175 | /** | ||||
176 | * Whether the application menu for this DecoratedClient is currently shown to the user | ||||
177 | * The Decoration can use this information to highlight the respective button. | ||||
178 | * @since 5.9 | ||||
179 | */ | ||||
180 | Q_PROPERTY(bool applicationMenuActive READ isApplicationMenuActive NOTIFY applicationMenuActiveChanged) | ||||
170 | 181 | | |||
171 | // TODO: properties for windowId and decorationId? | 182 | // TODO: properties for windowId and decorationId? | ||
172 | 183 | | |||
173 | public: | 184 | public: | ||
174 | DecoratedClient() = delete; | 185 | DecoratedClient() = delete; | ||
175 | ~DecoratedClient(); | 186 | ~DecoratedClient(); | ||
176 | bool isActive() const; | 187 | bool isActive() const; | ||
177 | QString caption() const; | 188 | QString caption() const; | ||
Show All 38 Lines | |||||
216 | * Used to get additional colors that are not in QPalette. | 227 | * Used to get additional colors that are not in QPalette. | ||
217 | * @param group The color group | 228 | * @param group The color group | ||
218 | * @param role The color role | 229 | * @param role The color role | ||
219 | * @return The color if provided for combination of group and role, otherwise invalid QColor. | 230 | * @return The color if provided for combination of group and role, otherwise invalid QColor. | ||
220 | * @since 5.3 | 231 | * @since 5.3 | ||
221 | **/ | 232 | **/ | ||
222 | QColor color(ColorGroup group, ColorRole role) const; | 233 | QColor color(ColorGroup group, ColorRole role) const; | ||
223 | 234 | | |||
235 | /** | ||||
236 | * Whether the DecoratedClient has an application menu | ||||
237 | * @since 5.9 | ||||
238 | */ | ||||
239 | bool hasApplicationMenu() const; | ||||
240 | /** | ||||
241 | * Whether the application menu for this DecoratedClient is currently shown to the user | ||||
242 | * The Decoration can use this information to highlight the respective button. | ||||
243 | * @since 5.9 | ||||
244 | */ | ||||
245 | bool isApplicationMenuActive() const; | ||||
246 | | ||||
247 | /** | ||||
248 | * Request the application menu to be shown to the user | ||||
249 | * @param actionId The DBus menu ID of the action that should be highlighted, 0 for none. | ||||
250 | */ | ||||
251 | void showApplicationMenu(int actionId); | ||||
252 | | ||||
224 | Q_SIGNALS: | 253 | Q_SIGNALS: | ||
225 | void activeChanged(bool); | 254 | void activeChanged(bool); | ||
226 | void captionChanged(QString); | 255 | void captionChanged(QString); | ||
227 | void desktopChanged(int); | 256 | void desktopChanged(int); | ||
228 | void onAllDesktopsChanged(bool); | 257 | void onAllDesktopsChanged(bool); | ||
229 | void shadedChanged(bool); | 258 | void shadedChanged(bool); | ||
230 | void iconChanged(QIcon); | 259 | void iconChanged(QIcon); | ||
231 | void maximizedChanged(bool); | 260 | void maximizedChanged(bool); | ||
Show All 10 Lines | |||||
242 | void moveableChanged(bool); | 271 | void moveableChanged(bool); | ||
243 | void resizeableChanged(bool); | 272 | void resizeableChanged(bool); | ||
244 | 273 | | |||
245 | void widthChanged(int); | 274 | void widthChanged(int); | ||
246 | void heightChanged(int); | 275 | void heightChanged(int); | ||
247 | void paletteChanged(const QPalette &palette); | 276 | void paletteChanged(const QPalette &palette); | ||
248 | void adjacentScreenEdgesChanged(Qt::Edges edges); | 277 | void adjacentScreenEdgesChanged(Qt::Edges edges); | ||
249 | 278 | | |||
279 | void hasApplicationMenuChanged(bool); | ||||
280 | void applicationMenuActiveChanged(bool); | ||||
281 | | ||||
250 | private: | 282 | private: | ||
251 | friend class Decoration; | 283 | friend class Decoration; | ||
252 | DecoratedClient(Decoration *parent, DecorationBridge *bridge); | 284 | DecoratedClient(Decoration *parent, DecorationBridge *bridge); | ||
253 | const std::unique_ptr<DecoratedClientPrivate> d; | 285 | const std::unique_ptr<DecoratedClientPrivate> d; | ||
254 | }; | 286 | }; | ||
255 | 287 | | |||
256 | } // namespace | 288 | } // namespace | ||
257 | 289 | | |||
258 | #endif | 290 | #endif |