1 /* 2 SPDX-FileCopyrightText: 2015-2021 Laurent Montel <montel@kde.org> 3 4 SPDX-License-Identifier: LGPL-2.0-or-later 5 6 */ 7 8 #pragma once 9 10 #include "libkdebugsettings_export.h" 11 #include "loggingcategory.h" 12 #include <QWidget> 13 class QPushButton; 14 class KDEApplicationTreeListWidget; 15 class KTreeWidgetSearchLine; 16 class LIBKDEBUGSETTINGS_EXPORT KDEApplicationDebugSettingPage : public QWidget 17 { 18 Q_OBJECT 19 public: 20 explicit KDEApplicationDebugSettingPage(QWidget *parent = nullptr); 21 ~KDEApplicationDebugSettingPage() override; 22 void fillList(const LoggingCategory::List &list); 23 Q_REQUIRED_RESULT LoggingCategory::List rules(bool forceSavingAllRules) const; 24 void insertCategories(const LoggingCategory::List &list); 25 26 void restoreToDefault(); 27 28 void forceFocus(); 29 30 protected: 31 bool eventFilter(QObject *obj, QEvent *event) override; 32 33 private: 34 void slotSelectAllDebug(); 35 void slotDeselectAllDebug(); 36 void slotDeselectAllMessages(); 37 38 KDEApplicationTreeListWidget *const mTreeListWidget; 39 KTreeWidgetSearchLine *const mTreeListWidgetSearchLine; 40 QPushButton *const mEnableDebug; 41 QPushButton *const mTurnOffDebug; 42 QPushButton *const mTurnOffAllMessages; 43 }; 44 45