File indexing completed on 2024-05-05 04:39:18
0001 /* 0002 SPDX-FileCopyrightText: 2018 Anton Anikin <anton@anikin.xyz> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef KDEVCLAZY_PROJECT_CONFIG_PAGE_H 0008 #define KDEVCLAZY_PROJECT_CONFIG_PAGE_H 0009 0010 // plugin 0011 #include "ui_projectconfigpage.h" 0012 #include "checksetselection.h" 0013 // KDevPlatform 0014 #include <interfaces/configpage.h> 0015 // Qt 0016 #include <QVector> 0017 0018 namespace KDevelop { class IProject; } 0019 0020 namespace Clazy 0021 { 0022 0023 class Plugin; 0024 class CheckSetSelectionManager; 0025 class ProjectSettings; 0026 0027 class ProjectConfigPage : public KDevelop::ConfigPage 0028 { 0029 Q_OBJECT 0030 0031 public: 0032 ProjectConfigPage(Plugin* plugin, KDevelop::IProject* project, 0033 CheckSetSelectionManager* checkSetSelectionManager, 0034 QWidget* parent); 0035 ~ProjectConfigPage() override; 0036 0037 QIcon icon() const override; 0038 QString name() const override; 0039 0040 void apply() override; 0041 void defaults() override; 0042 void reset() override; 0043 0044 private Q_SLOTS: 0045 void onSelectionChanged(const QString& selection); 0046 void onChecksChanged(const QString& checks); 0047 0048 void updateCommandLine(); 0049 0050 private: 0051 Ui::ProjectConfigPage m_ui; 0052 0053 ProjectSettings* m_settings; 0054 0055 const QVector<CheckSetSelection> m_checkSetSelections; 0056 const QString m_defaultCheckSetSelectionId; 0057 }; 0058 0059 } 0060 0061 #endif