summaryrefslogtreecommitdiffabout
path: root/libkdepim/kprefsdialog.h
Side-by-side diff
Diffstat (limited to 'libkdepim/kprefsdialog.h') (more/less context) (show whitespace changes)
-rw-r--r--libkdepim/kprefsdialog.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/libkdepim/kprefsdialog.h b/libkdepim/kprefsdialog.h
index efcb86a..52ec809 100644
--- a/libkdepim/kprefsdialog.h
+++ b/libkdepim/kprefsdialog.h
@@ -253,193 +253,219 @@ class KPrefsDialogWidRadios : public KPrefsDialogWid
@param text Text of the button.
*/
void addRadio(const QString &text);
/**
Return the box widget used by this widget.
*/
QButtonGroup *groupBox();
void readConfig();
void writeConfig();
private:
int *mReference;
QButtonGroup *mBox;
};
/**
@short Widget for string settings in @ref KPrefsDialog.
This class provides a widget for configuring string values. It is meant to be
used by KPrefsDialog. The user is responsible for the layout management.
*/
class KPrefsDialogWidString : public KPrefsDialogWid
{
public:
/**
Create a string widget consisting of a test label and a line edit.
@param text Text of label.
@param reference Pointer to variable read and written by this widget.
@param parent Parent widget.
*/
KPrefsDialogWidString(const QString &text,QString *reference,QWidget *parent,QLineEdit::EchoMode echomode=QLineEdit::Normal);
/**
Destructor.
*/
virtual ~KPrefsDialogWidString();
/**
Return label used by this widget.
*/
QLabel *label();
/**
Return QLineEdit used by this widget.
*/
QLineEdit *lineEdit();
void readConfig();
void writeConfig();
private:
QString *mReference;
QLabel *mLabel;
QLineEdit *mEdit;
};
/**
@short Base class for a preferences dialog.
This class provides the framework for a preferences dialog. You have to
subclass it and add the code to create the actual configuration widgets and
do the layout management.
KPrefsDialog provides functions to add subclasses of @ref KPrefsDialogWid. For
these widgets the reading, writing and setting to default values is handled
automatically. Custom widgets have to be handled in the functions @ref
usrReadConfig() and @ref usrWriteConfig().
*/
class KPrefsDialog : public KDialogBase
{
Q_OBJECT
public:
/**
Create a KPrefsDialog for a KPrefs object.
@param prefs KPrefs object used to access te configuration.
@param parent Parent widget.
@param name Widget name.
@param modal true, if dialog has to be modal, false for non-modal.
*/
KPrefsDialog(KPrefs *prefs,QWidget *parent=0,char *name=0,bool modal=false);
/**
Destructor.
*/
virtual ~KPrefsDialog();
/**
Register a custom KPrefsDialogWid object.
*/
void addWid(KPrefsDialogWid *);
/**
Register a @ref KPrefsDialogWidBool object.
@param text Text of bool widget.
@param reference Reference to variable storing the setting.
@param parent Parent widget.
*/
KPrefsDialogWidBool *addWidBool(const QString &text,bool *reference,QWidget *parent);
/**
Register a @ref KPrefsDialogWidTime object.
@param text Text of time widget.
@param reference Reference to variable storing the setting.
@param parent Parent widget.
*/
KPrefsDialogWidTime *addWidTime(const QString &text,int *reference,QWidget *parent);
/**
Register a @ref KPrefsDialogWidColor object.
@param text Text of color widget.
@param reference Reference to variable storing the setting.
@param parent Parent widget.
*/
KPrefsDialogWidColor *addWidColor(const QString &text,QColor *reference,QWidget *parent);
/**
Register a @ref KPrefsDialogWidRadios object.
@param text Text of radio button box widget.
@param reference Reference to variable storing the setting.
@param parent Parent widget.
*/
KPrefsDialogWidRadios *addWidRadios(const QString &text,int *reference,QWidget *parent);
/**
Register a @ref KPrefsDialogWidString object.
@param text Text of string widget.
@param reference Reference to variable storing the setting.
@param parent Parent widget.
*/
KPrefsDialogWidString *addWidString(const QString &text,QString *reference,QWidget *parent);
/**
Register a password @ref KPrefsDialogWidString object, with echomode set to QLineEdit::Password.
@param text Text of string widget.
@param reference Reference to variable storing the setting.
@param parent Parent widget.
*/
KPrefsDialogWidString *addWidPassword (const QString &text,QString *reference,QWidget *parent);
/**
Register a @ref KPrefsDialogWidFont object.
@param sampleText Sample text of font widget.
@param buttonText Button text of font widget.
@param reference Reference to variable storing the setting.
@param parent Parent widget.
*/
KPrefsDialogWidFont *addWidFont(const QString &sampleText,const QString &buttonText,
QFont *reference,QWidget *parent);
public slots:
/** Set all widgets to default values. */
void setDefaults();
/** Read preferences from config file. */
void readConfig();
/** Write preferences to config file. */
void writeConfig();
signals:
/** Emitted when the a changed configuration has been stored. */
void configChanged();
protected slots:
/** Apply changes to preferences */
void slotApply();
void accept();
/** Accept changes to preferences and close dialog */
void slotOk();
/** Set preferences to default values */
void slotDefault();
protected:
/** Implement this to read custom configuration widgets. */
virtual void usrReadConfig() {}
/** Implement this to write custom configuration widgets. */
virtual void usrWriteConfig() {}
private:
KPrefs *mPrefs;
QPtrList<KPrefsDialogWid> mPrefsWids;
};
+
+#include "kcmconfigs/kdepimconfigwidget.h"
+class KPimPrefsGlobalDialog : public KPrefsDialog
+{
+ Q_OBJECT
+ public:
+ KPimPrefsGlobalDialog(QWidget *parent=0,char *name=0,bool modal=true);
+ /**
+ Destructor.
+ */
+ void showTZconfig();
+
+ public slots:
+
+ signals:
+ protected slots:
+
+ protected:
+ void usrReadConfig();
+ virtual void usrWriteConfig() ;
+
+ private:
+ KDEPIMConfigWidget* kdelibcfg;
+
+};
+
#endif