Changeset View
Changeset View
Standalone View
Standalone View
screens.h
Show First 20 Lines • Show All 80 Lines • ▼ Show 20 Line(s) | 46 | public: | |||
---|---|---|---|---|---|
81 | virtual float refreshRate(int screen) const; | 81 | virtual float refreshRate(int screen) const; | ||
82 | /** | 82 | /** | ||
83 | * @returns size of the @p screen. | 83 | * @returns size of the @p screen. | ||
84 | * | 84 | * | ||
85 | * To get the size of all screens combined use size(). | 85 | * To get the size of all screens combined use size(). | ||
86 | * @see size() | 86 | * @see size() | ||
87 | **/ | 87 | **/ | ||
88 | virtual QSize size(int screen) const = 0; | 88 | virtual QSize size(int screen) const = 0; | ||
89 | | ||||
90 | /* | ||||
91 | * The output scale for this display, for use by high DPI displays | ||||
92 | */ | ||||
93 | virtual qreal scale(int screen) const; | ||||
89 | /** | 94 | /** | ||
90 | * The bounding size of all screens combined. Overlapping areas | 95 | * The bounding size of all screens combined. Overlapping areas | ||
91 | * are not counted multiple times. | 96 | * are not counted multiple times. | ||
92 | * | 97 | * | ||
93 | * @see geometry() | 98 | * @see geometry() | ||
94 | * @see sizeChanged() | 99 | * @see sizeChanged() | ||
95 | **/ | 100 | **/ | ||
96 | QSize size() const; | 101 | QSize size() const; | ||
▲ Show 20 Lines • Show All 62 Lines • ▼ Show 20 Line(s) | |||||
159 | public: | 164 | public: | ||
160 | BasicScreens(Platform *backend, QObject *parent = nullptr); | 165 | BasicScreens(Platform *backend, QObject *parent = nullptr); | ||
161 | virtual ~BasicScreens(); | 166 | virtual ~BasicScreens(); | ||
162 | 167 | | |||
163 | void init() override; | 168 | void init() override; | ||
164 | QRect geometry(int screen) const override; | 169 | QRect geometry(int screen) const override; | ||
165 | int number(const QPoint &pos) const override; | 170 | int number(const QPoint &pos) const override; | ||
166 | QSize size(int screen) const override; | 171 | QSize size(int screen) const override; | ||
172 | qreal scale(int screen) const override; | ||||
167 | void updateCount() override; | 173 | void updateCount() override; | ||
168 | 174 | | |||
169 | private: | 175 | private: | ||
170 | Platform *m_backend; | 176 | Platform *m_backend; | ||
171 | QVector<QRect> m_geometries; | 177 | QVector<QRect> m_geometries; | ||
178 | QVector<qreal> m_scales; | ||||
172 | }; | 179 | }; | ||
173 | 180 | | |||
174 | inline | 181 | inline | ||
175 | void Screens::setConfig(KSharedConfig::Ptr config) | 182 | void Screens::setConfig(KSharedConfig::Ptr config) | ||
176 | { | 183 | { | ||
177 | m_config = config; | 184 | m_config = config; | ||
178 | } | 185 | } | ||
179 | 186 | | |||
Show All 39 Lines |