Changeset View
Changeset View
Standalone View
Standalone View
containmentactions/switchwindow/switch.cpp
Show All 28 Lines | |||||
29 | 29 | | |||
30 | #include <Plasma/DataEngine> | 30 | #include <Plasma/DataEngine> | ||
31 | #include <Plasma/Service> | 31 | #include <Plasma/Service> | ||
32 | 32 | | |||
33 | #include "abstracttasksmodel.h" | 33 | #include "abstracttasksmodel.h" | ||
34 | 34 | | |||
35 | SwitchWindow::SwitchWindow(QObject *parent, const QVariantList &args) | 35 | SwitchWindow::SwitchWindow(QObject *parent, const QVariantList &args) | ||
36 | : Plasma::ContainmentActions(parent, args), | 36 | : Plasma::ContainmentActions(parent, args), | ||
37 | m_activityInfo(new TaskManager::ActivityInfo(this)), | ||||
37 | m_tasksModel(new TaskManager::TasksModel(this)), | 38 | m_tasksModel(new TaskManager::TasksModel(this)), | ||
38 | m_mode(AllFlat), | 39 | m_mode(AllFlat), | ||
39 | m_clearOrderTimer(0) | 40 | m_clearOrderTimer(0) | ||
40 | { | 41 | { | ||
41 | m_tasksModel->setGroupMode(TaskManager::TasksModel::GroupDisabled); | 42 | m_tasksModel->setGroupMode(TaskManager::TasksModel::GroupDisabled); | ||
43 | | ||||
44 | m_tasksModel->setActivity(m_activityInfo->currentActivity()); | ||||
45 | m_tasksModel->setFilterByActivity(true); | ||||
46 | connect(m_activityInfo, &TaskManager::ActivityInfo::currentActivityChanged, | ||||
47 | this, [this]() { m_tasksModel->setActivity(m_activityInfo->currentActivity()); }); | ||||
42 | } | 48 | } | ||
43 | 49 | | |||
44 | SwitchWindow::~SwitchWindow() | 50 | SwitchWindow::~SwitchWindow() | ||
45 | { | 51 | { | ||
46 | } | 52 | } | ||
47 | 53 | | |||
48 | void SwitchWindow::restore(const KConfigGroup &config) | 54 | void SwitchWindow::restore(const KConfigGroup &config) | ||
49 | { | 55 | { | ||
▲ Show 20 Lines • Show All 213 Lines • Show Last 20 Lines |