File indexing completed on 2024-04-28 03:53:01

0001 /*
0002     SPDX-FileCopyrightText: 2007 Matthias Kretz <kretz@kde.org>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-only
0005 */
0006 
0007 #ifndef KCMULTIDIALOG_P_H
0008 #define KCMULTIDIALOG_P_H
0009 
0010 #include "kcmodule.h"
0011 #include "kcmultidialog.h"
0012 #include <QList>
0013 #include <QStringList>
0014 
0015 class KCModuleProxy;
0016 class KPageWidgetItem;
0017 
0018 class KCMultiDialogPrivate
0019 {
0020 public:
0021     KCMultiDialogPrivate(KCMultiDialog *parent)
0022         : currentModule(nullptr)
0023         , q(parent)
0024     {
0025     }
0026 
0027     KCModule *currentModule;
0028 
0029     struct CreatedModule {
0030         KCModule *kcm;
0031         KPageWidgetItem *item;
0032         QStringList componentNames;
0033         bool firstShow = true;
0034     };
0035 
0036     typedef QList<CreatedModule> ModuleList;
0037     ModuleList modules;
0038 
0039     void slotCurrentPageChanged(KPageWidgetItem *current, KPageWidgetItem *previous);
0040     void clientChanged();
0041     void dialogClosed();
0042     void updateHeader(bool use, const QString &message);
0043 
0044     KCMultiDialog *q;
0045 
0046     void init();
0047     void apply();
0048     bool resolveChanges(KCModule *currentProxy);
0049     bool moduleSave(KCModule *module);
0050 };
0051 
0052 #endif // KCMULTIDIALOG_P_H