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 | | ||||
graesslin: Unrelated newline | |||||
84 | QObject::connect(window, &PlasmaWindow::activeChanged, q, | 85 | QObject::connect(window, &PlasmaWindow::activeChanged, q, | ||
85 | [window, this] { this->dataChanged(window, IsActive); } | 86 | [window, this] { this->dataChanged(window, IsActive); } | ||
graesslin: I consider it as impossible that the PID changes. | |||||
86 | ); | 87 | ); | ||
87 | 88 | | |||
88 | QObject::connect(window, &PlasmaWindow::fullscreenableChanged, q, | 89 | QObject::connect(window, &PlasmaWindow::fullscreenableChanged, q, | ||
89 | [window, this] { this->dataChanged(window, IsFullscreenable); } | 90 | [window, this] { this->dataChanged(window, IsFullscreenable); } | ||
90 | ); | 91 | ); | ||
91 | 92 | | |||
92 | QObject::connect(window, &PlasmaWindow::fullscreenChanged, q, | 93 | QObject::connect(window, &PlasmaWindow::fullscreenChanged, q, | ||
93 | [window, this] { this->dataChanged(window, IsFullscreen); } | 94 | [window, this] { this->dataChanged(window, IsFullscreen); } | ||
▲ Show 20 Lines • Show All 126 Lines • ▼ Show 20 Line(s) | 216 | { | |||
220 | const PlasmaWindow *window = d->windows.at(index.row()); | 221 | const PlasmaWindow *window = d->windows.at(index.row()); | ||
221 | 222 | | |||
222 | if (role == Qt::DisplayRole) { | 223 | if (role == Qt::DisplayRole) { | ||
223 | return window->title(); | 224 | return window->title(); | ||
224 | } else if (role == Qt::DecorationRole) { | 225 | } else if (role == Qt::DecorationRole) { | ||
225 | return window->icon(); | 226 | return window->icon(); | ||
226 | } else if (role == AppId) { | 227 | } else if (role == AppId) { | ||
227 | return window->appId(); | 228 | return window->appId(); | ||
229 | } else if (role == Pid) { | ||||
230 | return window->pid(); | ||||
228 | } else if (role == IsActive) { | 231 | } else if (role == IsActive) { | ||
229 | return window->isActive(); | 232 | return window->isActive(); | ||
230 | } else if (role == IsFullscreenable) { | 233 | } else if (role == IsFullscreenable) { | ||
231 | return window->isFullscreenable(); | 234 | return window->isFullscreenable(); | ||
232 | } else if (role == IsFullscreen) { | 235 | } else if (role == IsFullscreen) { | ||
233 | return window->isFullscreen(); | 236 | return window->isFullscreen(); | ||
234 | } else if (role == IsMaximizable) { | 237 | } else if (role == IsMaximizable) { | ||
235 | return window->isMaximizeable(); | 238 | return window->isMaximizeable(); | ||
▲ Show 20 Lines • Show All 112 Lines • Show Last 20 Lines |
Unrelated newline