dialog.h

00001 /*  This file is part of the KDE project
00002     Copyright (C) 2003 Matthias Kretz <kretz@kde.org>
00003 
00004     This library is free software; you can redistribute it and/or
00005     modify it under the terms of the GNU Library General Public
00006     License version 2 as published by the Free Software Foundation.
00007 
00008     This library is distributed in the hope that it will be useful,
00009     but WITHOUT ANY WARRANTY; without even the implied warranty of
00010     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011     Library General Public License for more details.
00012 
00013     You should have received a copy of the GNU Library General Public License
00014     along with this library; see the file COPYING.LIB.  If not, write to
00015     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00016     Boston, MA 02110-1301, USA.
00017 
00018 */
00019 
00020 #ifndef KSETTINGS_DIALOG_H
00021 #define KSETTINGS_DIALOG_H
00022 
00023 #include <qobject.h>
00024 #include <kservice.h>
00025 
00026 template<class T> class QValueList;
00027 class KPluginInfo;
00028 class KCMultiDialog;
00029 class KCModuleInfo;
00030 
00031 namespace KSettings
00032 {
00033 
00071 class KUTILS_EXPORT Dialog : public QObject
00072 {
00073     friend class PageNode;
00074     Q_OBJECT
00075     public:
00081         enum ContentInListView
00082         {
00086             Static,
00091             Configurable
00092         };
00093 
00103         Dialog( QWidget * parent = 0, const char * name = 0 );
00104 
00116         Dialog( ContentInListView content = Static, QWidget * parent = 0,
00117                 const char * name = 0 );
00118 
00132         Dialog( const QStringList & components, QWidget * parent = 0,
00133                 const char * name = 0 );
00134 
00150         Dialog( const QStringList & components, ContentInListView
00151                 content, QWidget * parent = 0, const char * name = 0 );
00152 
00153         ~Dialog();
00154 
00159         void addPluginInfos( const QValueList<KPluginInfo*> & plugininfos );
00160 
00161         KCMultiDialog * dialog();
00162 
00163     public slots:
00168         void show();
00169 
00170     signals:
00178         void pluginSelectionChanged();
00179 
00180     protected slots:
00181         void configureTree();
00182         void updateTreeList();
00183 
00184     private:
00189         bool isPluginForKCMEnabled( KCModuleInfo * ) const;
00190 
00191         QValueList<KService::Ptr> instanceServices() const;
00192         QValueList<KService::Ptr> parentComponentsServices(
00193                 const QStringList & ) const;
00198         void parseGroupFile( const QString & );
00199 
00205         QStringList parentModuleNames( KCModuleInfo * );
00206 
00213         void createDialogFromServices();
00214 
00215         class DialogPrivate;
00216         DialogPrivate * d;
00217 };
00218 
00219 }
00220 
00221 // vim: sw=4 sts=4 et
00222 #endif // KSETTINGS_DIALOG_H
KDE Home | KDE Accessibility Home | Description of Access Keys