Make List of Clients in ClientGroup accessable in scripts
For that ClientList is exported as a sequence meta type and property is added to ClientGroup.
This commit is contained in:
parent
012bcbc2e0
commit
197658475b
3 changed files with 6 additions and 0 deletions
1
client.h
1
client.h
|
@ -1178,5 +1178,6 @@ KWIN_COMPARE_PREDICATE(InputIdMatchPredicate, Client, Window, cl->inputId() == v
|
|||
|
||||
} // namespace
|
||||
Q_DECLARE_METATYPE(KWin::Client*)
|
||||
Q_DECLARE_METATYPE(QList<KWin::Client*>)
|
||||
|
||||
#endif
|
||||
|
|
|
@ -69,6 +69,10 @@ class ClientGroup : public QObject
|
|||
* The index of the visible Client in this group.
|
||||
**/
|
||||
Q_PROPERTY(int visibleClientIndex READ indexOfVisibleClient NOTIFY visibleChanged)
|
||||
/**
|
||||
* The Clients in this group.
|
||||
**/
|
||||
Q_PROPERTY(QList<KWin::Client*> clients READ clients)
|
||||
public:
|
||||
/**
|
||||
* Creates a new group containing \p c.
|
||||
|
|
|
@ -132,6 +132,7 @@ void KWin::MetaScripting::registration(QScriptEngine* eng)
|
|||
|
||||
qScriptRegisterSequenceMetaType<QStringList>(eng);
|
||||
qScriptRegisterSequenceMetaType< QList<KWin::ClientGroup*> >(eng);
|
||||
qScriptRegisterSequenceMetaType< QList<KWin::Client*> >(eng);
|
||||
}
|
||||
|
||||
QScriptValue KWin::MetaScripting::configExists(QScriptContext* ctx, QScriptEngine* eng)
|
||||
|
|
Loading…
Reference in a new issue