File indexing completed on 2022-11-29 20:24:01

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 "libkdebugsettings_export.h"
0011 #include "loggingcategory.h"
0012 #include <QWidget>
0013 class QPushButton;
0014 class KDEApplicationTreeListWidget;
0015 class KTreeWidgetSearchLine;
0016 class LIBKDEBUGSETTINGS_EXPORT KDEApplicationDebugSettingPage : public QWidget
0017 {
0018     Q_OBJECT
0019 public:
0020     explicit KDEApplicationDebugSettingPage(QWidget *parent = nullptr);
0021     ~KDEApplicationDebugSettingPage() override;
0022     void fillList(const LoggingCategory::List &list);
0023     Q_REQUIRED_RESULT LoggingCategory::List rules(bool forceSavingAllRules) const;
0024     void insertCategories(const LoggingCategory::List &list);
0025 
0026     void restoreToDefault();
0027 
0028     void forceFocus();
0029 
0030 protected:
0031     bool eventFilter(QObject *obj, QEvent *event) override;
0032 
0033 private:
0034     void slotSelectAllDebug();
0035     void slotDeselectAllDebug();
0036     void slotDeselectAllMessages();
0037 
0038     KDEApplicationTreeListWidget *const mTreeListWidget;
0039     KTreeWidgetSearchLine *const mTreeListWidgetSearchLine;
0040     QPushButton *const mEnableDebug;
0041     QPushButton *const mTurnOffDebug;
0042     QPushButton *const mTurnOffAllMessages;
0043 };