Add properties for keepAbove/Below to KDecoration
For consistency two new changed signals are introduced without any argument and the old signals are marked as deprecated.
This commit is contained in:
parent
7aadeaa310
commit
c5e60a7ce8
4 changed files with 16 additions and 6 deletions
|
@ -234,8 +234,6 @@ AuroraeClient::AuroraeClient(KDecorationBridge *bridge, KDecorationFactory *fact
|
|||
, m_scene(new QGraphicsScene(this))
|
||||
, m_item(AuroraeFactory::instance()->createQmlDecoration(this))
|
||||
{
|
||||
connect(this, SIGNAL(keepAboveChanged(bool)), SIGNAL(keepAboveChangedWrapper()));
|
||||
connect(this, SIGNAL(keepBelowChanged(bool)), SIGNAL(keepBelowChangedWrapper()));
|
||||
connect(AuroraeFactory::instance(), SIGNAL(buttonsChanged()), SIGNAL(buttonsChanged()));
|
||||
connect(AuroraeFactory::instance(), SIGNAL(configChanged()), SIGNAL(configChanged()));
|
||||
connect(AuroraeFactory::instance(), SIGNAL(titleFontChanged()), SIGNAL(fontChanged()));
|
||||
|
|
|
@ -97,8 +97,6 @@ class AuroraeClient : public KDecoration
|
|||
Q_PROPERTY(bool preview READ isPreview CONSTANT)
|
||||
Q_PROPERTY(bool resizeable READ isResizable CONSTANT)
|
||||
Q_PROPERTY(bool shadeable READ isShadeable)
|
||||
Q_PROPERTY(bool keepAbove READ keepAbove WRITE setKeepAbove NOTIFY keepAboveChangedWrapper)
|
||||
Q_PROPERTY(bool keepBelow READ keepBelow WRITE setKeepBelow NOTIFY keepBelowChangedWrapper)
|
||||
Q_PROPERTY(bool providesContextHelp READ providesContextHelp)
|
||||
Q_PROPERTY(bool appMenu READ menuAvailable NOTIFY appMenuAvailableChanged)
|
||||
Q_PROPERTY(QRect transparentRect READ transparentRect)
|
||||
|
@ -125,8 +123,6 @@ public:
|
|||
Q_INVOKABLE QVariant readConfig(const QString &key, const QVariant &defaultValue = QVariant());
|
||||
|
||||
Q_SIGNALS:
|
||||
void keepAboveChangedWrapper();
|
||||
void keepBelowChangedWrapper();
|
||||
void buttonsChanged();
|
||||
/**
|
||||
* Signal emitted when the decoration's configuration might have changed.
|
||||
|
|
|
@ -70,6 +70,10 @@ KDecoration::KDecoration(KDecorationBridge* bridge, KDecorationFactory* factory)
|
|||
d(new KDecorationPrivate())
|
||||
{
|
||||
factory->addDecoration(this);
|
||||
connect(this, static_cast<void (KDecoration::*)(bool)>(&KDecoration::keepAboveChanged),
|
||||
this, static_cast<void (KDecoration::*)()>(&KDecoration::keepAboveChanged));
|
||||
connect(this, static_cast<void (KDecoration::*)(bool)>(&KDecoration::keepBelowChanged),
|
||||
this, static_cast<void (KDecoration::*)()>(&KDecoration::keepBelowChanged));
|
||||
}
|
||||
|
||||
KDecoration::~KDecoration()
|
||||
|
|
|
@ -497,6 +497,8 @@ class KWIN_EXPORT KDecoration
|
|||
Q_PROPERTY(bool setShade READ isSetShade NOTIFY shadeChanged)
|
||||
Q_PROPERTY(QIcon icon READ icon NOTIFY iconChanged)
|
||||
Q_PROPERTY(bool maximized READ isMaximized NOTIFY maximizeChanged)
|
||||
Q_PROPERTY(bool keepAbove READ keepAbove WRITE setKeepAbove NOTIFY keepAboveChanged)
|
||||
Q_PROPERTY(bool keepBelow READ keepBelow WRITE setKeepBelow NOTIFY keepBelowChanged)
|
||||
public:
|
||||
/**
|
||||
* Constructs a KDecoration object. Both the arguments are passed from
|
||||
|
@ -863,9 +865,19 @@ Q_SIGNALS:
|
|||
/**
|
||||
* This signal is emitted whenever the window's keep-above state changes.
|
||||
*/
|
||||
void keepAboveChanged();
|
||||
/**
|
||||
* This signal is emitted whenever the window's keep-below state changes.
|
||||
*/
|
||||
void keepBelowChanged();
|
||||
/**
|
||||
* This signal is emitted whenever the window's keep-above state changes.
|
||||
* @deprecated connect to signal without argument
|
||||
*/
|
||||
void keepAboveChanged(bool);
|
||||
/**
|
||||
* This signal is emitted whenever the window's keep-below state changes.
|
||||
* @deprecated connect to signal without argument
|
||||
*/
|
||||
void keepBelowChanged(bool);
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue