Changeset View
Changeset View
Standalone View
Standalone View
screens.h
Show First 20 Lines • Show All 50 Lines • ▼ Show 20 Line(s) | 47 | public: | |||
---|---|---|---|---|---|
51 | **/ | 51 | **/ | ||
52 | void setConfig(KSharedConfig::Ptr config); | 52 | void setConfig(KSharedConfig::Ptr config); | ||
53 | int count() const; | 53 | int count() const; | ||
54 | int current() const; | 54 | int current() const; | ||
55 | void setCurrent(int current); | 55 | void setCurrent(int current); | ||
56 | /** | 56 | /** | ||
57 | * Called e.g. when a user clicks on a window, set current screen to be the screen | 57 | * Called e.g. when a user clicks on a window, set current screen to be the screen | ||
58 | * where the click occurred | 58 | * where the click occurred | ||
59 | */ | 59 | **/ | ||
60 | void setCurrent(const QPoint &pos); | 60 | void setCurrent(const QPoint &pos); | ||
61 | /** | 61 | /** | ||
62 | * Check whether a client moved completely out of what's considered the current screen, | 62 | * Check whether a client moved completely out of what's considered the current screen, | ||
63 | * if yes, set a new active screen. | 63 | * if yes, set a new active screen. | ||
64 | */ | 64 | **/ | ||
65 | void setCurrent(const AbstractClient *c); | 65 | void setCurrent(const AbstractClient *c); | ||
66 | bool isCurrentFollowsMouse() const; | 66 | bool isCurrentFollowsMouse() const; | ||
67 | void setCurrentFollowsMouse(bool follows); | 67 | void setCurrentFollowsMouse(bool follows); | ||
68 | virtual QRect geometry(int screen) const = 0; | 68 | virtual QRect geometry(int screen) const = 0; | ||
69 | /** | 69 | /** | ||
70 | * The bounding geometry of all screens combined. Overlapping areas | 70 | * The bounding geometry of all screens combined. Overlapping areas | ||
71 | * are not counted multiple times. | 71 | * are not counted multiple times. | ||
72 | * @see geometryChanged() | 72 | * @see geometryChanged() | ||
73 | **/ | 73 | **/ | ||
74 | QRect geometry() const; | 74 | QRect geometry() const; | ||
75 | /** | 75 | /** | ||
76 | * The output name of the screen (usually eg. LVDS-1, VGA-0 or DVI-I-1 etc.) | 76 | * The output name of the screen (usually eg. LVDS-1, VGA-0 or DVI-I-1 etc.) | ||
77 | */ | 77 | **/ | ||
78 | virtual QString name(int screen) const; | 78 | virtual QString name(int screen) const; | ||
79 | /** | 79 | /** | ||
80 | * @returns current refreshrate of the @p screen. | 80 | * @returns current refreshrate of the @p screen. | ||
81 | **/ | 81 | **/ | ||
82 | virtual float refreshRate(int screen) const; | 82 | virtual float refreshRate(int screen) const; | ||
83 | /** | 83 | /** | ||
84 | * @returns size of the @p screen. | 84 | * @returns size of the @p screen. | ||
85 | * | 85 | * | ||
86 | * To get the size of all screens combined use size(). | 86 | * To get the size of all screens combined use size(). | ||
87 | * @see size() | 87 | * @see size() | ||
88 | **/ | 88 | **/ | ||
89 | virtual QSize size(int screen) const = 0; | 89 | virtual QSize size(int screen) const = 0; | ||
90 | 90 | | |||
91 | /** | 91 | /** | ||
92 | * The highest scale() of all connected screens | 92 | * The highest scale() of all connected screens | ||
93 | * for use when deciding what scale to load global assets at | 93 | * for use when deciding what scale to load global assets at | ||
94 | * Similar to QGuiApplication::scale | 94 | * Similar to QGuiApplication::scale | ||
95 | * @see scale | 95 | * @see scale | ||
96 | */ | 96 | **/ | ||
97 | qreal maxScale() const; | 97 | qreal maxScale() const; | ||
98 | 98 | | |||
99 | /* | 99 | /** | ||
100 | * The output scale for this display, for use by high DPI displays | 100 | * The output scale for this display, for use by high DPI displays | ||
101 | */ | 101 | **/ | ||
102 | virtual qreal scale(int screen) const; | 102 | virtual qreal scale(int screen) const; | ||
103 | /** | 103 | /** | ||
104 | * The bounding size of all screens combined. Overlapping areas | 104 | * The bounding size of all screens combined. Overlapping areas | ||
105 | * are not counted multiple times. | 105 | * are not counted multiple times. | ||
106 | * | 106 | * | ||
107 | * @see geometry() | 107 | * @see geometry() | ||
108 | * @see sizeChanged() | 108 | * @see sizeChanged() | ||
109 | **/ | 109 | **/ | ||
▲ Show 20 Lines • Show All 67 Lines • ▼ Show 20 Line(s) | 163 | Q_SIGNALS: | |||
177 | * Emitted when the size of all screens combined changes. | 177 | * Emitted when the size of all screens combined changes. | ||
178 | * Not emitted when the size of an individual screen changes. | 178 | * Not emitted when the size of an individual screen changes. | ||
179 | * @see size() | 179 | * @see size() | ||
180 | **/ | 180 | **/ | ||
181 | void sizeChanged(); | 181 | void sizeChanged(); | ||
182 | /** | 182 | /** | ||
183 | * Emitted when the maximum scale of all attached screens changes | 183 | * Emitted when the maximum scale of all attached screens changes | ||
184 | * @see maxScale | 184 | * @see maxScale | ||
185 | */ | 185 | **/ | ||
186 | void maxScaleChanged(); | 186 | void maxScaleChanged(); | ||
187 | 187 | | |||
188 | protected Q_SLOTS: | 188 | protected Q_SLOTS: | ||
189 | void setCount(int count); | 189 | void setCount(int count); | ||
190 | void startChangedTimer(); | 190 | void startChangedTimer(); | ||
191 | virtual void updateCount() = 0; | 191 | virtual void updateCount() = 0; | ||
192 | 192 | | |||
193 | protected: | 193 | protected: | ||
▲ Show 20 Lines • Show All 85 Lines • Show Last 20 Lines |