Changeset View
Changeset View
Standalone View
Standalone View
screens.cpp
Show First 20 Lines • Show All 223 Lines • ▼ Show 20 Line(s) | 222 | { | |||
---|---|---|---|---|---|
224 | return Qt::PrimaryOrientation; | 224 | return Qt::PrimaryOrientation; | ||
225 | } | 225 | } | ||
226 | 226 | | |||
227 | void Screens::setConfig(KSharedConfig::Ptr config) | 227 | void Screens::setConfig(KSharedConfig::Ptr config) | ||
228 | { | 228 | { | ||
229 | m_config = config; | 229 | m_config = config; | ||
230 | } | 230 | } | ||
231 | 231 | | |||
232 | int Screens::physicalDpiX(int screen) const | ||||
233 | { | ||||
234 | return size(screen).width() / physicalSize(screen).width() * qreal(25.4); | ||||
235 | } | ||||
236 | | ||||
237 | int Screens::physicalDpiY(int screen) const | ||||
238 | { | ||||
239 | return size(screen).height() / physicalSize(screen).height() * qreal(25.4); | ||||
240 | } | ||||
241 | | ||||
232 | } // namespace | 242 | } // namespace |