Changeset View
Changeset View
Standalone View
Standalone View
virtualdesktops.h
Show All 30 Lines | |||||
31 | // KDE includes | 31 | // KDE includes | ||
32 | #include <KConfig> | 32 | #include <KConfig> | ||
33 | #include <KSharedConfig> | 33 | #include <KSharedConfig> | ||
34 | 34 | | |||
35 | class KLocalizedString; | 35 | class KLocalizedString; | ||
36 | class NETRootInfo; | 36 | class NETRootInfo; | ||
37 | class QAction; | 37 | class QAction; | ||
38 | 38 | | |||
39 | namespace KWayland | 39 | namespace KWaylandServer | ||
40 | { | | |||
41 | namespace Server | | |||
42 | { | 40 | { | ||
43 | class PlasmaVirtualDesktopManagementInterface; | 41 | class PlasmaVirtualDesktopManagementInterface; | ||
44 | } | 42 | } | ||
45 | } | | |||
46 | 43 | | |||
47 | namespace KWin { | 44 | namespace KWin { | ||
48 | 45 | | |||
49 | class KWIN_EXPORT VirtualDesktop : public QObject | 46 | class KWIN_EXPORT VirtualDesktop : public QObject | ||
50 | { | 47 | { | ||
51 | Q_OBJECT | 48 | Q_OBJECT | ||
52 | Q_PROPERTY(QByteArray id READ id CONSTANT) | 49 | Q_PROPERTY(QByteArray id READ id CONSTANT) | ||
53 | Q_PROPERTY(uint x11DesktopNumber READ x11DesktopNumber NOTIFY x11DesktopNumberChanged) | 50 | Q_PROPERTY(uint x11DesktopNumber READ x11DesktopNumber NOTIFY x11DesktopNumberChanged) | ||
▲ Show 20 Lines • Show All 105 Lines • ▼ Show 20 Line(s) | 155 | public: | |||
159 | ~VirtualDesktopManager() override; | 156 | ~VirtualDesktopManager() override; | ||
160 | /** | 157 | /** | ||
161 | * @internal, for X11 case | 158 | * @internal, for X11 case | ||
162 | */ | 159 | */ | ||
163 | void setRootInfo(NETRootInfo *info); | 160 | void setRootInfo(NETRootInfo *info); | ||
164 | /** | 161 | /** | ||
165 | * @internal, for Wayland case | 162 | * @internal, for Wayland case | ||
166 | */ | 163 | */ | ||
167 | void setVirtualDesktopManagement(KWayland::Server::PlasmaVirtualDesktopManagementInterface *management); | 164 | void setVirtualDesktopManagement(KWaylandServer::PlasmaVirtualDesktopManagementInterface *management); | ||
168 | /** | 165 | /** | ||
169 | * @internal | 166 | * @internal | ||
170 | */ | 167 | */ | ||
171 | void setConfig(KSharedConfig::Ptr config); | 168 | void setConfig(KSharedConfig::Ptr config); | ||
172 | /** | 169 | /** | ||
173 | * @returns Total number of desktops currently in existence. | 170 | * @returns Total number of desktops currently in existence. | ||
174 | * @see setCount | 171 | * @see setCount | ||
175 | * @see countChanged | 172 | * @see countChanged | ||
▲ Show 20 Lines • Show All 311 Lines • ▼ Show 20 Line(s) | 451 | private: | |||
487 | 484 | | |||
488 | QVector<VirtualDesktop*> m_desktops; | 485 | QVector<VirtualDesktop*> m_desktops; | ||
489 | QPointer<VirtualDesktop> m_current; | 486 | QPointer<VirtualDesktop> m_current; | ||
490 | quint32 m_rows = 2; | 487 | quint32 m_rows = 2; | ||
491 | bool m_navigationWrapsAround; | 488 | bool m_navigationWrapsAround; | ||
492 | VirtualDesktopGrid m_grid; | 489 | VirtualDesktopGrid m_grid; | ||
493 | // TODO: QPointer | 490 | // TODO: QPointer | ||
494 | NETRootInfo *m_rootInfo; | 491 | NETRootInfo *m_rootInfo; | ||
495 | KWayland::Server::PlasmaVirtualDesktopManagementInterface *m_virtualDesktopManagement = nullptr; | 492 | KWaylandServer::PlasmaVirtualDesktopManagementInterface *m_virtualDesktopManagement = nullptr; | ||
496 | KSharedConfig::Ptr m_config; | 493 | KSharedConfig::Ptr m_config; | ||
497 | 494 | | |||
498 | KWIN_SINGLETON_VARIABLE(VirtualDesktopManager, s_manager) | 495 | KWIN_SINGLETON_VARIABLE(VirtualDesktopManager, s_manager) | ||
499 | }; | 496 | }; | ||
500 | 497 | | |||
501 | /** | 498 | /** | ||
502 | * Function object to select the desktop above in the layout. | 499 | * Function object to select the desktop above in the layout. | ||
503 | * Note: does not switch to the desktop! | 500 | * Note: does not switch to the desktop! | ||
▲ Show 20 Lines • Show All 227 Lines • Show Last 20 Lines |