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

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 <QComboBox>
0013 
0014 class LIBKDEBUGSETTINGS_EXPORT CategoryTypeComboBox : public QComboBox
0015 {
0016     Q_OBJECT
0017 public:
0018     explicit CategoryTypeComboBox(bool customType, QWidget *parent = nullptr);
0019     ~CategoryTypeComboBox() override;
0020 
0021     Q_REQUIRED_RESULT LoggingCategory::LoggingType type() const;
0022     void setType(LoggingCategory::LoggingType type);
0023     Q_REQUIRED_RESULT bool loggingCategoryIsNotDefault() const;
0024     void setDefaultCategories(LoggingCategory::LoggingType defaultCategories);
0025     Q_REQUIRED_RESULT LoggingCategory::LoggingType defaultCategories() const;
0026 
0027     void restoreToDefault();
0028 
0029 private:
0030     LoggingCategory::LoggingType mDefaultCategories = LoggingCategory::Info;
0031 };