1/* This file is part of the KDE project
2 Copyright (C) 2007 Matthias Kretz <kretz@kde.org>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License version 2 as published by the Free Software Foundation.
7
8 This library is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Library General Public License for more details.
12
13 You should have received a copy of the GNU Library General Public License
14 along with this library; see the file COPYING.LIB. If not, write to
15 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16 Boston, MA 02110-1301, USA.
17
18*/
19
20#ifndef KCMULTIDIALOG_P_H
21#define KCMULTIDIALOG_P_H
22
23#include "kcmultidialog.h"
24#include <kpagedialog_p.h>
25#include <QtCore/QList>
26#include <QtCore/QStringList>
27
28class KCModuleProxy;
29class KPageWidgetItem;
30
31class KCMultiDialogPrivate : public KPageDialogPrivate
32{
33 Q_DECLARE_PUBLIC(KCMultiDialog)
34 protected:
35 KCMultiDialogPrivate()
36 : currentModule(0)
37 {
38 }
39
40 KCModuleProxy *currentModule;
41
42 struct CreatedModule
43 {
44 KCModuleProxy *kcm;
45 KPageWidgetItem *item;
46 QStringList componentNames;
47 };
48
49 typedef QList<CreatedModule> ModuleList;
50 ModuleList modules;
51
52 void _k_slotCurrentPageChanged(KPageWidgetItem *current, KPageWidgetItem *previous);
53 virtual void _k_clientChanged();
54 void _k_dialogClosed();
55 void _k_updateHeader(bool use, const QString &message);
56
57 private:
58 void init();
59 void apply();
60 bool resolveChanges(KCModuleProxy *currentProxy);
61 bool moduleSave(KCModuleProxy *module);
62};
63
64#endif // KCMULTIDIALOG_P_H
65// vim: sw=4 sts=4 et tw=100
66