Changeset View
Changeset View
Standalone View
Standalone View
src/client/plasmawindowmodel.cpp
Show First 20 Lines • Show All 75 Lines • ▼ Show 20 Line(s) | 50 | { | |||
---|---|---|---|---|---|
76 | QObject::connect(window, &PlasmaWindow::iconChanged, q, | 76 | QObject::connect(window, &PlasmaWindow::iconChanged, q, | ||
77 | [window, this] { this->dataChanged(window, Qt::DecorationRole); } | 77 | [window, this] { this->dataChanged(window, Qt::DecorationRole); } | ||
78 | ); | 78 | ); | ||
79 | 79 | | |||
80 | QObject::connect(window, &PlasmaWindow::appIdChanged, q, | 80 | QObject::connect(window, &PlasmaWindow::appIdChanged, q, | ||
81 | [window, this] { this->dataChanged(window, PlasmaWindowModel::AppId); } | 81 | [window, this] { this->dataChanged(window, PlasmaWindowModel::AppId); } | ||
82 | ); | 82 | ); | ||
83 | 83 | | |||
84 | QObject::connect(window, &PlasmaWindow::pidChanged, q, | ||||
graesslin: Unrelated newline | |||||
85 | [window, this] { this->dataChanged(window, PlasmaWindowModel::Pid); } | ||||
86 | ); | ||||
graesslin: I consider it as impossible that the PID changes. | |||||
87 | | ||||
84 | QObject::connect(window, &PlasmaWindow::activeChanged, q, | 88 | QObject::connect(window, &PlasmaWindow::activeChanged, q, | ||
85 | [window, this] { this->dataChanged(window, IsActive); } | 89 | [window, this] { this->dataChanged(window, IsActive); } | ||
86 | ); | 90 | ); | ||
87 | 91 | | |||
88 | QObject::connect(window, &PlasmaWindow::fullscreenableChanged, q, | 92 | QObject::connect(window, &PlasmaWindow::fullscreenableChanged, q, | ||
89 | [window, this] { this->dataChanged(window, IsFullscreenable); } | 93 | [window, this] { this->dataChanged(window, IsFullscreenable); } | ||
90 | ); | 94 | ); | ||
91 | 95 | | |||
▲ Show 20 Lines • Show All 128 Lines • ▼ Show 20 Line(s) | 219 | { | |||
220 | const PlasmaWindow *window = d->windows.at(index.row()); | 224 | const PlasmaWindow *window = d->windows.at(index.row()); | ||
221 | 225 | | |||
222 | if (role == Qt::DisplayRole) { | 226 | if (role == Qt::DisplayRole) { | ||
223 | return window->title(); | 227 | return window->title(); | ||
224 | } else if (role == Qt::DecorationRole) { | 228 | } else if (role == Qt::DecorationRole) { | ||
225 | return window->icon(); | 229 | return window->icon(); | ||
226 | } else if (role == AppId) { | 230 | } else if (role == AppId) { | ||
227 | return window->appId(); | 231 | return window->appId(); | ||
232 | } else if (role == Pid) { | ||||
233 | return window->pid(); | ||||
228 | } else if (role == IsActive) { | 234 | } else if (role == IsActive) { | ||
229 | return window->isActive(); | 235 | return window->isActive(); | ||
230 | } else if (role == IsFullscreenable) { | 236 | } else if (role == IsFullscreenable) { | ||
231 | return window->isFullscreenable(); | 237 | return window->isFullscreenable(); | ||
232 | } else if (role == IsFullscreen) { | 238 | } else if (role == IsFullscreen) { | ||
233 | return window->isFullscreen(); | 239 | return window->isFullscreen(); | ||
234 | } else if (role == IsMaximizable) { | 240 | } else if (role == IsMaximizable) { | ||
235 | return window->isMaximizeable(); | 241 | return window->isMaximizeable(); | ||
▲ Show 20 Lines • Show All 112 Lines • Show Last 20 Lines |
Unrelated newline