Export screen information to scripts

This commit is contained in:
Martin Gräßlin 2012-02-19 15:42:18 +01:00
parent 999d64bb19
commit 356b406ae3
2 changed files with 6 additions and 0 deletions

View file

@ -63,6 +63,8 @@ GETTER(int, workspaceHeight)
GETTER(QSize, desktopGridSize)
GETTER(int, desktopGridWidth)
GETTER(int, desktopGridHeight)
GETTER(int, activeScreen)
GETTER(int, numScreens)
#undef GETTER

View file

@ -60,6 +60,8 @@ class WorkspaceWrapper : public QObject
* The height of the display, that is height of all combined screens.
**/
Q_PROPERTY(int displayHeight READ displayHeight)
Q_PROPERTY(int activeScreen READ activeScreen)
Q_PROPERTY(int numScreens READ numScreens)
private:
Q_DISABLE_COPY(WorkspaceWrapper)
@ -125,6 +127,8 @@ void setter( rettype val );
int displayWidth() const;
int displayHeight() const;
QSize displaySize() const;
int activeScreen() const;
int numScreens() const;
Q_INVOKABLE QList< KWin::Client* > clientList() const;
/**