Changeset View
Changeset View
Standalone View
Standalone View
scripting/workspace_wrapper.h
Show First 20 Lines • Show All 64 Lines • ▼ Show 20 Line(s) | 39 | { | |||
---|---|---|---|---|---|
65 | Q_PROPERTY(int displayWidth READ displayWidth) | 65 | Q_PROPERTY(int displayWidth READ displayWidth) | ||
66 | /** | 66 | /** | ||
67 | * The height of the display, that is height of all combined screens. | 67 | * The height of the display, that is height of all combined screens. | ||
68 | * @deprecated since 5.0 use virtualScreenSize | 68 | * @deprecated since 5.0 use virtualScreenSize | ||
69 | */ | 69 | */ | ||
70 | Q_PROPERTY(int displayHeight READ displayHeight) | 70 | Q_PROPERTY(int displayHeight READ displayHeight) | ||
71 | Q_PROPERTY(int activeScreen READ activeScreen) | 71 | Q_PROPERTY(int activeScreen READ activeScreen) | ||
72 | Q_PROPERTY(int numScreens READ numScreens NOTIFY numberScreensChanged) | 72 | Q_PROPERTY(int numScreens READ numScreens NOTIFY numberScreensChanged) | ||
73 | Q_PROPERTY(QString currentActivity READ currentActivity NOTIFY currentActivityChanged) | 73 | Q_PROPERTY(QString currentActivity READ currentActivity WRITE setCurrentActivity NOTIFY currentActivityChanged) | ||
74 | Q_PROPERTY(QStringList activities READ activityList NOTIFY activitiesChanged) | 74 | Q_PROPERTY(QStringList activities READ activityList NOTIFY activitiesChanged) | ||
75 | /** | 75 | /** | ||
76 | * The bounding size of all screens combined. Overlapping areas | 76 | * The bounding size of all screens combined. Overlapping areas | ||
77 | * are not counted multiple times. | 77 | * are not counted multiple times. | ||
78 | * @see virtualScreenGeometry | 78 | * @see virtualScreenGeometry | ||
79 | */ | 79 | */ | ||
80 | Q_PROPERTY(QSize virtualScreenSize READ virtualScreenSize NOTIFY virtualScreenSizeChanged) | 80 | Q_PROPERTY(QSize virtualScreenSize READ virtualScreenSize NOTIFY virtualScreenSizeChanged) | ||
81 | /** | 81 | /** | ||
▲ Show 20 Lines • Show All 121 Lines • ▼ Show 20 Line(s) | 202 | protected: | |||
203 | explicit WorkspaceWrapper(QObject* parent = nullptr); | 203 | explicit WorkspaceWrapper(QObject* parent = nullptr); | ||
204 | 204 | | |||
205 | public: | 205 | public: | ||
206 | #define GETTERSETTERDEF( rettype, getter, setter ) \ | 206 | #define GETTERSETTERDEF( rettype, getter, setter ) \ | ||
207 | rettype getter() const; \ | 207 | rettype getter() const; \ | ||
208 | void setter( rettype val ); | 208 | void setter( rettype val ); | ||
209 | GETTERSETTERDEF(int, numberOfDesktops, setNumberOfDesktops) | 209 | GETTERSETTERDEF(int, numberOfDesktops, setNumberOfDesktops) | ||
210 | GETTERSETTERDEF(int, currentDesktop, setCurrentDesktop) | 210 | GETTERSETTERDEF(int, currentDesktop, setCurrentDesktop) | ||
211 | GETTERSETTERDEF(QString, currentActivity, setCurrentActivity) | ||||
211 | GETTERSETTERDEF(KWin::AbstractClient*, activeClient, setActiveClient) | 212 | GETTERSETTERDEF(KWin::AbstractClient*, activeClient, setActiveClient) | ||
212 | #undef GETTERSETTERDEF | 213 | #undef GETTERSETTERDEF | ||
213 | QSize desktopGridSize() const; | 214 | QSize desktopGridSize() const; | ||
214 | int desktopGridWidth() const; | 215 | int desktopGridWidth() const; | ||
215 | int desktopGridHeight() const; | 216 | int desktopGridHeight() const; | ||
216 | int workspaceWidth() const; | 217 | int workspaceWidth() const; | ||
217 | int workspaceHeight() const; | 218 | int workspaceHeight() const; | ||
218 | QSize workspaceSize() const; | 219 | QSize workspaceSize() const; | ||
219 | int displayWidth() const; | 220 | int displayWidth() const; | ||
220 | int displayHeight() const; | 221 | int displayHeight() const; | ||
221 | QSize displaySize() const; | 222 | QSize displaySize() const; | ||
222 | int activeScreen() const; | 223 | int activeScreen() const; | ||
223 | int numScreens() const; | 224 | int numScreens() const; | ||
224 | QString currentActivity() const; | | |||
225 | QStringList activityList() const; | 225 | QStringList activityList() const; | ||
226 | QSize virtualScreenSize() const; | 226 | QSize virtualScreenSize() const; | ||
227 | QRect virtualScreenGeometry() const; | 227 | QRect virtualScreenGeometry() const; | ||
228 | 228 | | |||
229 | /** | 229 | /** | ||
230 | * Returns the geometry a Client can use with the specified option. | 230 | * Returns the geometry a Client can use with the specified option. | ||
231 | * This method should be preferred over other methods providing screen sizes as the | 231 | * This method should be preferred over other methods providing screen sizes as the | ||
232 | * various options take constraints such as struts set on panels into account. | 232 | * various options take constraints such as struts set on panels into account. | ||
▲ Show 20 Lines • Show All 153 Lines • Show Last 20 Lines |