Changeset View
Changeset View
Standalone View
Standalone View
containments/desktop/plugins/folder/screenmapper.h
Show First 20 Lines • Show All 54 Lines • ▼ Show 20 Line(s) | 41 | public: | |||
---|---|---|---|---|---|
55 | void removeFromMap(const QUrl &url); | 55 | void removeFromMap(const QUrl &url); | ||
56 | void setCorona(Plasma::Corona *corona); | 56 | void setCorona(Plasma::Corona *corona); | ||
57 | 57 | | |||
58 | void addScreen(int screenId, const QUrl &screenUrl); | 58 | void addScreen(int screenId, const QUrl &screenUrl); | ||
59 | void removeScreen(int screenId, const QUrl &screenUrl); | 59 | void removeScreen(int screenId, const QUrl &screenUrl); | ||
60 | int firstAvailableScreen(const QUrl &screenUrl) const; | 60 | int firstAvailableScreen(const QUrl &screenUrl) const; | ||
61 | void removeItemFromDisabledScreen(const QUrl &url); | 61 | void removeItemFromDisabledScreen(const QUrl &url); | ||
62 | 62 | | |||
63 | bool sharedDesktops() const { return m_sharedDesktops; } | ||||
64 | void setSharedDesktop(bool sharedDesktops); | ||||
65 | | ||||
63 | #ifdef BUILD_TESTING | 66 | #ifdef BUILD_TESTING | ||
64 | void cleanup(); | 67 | void cleanup(); | ||
65 | #endif | 68 | #endif | ||
66 | 69 | | |||
67 | static QUrl stringToUrl(const QString &path); | 70 | static QUrl stringToUrl(const QString &path); | ||
68 | 71 | | |||
69 | Q_SIGNALS: | 72 | Q_SIGNALS: | ||
70 | void screenMappingChanged() const; | 73 | void screenMappingChanged() const; | ||
71 | void screensChanged() const; | 74 | void screensChanged() const; | ||
72 | 75 | | |||
73 | private: | 76 | private: | ||
74 | ScreenMapper(QObject *parent = nullptr); | 77 | ScreenMapper(QObject *parent = nullptr); | ||
75 | 78 | | |||
76 | QHash<QUrl, int> m_screenItemMap; | 79 | QHash<QUrl, int> m_screenItemMap; | ||
77 | QHash<int, QVector<QUrl> > m_itemsOnDisabledScreensMap; | 80 | QHash<int, QVector<QUrl> > m_itemsOnDisabledScreensMap; | ||
78 | QHash<QUrl, int> m_firstScreenForPath; // first available screen for a path | 81 | QHash<QUrl, int> m_firstScreenForPath; // first available screen for a path | ||
79 | QHash<QUrl, int> m_screensPerPath; // screen per registered path | 82 | QHash<QUrl, int> m_screensPerPath; // screen per registered path | ||
80 | QVector<int> m_availableScreens; | 83 | QVector<int> m_availableScreens; | ||
81 | Plasma::Corona *m_corona = nullptr; | 84 | Plasma::Corona *m_corona = nullptr; | ||
82 | QTimer *m_screenMappingChangedTimer = nullptr; | 85 | QTimer *m_screenMappingChangedTimer = nullptr; | ||
86 | bool m_sharedDesktops = false; // all screens share the same desktops, disabling the screen mapping | ||||
83 | }; | 87 | }; | ||
84 | 88 | | |||
85 | #endif // SCREENMAPPER_H | 89 | #endif // SCREENMAPPER_H |