File indexing completed on 2022-09-27 16:31:46

0001 /*
0002     SPDX-FileCopyrightText: 2015-2022 Laurent Montel <montel@kde.org>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 
0006 */
0007 
0008 #pragma once
0009 
0010 #include "kdebugsettingsloadingcategories.h"
0011 #include "kdeloggingcategory.h"
0012 #include "libkdebugsettings_export.h"
0013 #include "renamecategory.h"
0014 #include <QDialog>
0015 class QTabWidget;
0016 class KDEApplicationDebugSettingPage;
0017 class CustomDebugSettingsPage;
0018 class EnvironmentSettingsRulesPage;
0019 class CategoryWarning;
0020 class LoadToolButton;
0021 
0022 class LIBKDEBUGSETTINGS_EXPORT KDebugSettingsDialog : public QDialog
0023 {
0024     Q_OBJECT
0025 public:
0026     explicit KDebugSettingsDialog(QWidget *parent = nullptr);
0027     ~KDebugSettingsDialog() override;
0028 
0029 Q_SIGNALS:
0030     void updateLoadGroupMenu();
0031 
0032 private:
0033     void slotAccepted();
0034     void slotHelpRequested();
0035     void slotApply();
0036     void slotSaveAs();
0037     void slotLoad();
0038     void slotInsertCategories();
0039     void slotRestoreDefault();
0040 
0041     void readQtLoggingFile();
0042     bool saveRules(const QString &path, bool forceSavingAllRules = false);
0043     bool saveInQtLogging();
0044     void saveConfig();
0045     void readConfig();
0046     void updateLoggingCategories();
0047     void slotLoadGroup(const QString &fullPath);
0048     void slotSaveAsGroup();
0049     void slotManageGroup();
0050     KdeLoggingCategory::List mCategoriesList;
0051     KDebugSettingsLoadingCategories mLoggings;
0052     QTabWidget *mTabWidget = nullptr;
0053     KDEApplicationDebugSettingPage *mKdeApplicationSettingsPage = nullptr;
0054     CustomDebugSettingsPage *mCustomSettingsPage = nullptr;
0055     EnvironmentSettingsRulesPage *mEnvironmentSettingsRulesPage = nullptr;
0056     CategoryWarning *mCategoryWarning = nullptr;
0057     LoadToolButton *mLoadToolButton = nullptr;
0058 };