File indexing completed on 2024-05-12 17:08:58

0001 /*
0002     SPDX-FileCopyrightText: 2009 Chani Armitage <chani@kde.org>
0003     SPDX-FileCopyrightText: 2018 Eike Hein <hein@kde.org>
0004 
0005     SPDX-License-Identifier: LGPL-2.0-or-later
0006 */
0007 
0008 #pragma once
0009 
0010 #include <QHash>
0011 #include <plasma/containmentactions.h>
0012 
0013 class QAction;
0014 
0015 namespace TaskManager
0016 {
0017 class VirtualDesktopInfo;
0018 }
0019 
0020 class SwitchDesktop : public Plasma::ContainmentActions
0021 {
0022     Q_OBJECT
0023 public:
0024     SwitchDesktop(QObject *parent, const QVariantList &args);
0025     ~SwitchDesktop() override;
0026 
0027     QList<QAction *> contextualActions() override;
0028 
0029     void performNextAction() override;
0030     void performPreviousAction() override;
0031 
0032 private Q_SLOTS:
0033     void switchTo();
0034 
0035 private:
0036     QHash<int, QAction *> m_actions;
0037     TaskManager::VirtualDesktopInfo *const m_virtualDesktopInfo;
0038 };