Changeset View
Changeset View
Standalone View
Standalone View
screens.h
Show First 20 Lines • Show All 151 Lines • ▼ Show 20 Line(s) | 47 | public: | |||
---|---|---|---|---|---|
152 | * base implementation. The implementing subclass can use this to get notifications about | 152 | * base implementation. The implementing subclass can use this to get notifications about | ||
153 | * changes of the orientation and current orientation. There is no need to enable/disable it, | 153 | * changes of the orientation and current orientation. There is no need to enable/disable it, | ||
154 | * that is done by the base implementation | 154 | * that is done by the base implementation | ||
155 | **/ | 155 | **/ | ||
156 | OrientationSensor *orientationSensor() const { | 156 | OrientationSensor *orientationSensor() const { | ||
157 | return m_orientationSensor; | 157 | return m_orientationSensor; | ||
158 | } | 158 | } | ||
159 | 159 | | |||
160 | virtual int rotation(int screen) const = 0; | ||||
161 | | ||||
160 | public Q_SLOTS: | 162 | public Q_SLOTS: | ||
161 | void reconfigure(); | 163 | void reconfigure(); | ||
162 | 164 | | |||
163 | Q_SIGNALS: | 165 | Q_SIGNALS: | ||
164 | void countChanged(int previousCount, int newCount); | 166 | void countChanged(int previousCount, int newCount); | ||
165 | /** | 167 | /** | ||
166 | * Emitted whenever the screens are changed either count or geometry. | 168 | * Emitted whenever the screens are changed either count or geometry. | ||
167 | **/ | 169 | **/ | ||
▲ Show 20 Lines • Show All 57 Lines • ▼ Show 20 Line(s) | 225 | public: | |||
225 | virtual ~BasicScreens(); | 227 | virtual ~BasicScreens(); | ||
226 | 228 | | |||
227 | void init() override; | 229 | void init() override; | ||
228 | QRect geometry(int screen) const override; | 230 | QRect geometry(int screen) const override; | ||
229 | int number(const QPoint &pos) const override; | 231 | int number(const QPoint &pos) const override; | ||
230 | QSize size(int screen) const override; | 232 | QSize size(int screen) const override; | ||
231 | qreal scale(int screen) const override; | 233 | qreal scale(int screen) const override; | ||
232 | void updateCount() override; | 234 | void updateCount() override; | ||
235 | int rotation(int screen) const override; | ||||
233 | 236 | | |||
234 | private: | 237 | private: | ||
235 | Platform *m_backend; | 238 | Platform *m_backend; | ||
236 | QVector<QRect> m_geometries; | 239 | QVector<QRect> m_geometries; | ||
237 | QVector<qreal> m_scales; | 240 | QVector<qreal> m_scales; | ||
241 | QVector<int> m_rotations; | ||||
238 | }; | 242 | }; | ||
239 | 243 | | |||
240 | inline | 244 | inline | ||
241 | int Screens::count() const | 245 | int Screens::count() const | ||
242 | { | 246 | { | ||
243 | return m_count; | 247 | return m_count; | ||
244 | } | 248 | } | ||
245 | 249 | | |||
Show All 33 Lines |