KDecoration2::DecoratedClient

KDecoration2::DecoratedClient Class Reference

#include <decoratedclient.h>

Inheritance diagram for KDecoration2::DecoratedClient:

Properties

bool active
 
Qt::Edges adjacentScreenEdges
 
bool applicationMenuActive
 
QString caption
 
bool closeable
 
KDecoration2::Decoration decoration
 
int desktop
 
bool hasApplicationMenu
 
int height
 
QIcon icon
 
bool keepAbove
 
bool keepBelow
 
bool maximizeable
 
bool maximized
 
bool maximizedHorizontally
 
bool maximizedVertically
 
bool minimizeable
 
bool modal
 
bool moveable
 
bool onAllDesktops
 
QPalette palette
 
bool providesContextHelp
 
bool resizeable
 
bool shadeable
 
bool shaded
 
QSize size
 
int width
 
- Properties inherited from QObject
 objectName
 

Signals

void activeChanged (bool)
 
void adjacentScreenEdgesChanged (Qt::Edges edges)
 
void applicationMenuActiveChanged (bool)
 
void captionChanged (QString)
 
void closeableChanged (bool)
 
void desktopChanged (int)
 
void hasApplicationMenuChanged (bool)
 
void heightChanged (int)
 
void iconChanged (QIcon)
 
void keepAboveChanged (bool)
 
void keepBelowChanged (bool)
 
void maximizeableChanged (bool)
 
void maximizedChanged (bool)
 
void maximizedHorizontallyChanged (bool)
 
void maximizedVerticallyChanged (bool)
 
void minimizeableChanged (bool)
 
void moveableChanged (bool)
 
void onAllDesktopsChanged (bool)
 
void paletteChanged (const QPalette &palette)
 
void providesContextHelpChanged (bool)
 
void resizeableChanged (bool)
 
void shadeableChanged (bool)
 
void shadedChanged (bool)
 
void sizeChanged (const QSize &size)
 
void widthChanged (int)
 

Public Member Functions

Qt::Edges adjacentScreenEdges () const
 
QString caption () const
 
QColor color (QPalette::ColorGroup group, QPalette::ColorRole role) const
 
QColor color (ColorGroup group, ColorRole role) const
 
QPointer< Decorationdecoration () const
 
WId decorationId () const
 
int desktop () const
 
bool hasApplicationMenu () const
 
int height () const
 
QIcon icon () const
 
bool isActive () const
 
bool isApplicationMenuActive () const
 
bool isCloseable () const
 
bool isKeepAbove () const
 
bool isKeepBelow () const
 
bool isMaximizeable () const
 
bool isMaximized () const
 
bool isMaximizedHorizontally () const
 
bool isMaximizedVertically () const
 
bool isMinimizeable () const
 
bool isModal () const
 
bool isMoveable () const
 
bool isOnAllDesktops () const
 
bool isResizeable () const
 
bool isShadeable () const
 
bool isShaded () const
 
QPalette palette () const
 
bool providesContextHelp () const
 
void showApplicationMenu (int actionId)
 
QSize size () const
 
int width () const
 
WId windowId () const
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
bool blockSignals (bool block)
 
const QObjectListchildren () const const
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method) const const
 
bool disconnect (const QObject *receiver, const char *method) const const
 
void dumpObjectInfo ()
 
void dumpObjectInfo () const const
 
void dumpObjectTree ()
 
void dumpObjectTree () const const
 
