Changeset View
Changeset View
Standalone View
Standalone View
app/view/view.cpp
Show First 20 Lines • Show All 189 Lines • ▼ Show 20 Line(s) | 185 | { | |||
---|---|---|---|---|---|
190 | connect(this, &QQuickWindow::widthChanged, this, &View::widthChanged); | 190 | connect(this, &QQuickWindow::widthChanged, this, &View::widthChanged); | ||
191 | connect(this, &QQuickWindow::widthChanged, this, &View::updateAbsDockGeometry); | 191 | connect(this, &QQuickWindow::widthChanged, this, &View::updateAbsDockGeometry); | ||
192 | connect(this, &QQuickWindow::heightChanged, this, &View::heightChanged); | 192 | connect(this, &QQuickWindow::heightChanged, this, &View::heightChanged); | ||
193 | connect(this, &QQuickWindow::heightChanged, this, &View::updateAbsDockGeometry); | 193 | connect(this, &QQuickWindow::heightChanged, this, &View::updateAbsDockGeometry); | ||
194 | 194 | | |||
195 | connect(corona(), &Plasma::Corona::availableScreenRectChanged, this, &View::availableScreenRectChanged); | 195 | connect(corona(), &Plasma::Corona::availableScreenRectChanged, this, &View::availableScreenRectChanged); | ||
196 | 196 | | |||
197 | connect(this, &View::byPassWMChanged, this, &View::saveConfig); | 197 | connect(this, &View::byPassWMChanged, this, &View::saveConfig); | ||
198 | connect(this, &View::onPrimaryChanged, this, &View::saveConfig); | | |||
199 | connect(this, &View::isPreferredForShortcutsChanged, this, &View::saveConfig); | 198 | connect(this, &View::isPreferredForShortcutsChanged, this, &View::saveConfig); | ||
199 | connect(this, &View::onPrimaryChanged, this, &View::saveConfig); | ||||
200 | connect(this, &View::typeChanged, this, &View::saveConfig); | ||||
200 | 201 | | |||
201 | connect(this, SIGNAL(normalThicknessChanged()), corona(), SIGNAL(availableScreenRectChanged())); | 202 | connect(this, SIGNAL(normalThicknessChanged()), corona(), SIGNAL(availableScreenRectChanged())); | ||
202 | 203 | | |||
203 | connect(m_positioner, &ViewPart::Positioner::onHideWindowsForSlidingOut, this, &View::hideWindowsForSlidingOut); | 204 | connect(m_positioner, &ViewPart::Positioner::onHideWindowsForSlidingOut, this, &View::hideWindowsForSlidingOut); | ||
204 | connect(m_positioner, &ViewPart::Positioner::screenGeometryChanged, this, &View::screenGeometryChanged); | 205 | connect(m_positioner, &ViewPart::Positioner::screenGeometryChanged, this, &View::screenGeometryChanged); | ||
205 | connect(m_contextMenu, &ViewPart::ContextMenu::menuChanged, this, &View::contextMenuIsShownChanged); | 206 | connect(m_contextMenu, &ViewPart::ContextMenu::menuChanged, this, &View::contextMenuIsShownChanged); | ||
206 | 207 | | |||
207 | ///!!!!! | 208 | ///!!!!! | ||
▲ Show 20 Lines • Show All 220 Lines • ▼ Show 20 Line(s) | 428 | if (containment()->status() >= Plasma::Types::NeedsAttentionStatus && | |||
428 | containment()->status() != Plasma::Types::HiddenStatus) { | 429 | containment()->status() != Plasma::Types::HiddenStatus) { | ||
429 | setBlockHiding(true); | 430 | setBlockHiding(true); | ||
430 | } else if (!containment()->isUserConfiguring()){ | 431 | } else if (!containment()->isUserConfiguring()){ | ||
431 | setBlockHiding(false); | 432 | setBlockHiding(false); | ||
432 | } | 433 | } | ||
433 | } | 434 | } | ||
434 | } | 435 | } | ||
435 | 436 | | |||
437 | Types::ViewType View::type() const | ||||
438 | { | ||||
439 | return m_type; | ||||
440 | } | ||||
441 | | ||||
442 | void View::setType(Types::ViewType type) | ||||
443 | { | ||||
444 | if (m_type == type) { | ||||
445 | return; | ||||
446 | } | ||||
447 | | ||||
448 | m_type = type; | ||||
449 | emit typeChanged(); | ||||
450 | } | ||||
451 | | ||||
436 | bool View::alternativesIsShown() const | 452 | bool View::alternativesIsShown() const | ||
437 | { | 453 | { | ||
438 | return m_alternativesIsShown; | 454 | return m_alternativesIsShown; | ||
439 | } | 455 | } | ||
440 | 456 | | |||
441 | void View::setAlternativesIsShown(bool show) | 457 | void View::setAlternativesIsShown(bool show) | ||
442 | { | 458 | { | ||
443 | if (m_alternativesIsShown == show) { | 459 | if (m_alternativesIsShown == show) { | ||
▲ Show 20 Lines • Show All 626 Lines • ▼ Show 20 Line(s) | |||||
1070 | { | 1086 | { | ||
1071 | if (!this->containment()) | 1087 | if (!this->containment()) | ||
1072 | return; | 1088 | return; | ||
1073 | 1089 | | |||
1074 | auto config = this->containment()->config(); | 1090 | auto config = this->containment()->config(); | ||
1075 | config.writeEntry("onPrimary", onPrimary()); | 1091 | config.writeEntry("onPrimary", onPrimary()); | ||
1076 | config.writeEntry("byPassWM", byPassWM()); | 1092 | config.writeEntry("byPassWM", byPassWM()); | ||
1077 | config.writeEntry("isPreferredForShortcuts", isPreferredForShortcuts()); | 1093 | config.writeEntry("isPreferredForShortcuts", isPreferredForShortcuts()); | ||
1094 | config.writeEntry("viewType", (int)m_type); | ||||
1078 | config.sync(); | 1095 | config.sync(); | ||
1079 | } | 1096 | } | ||
1080 | 1097 | | |||
1081 | void View::restoreConfig() | 1098 | void View::restoreConfig() | ||
1082 | { | 1099 | { | ||
1083 | if (!this->containment()) | 1100 | if (!this->containment()) | ||
1084 | return; | 1101 | return; | ||
1085 | 1102 | | |||
Show All 14 Lines |