00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
#ifndef KCONFIGDIALOG_H
00022
#define KCONFIGDIALOG_H
00023
00024
class KConfig;
00025
class KConfigSkeleton;
00026
class KConfigDialogManager;
00027
#include <kdialogbase.h>
00028
#include <qasciidict.h>
00029
00072 class KDEUI_EXPORT KConfigDialog :
public KDialogBase {
00073 Q_OBJECT
00074
00075 signals:
00079
void widgetModified();
00080
00085
void settingsChanged();
00086
00095
void settingsChanged(
const char *dialogName);
00096
00097
public:
00121
00122
00123 KConfigDialog(
QWidget *parent,
const char *name,
00124
KConfigSkeleton *config,
00125 DialogType dialogType = IconList,
00126
int dialogButtons = Default|Ok|Apply|Cancel|Help,
00127 ButtonCode defaultButton = Ok,
00128
bool modal=
false );
00129
00135 ~KConfigDialog();
00136
00151
00152
void addPage(
QWidget *page,
const QString &itemName,
00153
const QString &pixmapName,
00154
const QString &header=QString::null,
00155
bool manage=
true );
00156
00173
00174
void addPage(
QWidget *page,
KConfigSkeleton *config,
00175
const QString &itemName,
00176
const QString &pixmapName,
00177
const QString &header=QString::null );
00178
00185
static KConfigDialog* exists(
const char* name );
00186
00193
static bool showDialog(
const char* name );
00194
00198
virtual void show();
00199
00200
protected slots:
00207
virtual void updateSettings();
00208
00216
virtual void updateWidgets();
00217
00224
virtual void updateWidgetsDefault();
00225
00226
protected:
00227
00233 virtual bool hasChanged() {
return false; }
00234
00239 virtual bool isDefault() {
return true; }
00240
00241
protected slots:
00245
void updateButtons();
00246
00250
void settingsChangedSlot();
00251
00252
private:
00256
void addPageInternal(
QWidget *page,
const QString &itemName,
00257
const QString &pixmapName,
const QString &header);
00258
00263
void setupManagerConnections(
KConfigDialogManager *manager);
00264
00265
private:
00269
static QAsciiDict<KConfigDialog> openDialogs;
00270
00271
class KConfigDialogPrivate;
00275 KConfigDialogPrivate *d;
00276 };
00277
00278
#endif //KCONFIGDIALOG_H
00279