Changeset View
Changeset View
Standalone View
Standalone View
containmentactions/switchdesktop/desktop.h
1 | /* | 1 | /* | ||
---|---|---|---|---|---|
2 | * Copyright 2009 by Chani Armitage <chani@kde.org> | 2 | * Copyright 2009 by Chani Armitage <chani@kde.org> | ||
3 | * Copyright 2018 by Eike Hein <hein@kde.org> | ||||
3 | * | 4 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | 5 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU Library General Public License as | 6 | * it under the terms of the GNU Library General Public License as | ||
6 | * published by the Free Software Foundation; either version 2, or | 7 | * published by the Free Software Foundation; either version 2, or | ||
7 | * (at your option) any later version. | 8 | * (at your option) any later version. | ||
8 | * | 9 | * | ||
9 | * This program is distributed in the hope that it will be useful, | 10 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details | 13 | * GNU General Public License for more details | ||
13 | * | 14 | * | ||
14 | * You should have received a copy of the GNU Library General Public | 15 | * You should have received a copy of the GNU Library General Public | ||
15 | * License along with this program; if not, write to the | 16 | * License along with this program; if not, write to the | ||
16 | * Free Software Foundation, Inc., | 17 | * Free Software Foundation, Inc., | ||
17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
18 | */ | 19 | */ | ||
19 | 20 | | |||
20 | #ifndef SWITCHDESKTOP_HEADER | 21 | #ifndef SWITCHDESKTOP_HEADER | ||
21 | #define SWITCHDESKTOP_HEADER | 22 | #define SWITCHDESKTOP_HEADER | ||
22 | 23 | | |||
23 | #include <plasma/containmentactions.h> | 24 | #include <plasma/containmentactions.h> | ||
24 | 25 | | |||
25 | class QAction; | 26 | class QAction; | ||
26 | 27 | | |||
28 | namespace TaskManager { | ||||
29 | class VirtualDesktopInfo; | ||||
30 | } | ||||
31 | | ||||
27 | class SwitchDesktop : public Plasma::ContainmentActions | 32 | class SwitchDesktop : public Plasma::ContainmentActions | ||
28 | { | 33 | { | ||
29 | Q_OBJECT | 34 | Q_OBJECT | ||
30 | public: | 35 | public: | ||
31 | SwitchDesktop(QObject* parent, const QVariantList& args); | 36 | SwitchDesktop(QObject* parent, const QVariantList& args); | ||
32 | ~SwitchDesktop() override; | 37 | ~SwitchDesktop() override; | ||
33 | 38 | | |||
34 | QList<QAction*> contextualActions() override; | 39 | QList<QAction*> contextualActions() override; | ||
35 | 40 | | |||
36 | void performNextAction() override; | 41 | void performNextAction() override; | ||
37 | void performPreviousAction() override; | 42 | void performPreviousAction() override; | ||
38 | 43 | | |||
39 | private Q_SLOTS: | 44 | private Q_SLOTS: | ||
40 | void switchTo(); | 45 | void switchTo(); | ||
41 | 46 | | |||
42 | private: | 47 | private: | ||
43 | QHash<int, QAction *> m_actions; | 48 | QHash<int, QAction *> m_actions; | ||
49 | TaskManager::VirtualDesktopInfo* m_virtualDesktopInfo; | ||||
44 | }; | 50 | }; | ||
45 | 51 | | |||
46 | 52 | | |||
47 | #endif | 53 | #endif |