QList< QByteArraydynamicPropertyNames () const const
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
findChild (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegExp &regExp, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const
 
bool inherits (const char *className) const const
 
void installEventFilter (QObject *filterObj)
 
bool isWidgetType () const const
 
bool isWindowType () const const
 
void killTimer (int id)
 
virtual const QMetaObjectmetaObject () const const
 
void moveToThread (QThread *targetThread)
 
QString objectName () const const
 
void objectNameChanged (const QString &objectName)
 
QObjectparent () const const
 
QVariant property (const char *name) const const
 
 Q_CLASSINFO (Name, Value)
 
 Q_DISABLE_COPY (Class)
 
 Q_DISABLE_COPY_MOVE (Class)
 
 Q_DISABLE_MOVE (Class)
 
 Q_EMIT Q_EMIT
 
 Q_ENUM (...)
 
 Q_ENUM_NS (...)
 
 Q_ENUMS (...)
 
 Q_FLAG (...)
 
 Q_FLAG_NS (...)
 
 Q_FLAGS (...)
 
 Q_GADGET Q_GADGET
 
 Q_INTERFACES (...)
 
 Q_INVOKABLE Q_INVOKABLE
 
 Q_NAMESPACE Q_NAMESPACE
 
 Q_NAMESPACE_EXPORT (EXPORT_MACRO)
 
 Q_OBJECT Q_OBJECT
 
 Q_PROPERTY (...)
 
 Q_REVISION Q_REVISION
 
 Q_SET_OBJECT_NAME (Object)
 
 Q_SIGNAL Q_SIGNAL
 
 Q_SIGNALS Q_SIGNALS
 
 Q_SLOT Q_SLOT
 
 Q_SLOTS Q_SLOTS
 
qFindChild (const QObject *obj, const QString &name)
 
QList< T > qFindChildren (const QObject *obj, const QRegExp &regExp)
 
QList< T > qFindChildren (const QObject *obj, const QString &name)
 
qobject_cast (QObject *object)
 
qobject_cast (const QObject *object)
 
 QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
 
void removeEventFilter (QObject *obj)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool signalsBlocked () const const
 
int startTimer (int interval, Qt::TimerType timerType)
 
int startTimer (std::chrono::milliseconds time, Qt::TimerType timerType)
 
QThreadthread () const const
 

Additional Inherited Members

- Static Public Member Functions inherited from QObject
QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, Functor functor)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type)
 
bool disconnect (const QMetaObject::Connection &connection)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 
- Public Attributes inherited from QObject
typedef QObjectList
 
- Protected Member Functions inherited from QObject
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
bool isSignalConnected (const QMetaMethod &signal) const const
 
int receivers (const char *signal) const const
 
QObjectsender () const const
 
int senderSignalIndex () const const
 
virtual void timerEvent (QTimerEvent *event)
 

Detailed Description

The Client which gets decorated.

The DecoratedClient provides access to all the properties relevant for decorating the Client. Each DecoratedClient is bound to one Decoration and each Decoration is bound to this one DecoratedClient.

The DecoratedClient only exports properties, it does not provide any means to change the state. To change state one needs to call the methods on Decoration. This is as the backend might disallow state changes. Therefore any changes should be bound to the change signals of the DecoratedClient and not be bound to state changes of input elements (such as a button).

Definition at line 54 of file decoratedclient.h.

Property Documentation

bool KDecoration2::DecoratedClient::active
read

Whether the DecoratedClient is active (has focus) or is inactive.

Definition at line 64 of file decoratedclient.h.

Qt::Edges KDecoration2::DecoratedClient::adjacentScreenEdges
read

The Edges which are adjacent to a screen edge.

E.g. for a maximized DecoratedClient this will include all Edges. The Decoration can use this information to hide borders.

Definition at line 173 of file decoratedclient.h.

bool KDecoration2::DecoratedClient::applicationMenuActive
read

Whether the application menu for this DecoratedClient is currently shown to the user The Decoration can use this information to highlight the respective button.

Since
5.9

Definition at line 184 of file decoratedclient.h.

QString KDecoration2::DecoratedClient::caption
read

The caption of the DecoratedClient.

Definition at line 68 of file decoratedclient.h.

bool KDecoration2::DecoratedClient::closeable
read

Whether the DecoratedClient can be closed.

If this property is false a DecorationButton for closing the DecoratedClient should be disabled.

Definition at line 118 of file decoratedclient.h.

QPointer< Decoration > KDecoration2::DecoratedClient::decoration
read

The Decoration of this DecoratedClient.

Definition at line 60 of file decoratedclient.h.

int KDecoration2::DecoratedClient::desktop
read

The virtual desktop of the DecoratedClient.

The special value -1 means on all desktops. For this prefer using the property onAllDesktops.

Definition at line 73 of file decoratedclient.h.

bool KDecoration2::DecoratedClient::hasApplicationMenu
read

Whether the DecoratedClient has an application menu.

Since
5.9

Definition at line 178 of file decoratedclient.h.

int KDecoration2::DecoratedClient::height
read

The height of the DecoratedClient.

Definition at line 159 of file decoratedclient.h.

QIcon KDecoration2::DecoratedClient::icon
read

The icon of the DecoratedClient.

This can be used as the icon for the window menu button.

Definition at line 86 of file decoratedclient.h.

bool KDecoration2::DecoratedClient::keepAbove
read

Whether the DecoratedClient is set to be kept above other DecoratedClients.

There can be multiple DecoratedClients which are set to be kept above.

Definition at line 107 of file decoratedclient.h.

bool KDecoration2::DecoratedClient::keepBelow
read

Whether the DecoratedClient is set to be kept below other DecoratedClients.

