File indexing completed on 2025-01-05 05:23:47
0001 /* 0002 This file is part of the Okteta Kasten Framework, made within the KDE community. 0003 0004 SPDX-FileCopyrightText: 2009 Friedrich W. H. Kossebau <kossebau@kde.org> 0005 SPDX-FileCopyrightText: 2009, 2012 Alex Richardson <alex.richardson@gmx.de> 0006 0007 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0008 */ 0009 0010 #ifndef KASTEN_STRUCTURESMANAGERVIEW_HPP 0011 #define KASTEN_STRUCTURESMANAGERVIEW_HPP 0012 0013 // KF 0014 #include <KNSCore/EntryInternal> 0015 // Qt 0016 #include <QWidget> 0017 0018 class StructuresSelector; 0019 class QPushButton; 0020 0021 namespace KNSWidgets { 0022 class Button; 0023 } 0024 namespace Kasten { 0025 class StructuresManager; 0026 class StructuresTool; 0027 } 0028 0029 class StructuresManagerView : public QWidget 0030 { 0031 Q_OBJECT 0032 Q_PROPERTY(QStringList values READ values WRITE setValues NOTIFY changed USER true) 0033 0034 public: 0035 explicit StructuresManagerView(Kasten::StructuresTool* tool, QWidget* parent = nullptr); 0036 0037 ~StructuresManagerView() override; 0038 0039 public: 0040 QStringList values() const; 0041 0042 public Q_SLOTS: 0043 void setValues(const QStringList& values); 0044 0045 Q_SIGNALS: 0046 void changed(); 0047 0048 private Q_SLOTS: 0049 void onGetNewStructuresClicked(const QList<KNSCore::EntryInternal>& changedEntries); 0050 void advancedSelection(); 0051 void setEnabledStructures(const QStringList& enabledStructures); 0052 0053 private: 0054 Kasten::StructuresTool* mTool; 0055 0056 KNSWidgets::Button* mGetNewStructuresButton; 0057 QPushButton* mAdvancedSelectionButton; 0058 StructuresSelector* mStructuresSelector = nullptr; 0059 }; 0060 0061 #endif