Changeset View
Changeset View
Standalone View
Standalone View
kcm/kcm.cpp
Show First 20 Lines • Show All 73 Lines • ▼ Show 20 Line(s) | 71 | { | |||
---|---|---|---|---|---|
74 | if (op->hasError()) { | 74 | if (op->hasError()) { | ||
75 | m_config.reset(); | 75 | m_config.reset(); | ||
76 | setBackendError(true); | 76 | setBackendError(true); | ||
77 | return; | 77 | return; | ||
78 | } | 78 | } | ||
79 | m_config->setConfig(qobject_cast<GetConfigOperation*>(op)->config()); | 79 | m_config->setConfig(qobject_cast<GetConfigOperation*>(op)->config()); | ||
80 | Q_EMIT perOutputScalingChanged(); | 80 | Q_EMIT perOutputScalingChanged(); | ||
81 | Q_EMIT primaryOutputSupportedChanged(); | 81 | Q_EMIT primaryOutputSupportedChanged(); | ||
82 | Q_EMIT outputReplicationSupportedChanged(); | ||||
82 | } | 83 | } | ||
83 | 84 | | |||
84 | void KCMKScreen::forceSave() | 85 | void KCMKScreen::forceSave() | ||
85 | { | 86 | { | ||
86 | doSave(true); | 87 | doSave(true); | ||
87 | } | 88 | } | ||
88 | 89 | | |||
89 | void KCMKScreen::save() | 90 | void KCMKScreen::save() | ||
Show All 20 Lines | 110 | qCDebug(KSCREEN_KCM) << output->name() << output->id() | |||
110 | << output.data() << "\n" | 111 | << output.data() << "\n" | ||
111 | << " Connected:" << output->isConnected() << "\n" | 112 | << " Connected:" << output->isConnected() << "\n" | ||
112 | << " Enabled:" << output->isEnabled() << "\n" | 113 | << " Enabled:" << output->isEnabled() << "\n" | ||
113 | << " Primary:" << output->isPrimary() << "\n" | 114 | << " Primary:" << output->isPrimary() << "\n" | ||
114 | << " Rotation:" << output->rotation() << "\n" | 115 | << " Rotation:" << output->rotation() << "\n" | ||
115 | << " Mode:" | 116 | << " Mode:" | ||
116 | << (mode ? mode->name() : QStringLiteral("unknown")) | 117 | << (mode ? mode->name() : QStringLiteral("unknown")) | ||
117 | << "@" << (mode ? mode->refreshRate() : 0.0) << "Hz" << "\n" | 118 | << "@" << (mode ? mode->refreshRate() : 0.0) << "Hz" << "\n" | ||
118 | << " Position:" << output->pos().x() << "x" << output->pos().y(); | 119 | << " Position:" << output->pos().x() << "x" << output->pos().y() << "\n" | ||
120 | << " Replicates:" << (output->replicationSource() == 0 ? "no" : "yes"); | ||||
119 | } | 121 | } | ||
120 | 122 | | |||
121 | if (!atLeastOneEnabledOutput && !force) { | 123 | if (!atLeastOneEnabledOutput && !force) { | ||
122 | Q_EMIT dangerousSave(); | 124 | Q_EMIT dangerousSave(); | ||
123 | m_config->checkNeedsSave(); | 125 | m_config->checkNeedsSave(); | ||
124 | return; | 126 | return; | ||
125 | } | 127 | } | ||
126 | 128 | | |||
▲ Show 20 Lines • Show All 88 Lines • ▼ Show 20 Line(s) | |||||
215 | { | 217 | { | ||
216 | if (!m_config || !m_config->config()) { | 218 | if (!m_config || !m_config->config()) { | ||
217 | return false; | 219 | return false; | ||
218 | } | 220 | } | ||
219 | return m_config->config()->supportedFeatures().testFlag(Config::Feature:: | 221 | return m_config->config()->supportedFeatures().testFlag(Config::Feature:: | ||
220 | PrimaryDisplay); | 222 | PrimaryDisplay); | ||
221 | } | 223 | } | ||
222 | 224 | | |||
225 | bool KCMKScreen::outputReplicationSupported() const | ||||
226 | { | ||||
227 | if (!m_config || !m_config->config()) { | ||||
228 | return false; | ||||
229 | } | ||||
230 | return m_config->config()->supportedFeatures().testFlag(Config::Feature:: | ||||
231 | OutputReplication); | ||||
232 | } | ||||
233 | | ||||
223 | void KCMKScreen::setScreenNormalized(bool normalized) | 234 | void KCMKScreen::setScreenNormalized(bool normalized) | ||
224 | { | 235 | { | ||
225 | if (m_screenNormalized == normalized) { | 236 | if (m_screenNormalized == normalized) { | ||
226 | return; | 237 | return; | ||
227 | } | 238 | } | ||
228 | m_screenNormalized = normalized; | 239 | m_screenNormalized = normalized; | ||
229 | Q_EMIT screenNormalizedChanged(); | 240 | Q_EMIT screenNormalizedChanged(); | ||
230 | } | 241 | } | ||
▲ Show 20 Lines • Show All 150 Lines • Show Last 20 Lines |