Export displayWidth/height/size as properties of workspace
This commit is contained in:
parent
55088ba776
commit
cf5b70bd2c
2 changed files with 30 additions and 0 deletions
|
@ -76,6 +76,21 @@ QSize WorkspaceWrapper::workspaceSize() const
|
|||
return QSize(workspaceWidth(), workspaceHeight());
|
||||
}
|
||||
|
||||
QSize WorkspaceWrapper::displaySize() const
|
||||
{
|
||||
return QSize(KWin::displayWidth(), KWin::displayHeight());
|
||||
}
|
||||
|
||||
int WorkspaceWrapper::displayWidth() const
|
||||
{
|
||||
return KWin::displayWidth();
|
||||
}
|
||||
|
||||
int WorkspaceWrapper::displayHeight() const
|
||||
{
|
||||
return KWin::displayWidth();
|
||||
}
|
||||
|
||||
void WorkspaceWrapper::setupClientConnections(KWin::Client *client)
|
||||
{
|
||||
connect(client, SIGNAL(clientMinimized(KWin::Client*,bool)), SIGNAL(clientMinimized(KWin::Client*)));
|
||||
|
|
|
@ -46,6 +46,18 @@ class WorkspaceWrapper : public QObject
|
|||
* The number of desktops currently used. Minimum number of desktops is 1, maximum 20.
|
||||
**/
|
||||
Q_PROPERTY(int desktops READ numberOfDesktops WRITE setNumberOfDesktops NOTIFY numberDesktopsChanged)
|
||||
/**
|
||||
* The same of the display, that is all screens.
|
||||
**/
|
||||
Q_PROPERTY(QSize displaySize READ displaySize)
|
||||
/**
|
||||
* The width of the display, that is width of all combined screens.
|
||||
**/
|
||||
Q_PROPERTY(int displayWidth READ displayWidth)
|
||||
/**
|
||||
* The height of the display, that is height of all combined screens.
|
||||
**/
|
||||
Q_PROPERTY(int displayHeight READ displayHeight)
|
||||
|
||||
private:
|
||||
Q_DISABLE_COPY(WorkspaceWrapper)
|
||||
|
@ -86,6 +98,9 @@ void setter( rettype val );
|
|||
int workspaceWidth() const;
|
||||
int workspaceHeight() const;
|
||||
QSize workspaceSize() const;
|
||||
int displayWidth() const;
|
||||
int displayHeight() const;
|
||||
QSize displaySize() const;
|
||||
|
||||
Q_INVOKABLE QList< KWin::Client* > clientList() const;
|
||||
|
||||
|
|
Loading…
Reference in a new issue