There can be multiple DecoratedClients which are set to be kept below.

Definition at line 112 of file decoratedclient.h.

bool KDecoration2::DecoratedClient::maximizeable
read

Whether the DecoratedClient can be maximized.

If this property is false a DecorationButton for maximizing the DecoratedClient should be disabled.

Definition at line 123 of file decoratedclient.h.

bool KDecoration2::DecoratedClient::maximized
read

Whether the DecoratedClient is maximized.

A DecoratedClient is maximized if it is both maximizedHorizontally and maximizedVertically. The Decoration of a maximized DecoratedClient should only consist of the title bar area.

Definition at line 92 of file decoratedclient.h.

bool KDecoration2::DecoratedClient::maximizedHorizontally
read

Whether the DecoratedClient is maximized horizontally.

A horizontally maximized DecoratedClient uses the maximal possible width.

Definition at line 97 of file decoratedclient.h.

bool KDecoration2::DecoratedClient::maximizedVertically
read

Whether the DecoratedClient is maximized vertically.

A vertically maximized DecoratedClient uses the maximal possible height.

Definition at line 102 of file decoratedclient.h.

bool KDecoration2::DecoratedClient::minimizeable
read

Whether the DecoratedClient can be minimized.

If this property is false a DecorationButton for minimizing the DecoratedClient should be disabled.

Definition at line 128 of file decoratedclient.h.

bool KDecoration2::DecoratedClient::modal
read

Whether the DecoratedClient is a modal dialog.

Definition at line 137 of file decoratedclient.h.

bool KDecoration2::DecoratedClient::moveable
read

Whether the DecoratedClient can be moved.

Definition at line 146 of file decoratedclient.h.

bool KDecoration2::DecoratedClient::onAllDesktops
read

Whether the DecoratedClient is on all desktops or on just one.

Definition at line 77 of file decoratedclient.h.

QPalette KDecoration2::DecoratedClient::palette
read

The palette this DecoratedClient uses.

The palette might be different for each DecoratedClient and the Decoration should honor the palette.

Definition at line 168 of file decoratedclient.h.

bool KDecoration2::DecoratedClient::providesContextHelp
read

Whether the DecoratedClient provides context help.

The Decoration should only show a context help button if this property is true.

Definition at line 133 of file decoratedclient.h.

bool KDecoration2::DecoratedClient::resizeable
read

Whether the DecoratedClient can be resized.

Definition at line 150 of file decoratedclient.h.

bool KDecoration2::DecoratedClient::shadeable
read

Whether the DecoratedClient can be shaded.

If this property is false a DecorationButton for shading the DecoratedClient should be disabled.

Definition at line 142 of file decoratedclient.h.

bool KDecoration2::DecoratedClient::shaded
read

Whether the DecoratedClient is shaded.

Shaded means that the actual content is not visible, only the Decoration is visible.

Definition at line 82 of file decoratedclient.h.

QSize KDecoration2::DecoratedClient::size
read

The size of the DecoratedClient.

Definition at line 163 of file decoratedclient.h.

int KDecoration2::DecoratedClient::width
read

The width of the DecoratedClient.

Definition at line 155 of file decoratedclient.h.

Member Function Documentation

QColor KDecoration2::DecoratedClient::color ( QPalette::ColorGroup  group,
QPalette::ColorRole  role 
) const

Used to get colors in QPalette.

Parameters
groupThe color group
roleThe color role
Returns
palette().color(group, role)
Since
5.3

Definition at line 94 of file decoratedclient.cpp.

QColor KDecoration2::DecoratedClient::color ( ColorGroup  group,
ColorRole  role 
) const

Used to get additional colors that are not in QPalette.

Parameters
groupThe color group
roleThe color role
Returns
The color if provided for combination of group and role, otherwise invalid QColor.
Since
5.3

Definition at line 99 of file decoratedclient.cpp.

bool KDecoration2::DecoratedClient::hasApplicationMenu ( ) const

Whether the DecoratedClient has an application menu.

Since
5.9
bool KDecoration2::DecoratedClient::isApplicationMenuActive ( ) const

Whether the application menu for this DecoratedClient is currently shown to the user The Decoration can use this information to highlight the respective button.

Since
5.9

Definition at line 81 of file decoratedclient.cpp.

void KDecoration2::DecoratedClient::showApplicationMenu ( int  actionId)

Request the application menu to be shown to the user.

Parameters
actionIdThe DBus menu ID of the action that should be highlighted, 0 for none.

Definition at line 104 of file decoratedclient.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Tue Aug 11 2020 23:09:37 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.