KDecoration3

decoratedwindow.cpp
1/*
2 * SPDX-FileCopyrightText: 2014 Martin Gräßlin <mgraesslin@kde.org>
3 *
4 * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5 */
6#include "decoratedwindow.h"
7#include "private/decoratedwindowprivate.h"
8#include "private/decorationbridge.h"
9
10#include <QColor>
11
12namespace KDecoration3
13{
14DecoratedWindow::DecoratedWindow(Decoration *parent, DecorationBridge *bridge)
15 : QObject()
16 , d(bridge->createClient(this, parent))
17{
18}
19
20DecoratedWindow::~DecoratedWindow() = default;
21
22bool DecoratedWindow::isActive() const
23{
24 return d->isActive();
25}
26
28{
29 return d->caption();
30}
31
32bool DecoratedWindow::isOnAllDesktops() const
33{
34 return d->isOnAllDesktops();
35}
36
37bool DecoratedWindow::isShaded() const
38{
39 return d->isShaded();
40}
41
43{
44 return d->icon();
45}
46
47bool DecoratedWindow::isMaximized() const
48{
49 return d->isMaximized();
50}
51
52bool DecoratedWindow::isMaximizedHorizontally() const
53{
54 return d->isMaximizedHorizontally();
55}
56
57bool DecoratedWindow::isMaximizedVertically() const
58{
59 return d->isMaximizedVertically();
60}
61
62bool DecoratedWindow::isKeepAbove() const
63{
64 return d->isKeepAbove();
65}
66
67bool DecoratedWindow::isKeepBelow() const
68{
69 return d->isKeepBelow();
70}
71
72bool DecoratedWindow::isCloseable() const
73{
74 return d->isCloseable();
75}
76
77bool DecoratedWindow::isMaximizeable() const
78{
79 return d->isMaximizeable();
80}
81
82bool DecoratedWindow::isMinimizeable() const
83{
84 return d->isMinimizeable();
85}
86
88{
89 return d->providesContextHelp();
90}
91
92bool DecoratedWindow::isModal() const
93{
94 return d->isModal();
95}
96
97bool DecoratedWindow::isShadeable() const
98{
99 return d->isShadeable();
100}
101
102bool DecoratedWindow::isMoveable() const
103{
104 return d->isMoveable();
105}
106
107bool DecoratedWindow::isResizeable() const
108{
109 return d->isResizeable();
110}
111
112int DecoratedWindow::width() const
113{
114 return d->width();
115}
116
117int DecoratedWindow::height() const
118{
119 return d->height();
120}
121
123{
124 return d->size();
125}
126
128{
129 return d->palette();
130}
131
133{
134 return d->adjacentScreenEdges();
135}
136
137QString DecoratedWindow::windowClass() const
138{
139 return d->windowClass();
140}
141
143{
144 return d->hasApplicationMenu();
145}
146
148{
149 return d->isApplicationMenuActive();
150}
151
153{
154 return d->decoration();
155}
156
158{
159 return d->palette().color(group, role);
160}
161
163{
164 return d->color(group, role);
165}
166
168{
169 d->showApplicationMenu(actionId);
170}
171
172} // namespace
173
174#include "moc_decoratedwindow.cpp"
bool isApplicationMenuActive() const
Whether the application menu for this DecoratedWindow is currently shown to the user The Decoration c...
QIcon icon
The icon of the DecoratedWindow.
bool hasApplicationMenu
Whether the DecoratedWindow has an application menu.
void showApplicationMenu(int actionId)
Request the application menu to be shown to the user.
QColor color(QPalette::ColorGroup group, QPalette::ColorRole role) const
Used to get colors in QPalette.
QSize size
The size of the DecoratedWindow.
int height
The height of the DecoratedWindow.
Qt::Edges adjacentScreenEdges
The Edges which are adjacent to a screen edge.
QString caption
The caption of the DecoratedWindow.
KDecoration3::Decoration * decoration
The Decoration of this DecoratedWindow.
QPalette palette
The palette this DecoratedWindow uses.
int width
The width of the DecoratedWindow.
bool providesContextHelp
Whether the DecoratedWindow provides context help.
Base class for the Decoration.
Definition decoration.h:58
Framework for creating window decorations.
ColorGroup
Color groups are used for DecoratedWindow::color().
ColorRole
Color roles are used for DecoratedWindow::color().
typedef Edges
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:02:45 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.