File indexing completed on 2024-07-07 03:48:55

0001 /*
0002     This file is part of the KDE libraries
0003     SPDX-FileCopyrightText: 2003 Benjamin C Meyer <ben+kdelibs at meyerhome dot net>
0004     SPDX-FileCopyrightText: 2003 Waldo Bastian <bastian@kde.org>
0005     SPDX-FileCopyrightText: 2017 Friedrich W. H. Kossebau <kossebau@kde.org>
0006     SPDX-FileCopyrightText: 2020 Kevin Ottens <kevin.ottens@enioka.com>
0007 
0008     SPDX-License-Identifier: LGPL-2.0-or-later
0009 */
0010 
0011 #ifndef KCONFIGDIALOGMANAGER_P_H
0012 #define KCONFIGDIALOGMANAGER_P_H
0013 
0014 #include <QHash>
0015 #include <QSet>
0016 #include <QString>
0017 
0018 class QWidget;
0019 class KConfigDialogManager;
0020 class KCoreConfigSkeleton;
0021 
0022 class KConfigDialogManagerPrivate
0023 {
0024 public:
0025     KConfigDialogManagerPrivate(KConfigDialogManager *qq);
0026 
0027     void setDefaultsIndicatorsVisible(bool enabled);
0028 
0029     void onWidgetModified();
0030     void updateWidgetIndicator(const QString &configId, QWidget *widget);
0031     void updateAllWidgetIndicators();
0032 
0033 public:
0034     KConfigDialogManager *const q;
0035 
0036     /**
0037      * KConfigSkeleton object used to store settings
0038      */
0039     KCoreConfigSkeleton *m_conf = nullptr;
0040 
0041     /**
0042      * Dialog being managed
0043      */
0044     QWidget *m_dialog = nullptr;
0045 
0046     QHash<QString, QWidget *> knownWidget;
0047     QHash<QString, QWidget *> buddyWidget;
0048     QSet<QWidget *> allExclusiveGroupBoxes;
0049     bool insideGroupBox : 1;
0050     bool trackChanges : 1;
0051     bool defaultsIndicatorsVisible : 1;
0052 };
0053 
0054 #endif // KCONFIGDIALOGMANAGER_P_H