6#include "decoratedwindow.h"
7#include "private/decoratedwindowprivate.h"
8#include "private/decorationbridge.h"
9#include "scalehelpers.h"
15DecoratedWindow::DecoratedWindow(
Decoration *parent, DecorationBridge *bridge)
17 , d(bridge->createClient(
this, parent))
21DecoratedWindow::~DecoratedWindow() =
default;
23bool DecoratedWindow::isActive()
const
33bool DecoratedWindow::isOnAllDesktops()
const
35 return d->isOnAllDesktops();
38bool DecoratedWindow::isShaded()
const
48bool DecoratedWindow::isMaximized()
const
50 return d->isMaximized();
53bool DecoratedWindow::isMaximizedHorizontally()
const
55 return d->isMaximizedHorizontally();
58bool DecoratedWindow::isMaximizedVertically()
const
60 return d->isMaximizedVertically();
63bool DecoratedWindow::isKeepAbove()
const
65 return d->isKeepAbove();
68bool DecoratedWindow::isKeepBelow()
const
70 return d->isKeepBelow();
73bool DecoratedWindow::isCloseable()
const
75 return d->isCloseable();
78bool DecoratedWindow::isMaximizeable()
const
80 return d->isMaximizeable();
83bool DecoratedWindow::isMinimizeable()
const
85 return d->isMinimizeable();
90 return d->providesContextHelp();
93bool DecoratedWindow::isModal()
const
98bool DecoratedWindow::isShadeable()
const
100 return d->isShadeable();
103bool DecoratedWindow::isMoveable()
const
105 return d->isMoveable();
108bool DecoratedWindow::isResizeable()
const
110 return d->isResizeable();
135 return d->adjacentScreenEdges();
138QString DecoratedWindow::windowClass()
const
140 return d->windowClass();
145 return d->hasApplicationMenu();
150 return d->isApplicationMenuActive();
155 return d->decoration();
160 return d->palette().color(group, role);
165 return d->color(group, role);
170 d->showApplicationMenu(actionId);
180 return d->nextScale();
185 if (
auto impl =
dynamic_cast<DecoratedWindowPrivateV2 *
>(d.get())) {
186 return impl->applicationMenuServiceName();
193 if (
auto impl =
dynamic_cast<DecoratedWindowPrivateV2 *
>(d.get())) {
194 return impl->applicationMenuObjectPath();
201#include "moc_decoratedwindow.cpp"
QString applicationMenuServiceName
Returns the DBus service name of the application menu.
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.
Qt::Edges adjacentScreenEdges
The Edges which are adjacent to a screen edge.
QString caption
The caption of the DecoratedWindow.
qreal nextScale
The next scale this decorated window is going to target.
KDecoration3::Decoration * decoration
The Decoration of this DecoratedWindow.
qreal height
The height of the DecoratedWindow.
QPalette palette
The palette this DecoratedWindow uses.
qreal width
The width of the DecoratedWindow.
bool providesContextHelp
Whether the DecoratedWindow provides context help.
QString applicationMenuObjectPath
Returns the DBus object path of the application menu.
qreal scale
The current scale this decorated window is targeting.
QSizeF size
The size of the DecoratedWindow.
Base class for the Decoration.
Framework for creating window decorations.
ColorGroup
Color groups are used for DecoratedWindow::color().
ColorRole
Color roles are used for DecoratedWindow::color().