File indexing completed on 2025-01-26 05:24:16

0001 /*
0002     This file is part of the Kasten Framework, made within the KDE community.
0003 
0004     SPDX-FileCopyrightText: 2006-2008 Friedrich W. H. Kossebau <kossebau@kde.org>
0005 
0006     SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0007 */
0008 
0009 #ifndef KASTEN_VIEWLISTMENUCONTROLLER_HPP
0010 #define KASTEN_VIEWLISTMENUCONTROLLER_HPP
0011 
0012 // Kasten gui
0013 #include <Kasten/AbstractXmlGuiController>
0014 
0015 class QAction;
0016 class QActionGroup;
0017 class KXMLGUIClient;
0018 
0019 namespace Kasten {
0020 
0021 class ViewManager;
0022 class AbstractGroupedViews;
0023 
0024 class ViewListMenuController : public AbstractXmlGuiController
0025 {
0026     Q_OBJECT
0027 
0028 public:
0029     ViewListMenuController(ViewManager* viewManager, AbstractGroupedViews* groupedViews, KXMLGUIClient* guiClient);
0030 
0031 public: // AbstractXmlGuiController API
0032     void setTargetModel(AbstractModel* model) override;
0033 
0034 private Q_SLOTS:
0035     void updateActions();
0036     void onActionTriggered(QAction* action);
0037 
0038 private:
0039     ViewManager* mViewManager;
0040     AbstractGroupedViews* mGroupedViews;
0041     KXMLGUIClient* mGuiClient;
0042 
0043     QActionGroup* mWindowsActionGroup;
0044 };
0045 
0046 }
0047 
0048 #endif