Changeset View
Changeset View
Standalone View
Standalone View
kded/serializer.cpp
Show First 20 Lines • Show All 250 Lines • ▼ Show 20 Line(s) | 234 | Q_FOREACH(KScreen::OutputPtr output, outputs) { | |||
---|---|---|---|---|---|
251 | } | 251 | } | ||
252 | 252 | | |||
253 | const QVariantMap posInfo = info[QStringLiteral("pos")].toMap(); | 253 | const QVariantMap posInfo = info[QStringLiteral("pos")].toMap(); | ||
254 | QPoint point(posInfo[QStringLiteral("x")].toInt(), posInfo[QStringLiteral("y")].toInt()); | 254 | QPoint point(posInfo[QStringLiteral("x")].toInt(), posInfo[QStringLiteral("y")].toInt()); | ||
255 | output->setPos(point); | 255 | output->setPos(point); | ||
256 | output->setPrimary(info[QStringLiteral("primary")].toBool()); | 256 | output->setPrimary(info[QStringLiteral("primary")].toBool()); | ||
257 | output->setEnabled(info[QStringLiteral("enabled")].toBool()); | 257 | output->setEnabled(info[QStringLiteral("enabled")].toBool()); | ||
258 | output->setRotation(static_cast<KScreen::Output::Rotation>(info[QStringLiteral("rotation")].toInt())); | 258 | output->setRotation(static_cast<KScreen::Output::Rotation>(info[QStringLiteral("rotation")].toInt())); | ||
259 | output->setScale(info.value(QStringLiteral("scale"), 1).toInt()); | ||||
259 | 260 | | |||
260 | const QVariantMap modeInfo = info[QStringLiteral("mode")].toMap(); | 261 | const QVariantMap modeInfo = info[QStringLiteral("mode")].toMap(); | ||
261 | const QVariantMap modeSize = modeInfo[QStringLiteral("size")].toMap(); | 262 | const QVariantMap modeSize = modeInfo[QStringLiteral("size")].toMap(); | ||
262 | const QSize size = QSize(modeSize[QStringLiteral("width")].toInt(), modeSize[QStringLiteral("height")].toInt()); | 263 | const QSize size = QSize(modeSize[QStringLiteral("width")].toInt(), modeSize[QStringLiteral("height")].toInt()); | ||
263 | 264 | | |||
264 | qCDebug(KSCREEN_KDED) << "Finding a mode for" << size << "@" << modeInfo[QStringLiteral("refresh")].toFloat(); | 265 | qCDebug(KSCREEN_KDED) << "Finding a mode for" << size << "@" << modeInfo[QStringLiteral("refresh")].toFloat(); | ||
265 | 266 | | |||
266 | KScreen::ModeList modes = output->modes(); | 267 | KScreen::ModeList modes = output->modes(); | ||
▲ Show 20 Lines • Show All 61 Lines • Show Last 20 Lines |