Changeset View
Changeset View
Standalone View
Standalone View
src/configserializer.cpp
Show First 20 Lines • Show All 86 Lines • ▼ Show 20 Line(s) | 75 | { | |||
---|---|---|---|---|---|
87 | obj[QLatin1String("preferredModes")] = serializeList(output->preferredModes()); | 87 | obj[QLatin1String("preferredModes")] = serializeList(output->preferredModes()); | ||
88 | obj[QLatin1String("connected")] = output->isConnected(); | 88 | obj[QLatin1String("connected")] = output->isConnected(); | ||
89 | obj[QLatin1String("followPreferredMode")] = output->followPreferredMode(); | 89 | obj[QLatin1String("followPreferredMode")] = output->followPreferredMode(); | ||
90 | obj[QLatin1String("enabled")] = output->isEnabled(); | 90 | obj[QLatin1String("enabled")] = output->isEnabled(); | ||
91 | obj[QLatin1String("primary")] = output->isPrimary(); | 91 | obj[QLatin1String("primary")] = output->isPrimary(); | ||
92 | obj[QLatin1String("clones")] = serializeList(output->clones()); | 92 | obj[QLatin1String("clones")] = serializeList(output->clones()); | ||
93 | //obj[QLatin1String("edid")] = output->edid()->raw(); | 93 | //obj[QLatin1String("edid")] = output->edid()->raw(); | ||
94 | obj[QLatin1String("sizeMM")] = serializeSize(output->sizeMm()); | 94 | obj[QLatin1String("sizeMM")] = serializeSize(output->sizeMm()); | ||
95 | obj[QLatin1String("replicationSource")] = output->replicationSource(); | ||||
95 | 96 | | |||
96 | QJsonArray modes; | 97 | QJsonArray modes; | ||
97 | Q_FOREACH (const ModePtr &mode, output->modes()) { | 98 | Q_FOREACH (const ModePtr &mode, output->modes()) { | ||
98 | modes.append(serializeMode(mode)); | 99 | modes.append(serializeMode(mode)); | ||
99 | } | 100 | } | ||
100 | obj[QLatin1String("modes")] = modes; | 101 | obj[QLatin1String("modes")] = modes; | ||
101 | 102 | | |||
102 | return obj; | 103 | return obj; | ||
▲ Show 20 Lines • Show All 143 Lines • ▼ Show 20 Line(s) | 220 | while (!arg.atEnd()) { | |||
246 | } else if (key == QLatin1String("followPreferredMode")) { | 247 | } else if (key == QLatin1String("followPreferredMode")) { | ||
247 | output->setFollowPreferredMode(value.toBool()); | 248 | output->setFollowPreferredMode(value.toBool()); | ||
248 | } else if (key == QLatin1String("enabled")) { | 249 | } else if (key == QLatin1String("enabled")) { | ||
249 | output->setEnabled(value.toBool()); | 250 | output->setEnabled(value.toBool()); | ||
250 | } else if (key == QLatin1String("primary")) { | 251 | } else if (key == QLatin1String("primary")) { | ||
251 | output->setPrimary(value.toBool()); | 252 | output->setPrimary(value.toBool()); | ||
252 | } else if (key == QLatin1String("clones")) { | 253 | } else if (key == QLatin1String("clones")) { | ||
253 | output->setClones(deserializeList<int>(value.value<QDBusArgument>())); | 254 | output->setClones(deserializeList<int>(value.value<QDBusArgument>())); | ||
255 | } else if (key == QLatin1String("replicationSource")) { | ||||
256 | output->setReplicationSource(value.toInt()); | ||||
254 | } else if (key == QLatin1String("sizeMM")) { | 257 | } else if (key == QLatin1String("sizeMM")) { | ||
255 | output->setSizeMm(deserializeSize(value.value<QDBusArgument>())); | 258 | output->setSizeMm(deserializeSize(value.value<QDBusArgument>())); | ||
256 | } else if (key == QLatin1String("modes")) { | 259 | } else if (key == QLatin1String("modes")) { | ||
257 | const QDBusArgument arg = value.value<QDBusArgument>(); | 260 | const QDBusArgument arg = value.value<QDBusArgument>(); | ||
258 | ModeList modes; | 261 | ModeList modes; | ||
259 | arg.beginArray(); | 262 | arg.beginArray(); | ||
260 | while (!arg.atEnd()) { | 263 | while (!arg.atEnd()) { | ||
261 | QVariant value; | 264 | QVariant value; | ||
▲ Show 20 Lines • Show All 77 Lines • Show Last 20 Lines |