KWindowShadow

KWindowShadow Class Reference

#include <kwindowshadow.h>

Inheritance diagram for KWindowShadow:

Public Member Functions

 KWindowShadow (QObject *parent=nullptr)
 
KWindowShadowTile::Ptr bottomLeftTile () const
 
KWindowShadowTile::Ptr bottomRightTile () const
 
KWindowShadowTile::Ptr bottomTile () const
 
bool create ()
 
void destroy ()
 
bool isCreated () const
 
KWindowShadowTile::Ptr leftTile () const
 
QMargins padding () const
 
KWindowShadowTile::Ptr rightTile () const
 
void setBottomLeftTile (KWindowShadowTile::Ptr tile)
 
void setBottomRightTile (KWindowShadowTile::Ptr tile)
 
void setBottomTile (KWindowShadowTile::Ptr tile)
 
void setLeftTile (KWindowShadowTile::Ptr tile)
 
void setPadding (const QMargins &padding)
 
void setRightTile (KWindowShadowTile::Ptr tile)
 
void setTopLeftTile (KWindowShadowTile::Ptr tile)
 
void setTopRightTile (KWindowShadowTile::Ptr tile)
 
void setTopTile (KWindowShadowTile::Ptr tile)
 
void setWindow (QWindow *window)
 
KWindowShadowTile::Ptr topLeftTile () const
 
KWindowShadowTile::Ptr topRightTile () const
 
KWindowShadowTile::Ptr topTile () const
 
QWindowwindow () 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

- Properties inherited from QObject
 objectName
 
- 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 KWindowShadow class represents a drop-shadow that is drawn by the compositor.

The KWindowShadow is composed of multiple tiles. The top left tile, the top right tile, the bottom left tile, and the bottom right tile are rendered as they are. The top tile and the bottom tile are stretched in x direction; the left tile and the right tile are stretched in y direction. Several KWindowShadow objects can share shadow tiles to reduce memory usage. You have to specify padding() along the shadow tiles. The padding values indicate how much the KWindowShadow sticks outside the decorated window.

Once the KWindowShadow is created, you're not allowed to attach or detach any shadow tiles, change padding(), or change window(). In order to do so, you have to destroy() the shadow first, update relevant properties, and create() the shadow again.

Definition at line 79 of file kwindowshadow.h.

Member Function Documentation

KWindowShadowTile::Ptr KWindowShadow::bottomLeftTile ( ) const

Returns the bottom-left tile attached to the KWindowShadow.

Definition at line 179 of file kwindowshadow.cpp.

KWindowShadowTile::Ptr KWindowShadow::bottomRightTile ( ) const

Returns the bottom-right tile attached to the KWindowShadow.

Definition at line 147 of file kwindowshadow.cpp.

KWindowShadowTile::Ptr KWindowShadow::bottomTile ( ) const

Returns the bottom tile attached to the KWindowShadow.

Definition at line 163 of file kwindowshadow.cpp.

bool KWindowShadow::create ( )

Allocates the platform resources associated with the KWindowShadow.

Once the native platform resouces have been allocated, you're not allowed to attach or detach shadow tiles, change the padding or the target window. If you want to do so, you must destroy() the shadow, change relevant attributes and call create() again.

Returns true if the creation succeeded, otherwise returns false.

Definition at line 232 of file kwindowshadow.cpp.

void KWindowShadow::destroy ( )

Releases the platform resources associated with the KWindowShadow.

Calling destroy() after window() had been destroyed will result in a no-op.

Definition at line 249 of file kwindowshadow.cpp.

bool KWindowShadow::isCreated ( ) const

Returns true if the platform resources associated with the shadow have been allocated.

Definition at line 227 of file kwindowshadow.cpp.

KWindowShadowTile::Ptr KWindowShadow::leftTile ( ) const

Returns the left tile attached to the KWindowShadow.

Definition at line 67 of file kwindowshadow.cpp.

QMargins KWindowShadow::padding ( ) const

Returns the padding of the KWindowShadow.

The padding values specify the visible extents of the shadow. The top left tile is rendered with an offset of -padding().left() and -padding().top().

Definition at line 195 of file kwindowshadow.cpp.

KWindowShadowTile::Ptr KWindowShadow::rightTile ( ) const

Returns the right tile attached to the KWindowShadow.

Definition at line 131 of file kwindowshadow.cpp.

void KWindowShadow::setBottomLeftTile ( KWindowShadowTile::Ptr  tile)

Attaches the bottom-left tile to the KWindowShadow.

Definition at line 184 of file kwindowshadow.cpp.

void KWindowShadow::setBottomRightTile ( KWindowShadowTile::Ptr  tile)

Attaches the bottom-right tile to the KWindowShadow.

Definition at line 152 of file kwindowshadow.cpp.

void KWindowShadow::setBottomTile ( KWindowShadowTile::Ptr  tile)

Attaches the bottom tile to the KWindowShadow.

Definition at line 168 of file kwindowshadow.cpp.

void KWindowShadow::setLeftTile ( KWindowShadowTile::Ptr  tile)

Attaches the left tile to the KWindowShadow.

Definition at line 72 of file kwindowshadow.cpp.

void KWindowShadow::setPadding ( const QMargins padding)

Sets the padding on the KWindowShadow.

If the padding values are smaller than the sizes of the shadow tiles, then the shadow will overlap with the window() and will be rendered behind window(). E.g. if all padding values are set to 0, then the shadow will be completely occluded by the window().

Definition at line 200 of file kwindowshadow.cpp.

void KWindowShadow::setRightTile ( KWindowShadowTile::Ptr  tile)

Attaches the right tile to the KWindowShadow.

Definition at line 136 of file kwindowshadow.cpp.

void KWindowShadow::setTopLeftTile ( KWindowShadowTile::Ptr  tile)

Attaches the top-left tile to the KWindowShadow.

Definition at line 88 of file kwindowshadow.cpp.

void KWindowShadow::setTopRightTile ( KWindowShadowTile::Ptr  tile)

Attaches the top-right tile to the KWindowShadow.

Definition at line 120 of file kwindowshadow.cpp.

void KWindowShadow::setTopTile ( KWindowShadowTile::Ptr  tile)

Attaches the top tile to the KWindowShadow.

Definition at line 104 of file kwindowshadow.cpp.

void KWindowShadow::setWindow ( QWindow window)

Sets the window behind which the KWindowShadow will be rendered.

Note that the KWindowShadow does not track the platform surface. If for whatever reason the native platform surface is deleted and then created, you must to destroy() the shadow and create() it again yourself.

Definition at line 216 of file kwindowshadow.cpp.

KWindowShadowTile::Ptr KWindowShadow::topLeftTile ( ) const

Returns the top-left tile attached to the KWindowShadow.

Definition at line 83 of file kwindowshadow.cpp.

KWindowShadowTile::Ptr KWindowShadow::topRightTile ( ) const

Returns the top-right tile attached to the KWindowShadow.

Definition at line 115 of file kwindowshadow.cpp.

KWindowShadowTile::Ptr KWindowShadow::topTile ( ) const

Returns the top tile attached to the KWindowShadow.

Definition at line 99 of file kwindowshadow.cpp.

QWindow * KWindowShadow::window ( ) const

Returns the window behind which the KWindowShadow will be rendered.

Definition at line 211 of file kwindowshadow.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 Thu Nov 26 2020 22:39:23 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.