File indexing completed on 2024-06-23 05:49:06
0001 /* 0002 This file is part of the Okteta Kasten Framework, made within the KDE community. 0003 0004 SPDX-FileCopyrightText: 2009, 2010 Alex Richardson <alex.richardson@gmx.de> 0005 0006 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0007 */ 0008 0009 #ifndef KASTEN_STRUCTURESMANAGER_HPP 0010 #define KASTEN_STRUCTURESMANAGER_HPP 0011 0012 // tool 0013 #include "structuredefinitionfile.hpp" 0014 // KF 0015 #include <KSharedConfig> 0016 // Qt 0017 #include <QStringList> 0018 #include <QDir> 0019 0020 class StructureMetaData; 0021 0022 namespace Kasten { 0023 0024 class StructuresManager : public QObject 0025 { 0026 Q_OBJECT 0027 0028 public: 0029 explicit StructuresManager(QObject* parent = nullptr); 0030 ~StructuresManager() override; 0031 0032 public Q_SLOTS: 0033 void reloadPaths(); 0034 0035 public: 0036 QMap<QString, StructureDefinitionFile*> structureDefs() const; 0037 0038 KSharedConfig::Ptr config() const; 0039 0040 StructureDefinitionFile* definition(const QString& pluginName) const; 0041 0042 private: 0043 void addStructDef(const StructureMetaData& metaData); 0044 0045 private: 0046 QMap<QString, StructureDefinitionFile*> mDefs; 0047 QStringList mLoadedFiles; 0048 KSharedConfig::Ptr mConfig; 0049 }; 0050 0051 } 0052 0053 #endif