-rw-r--r-- | libkdepim/kprefsdialog.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libkdepim/kprefsdialog.h b/libkdepim/kprefsdialog.h index ad13b78..efcb86a 100644 --- a/libkdepim/kprefsdialog.h +++ b/libkdepim/kprefsdialog.h @@ -17,65 +17,65 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. As a special exception, permission is given to link this program with any edition of Qt, and distribute the resulting executable, without including the source code for Qt in the source distribution. */ #ifndef _KPREFSDIALOG_H #define _KPREFSDIALOG_H // $Id$ #include <qptrlist.h> #include <qlineedit.h> #include <kdialogbase.h> class KPrefs; class KPrefsDialog; class KColorButton; class QCheckBox; class QLabel; class QSpinBox; class QButtonGroup; /** @short Base class for widgets used by @ref KPrefsDialog. @author Cornelius Schumacher @see KPrefsDialog This class provides the interface for the preferences widgets used by KPrefsDialog. */ -class KPrefsDialogWid +class KPrefsDialogWid : public QObject { public: /** This function is called to read value of the setting from the stored configuration and display it in the widget. */ virtual void readConfig() = 0; /** This function is called to write the current setting of the widget to the stored configuration. */ virtual void writeConfig() = 0; }; /** @short Widget for bool settings in @ref KPrefsDialog. This class provides a widget for configuring bool values. It is meant to be used by KPrefsDialog. The user is responsible for the layout management. */ class KPrefsDialogWidBool : public KPrefsDialogWid { public: /** Create a bool widget consisting of a QCheckbox. @param text Text of QCheckBox. @param reference Pointer to variable read and written by this widget. @param parent Parent widget. */ KPrefsDialogWidBool(const QString &text,bool *reference,QWidget *parent); @@ -107,108 +107,107 @@ class KPrefsDialogWidTime : public KPrefsDialogWid @param text Text of Label. @param reference Pointer to variable read and written by this widget. @param parent Parent widget. */ KPrefsDialogWidTime(const QString &text,int *reference,QWidget *parent); /** Return QLabel used by this widget. */ QLabel *label(); /** Return QSpinBox used by this widget. */ QSpinBox *spinBox(); void readConfig(); void writeConfig(); private: int *mReference; QLabel *mLabel; QSpinBox *mSpin; }; /** @short Widget for color settings in @ref KPrefsDialog. This class provides a widget for configuring color values. It is meant to be used by KPrefsDialog. The user is responsible for the layout management. */ -class KPrefsDialogWidColor : public QObject, public KPrefsDialogWid +class KPrefsDialogWidColor : public KPrefsDialogWid { - Q_OBJECT public: /** Create a color widget consisting of a test field and a button for opening a color dialog. @param text Text of button. @param reference Pointer to variable read and written by this widget. @param parent Parent widget. */ KPrefsDialogWidColor(const QString &text,QColor *reference,QWidget *parent); /** Destruct color setting widget. */ ~KPrefsDialogWidColor(); /** Return QLabel for the button */ QLabel *label(); /** Return button opening the color dialog. */ KColorButton *button(); void readConfig(); void writeConfig(); private: QColor *mReference; QLabel *mLabel; KColorButton *mButton; }; /** @short Widget for font settings in @ref KPrefsDialog. This class provides a widget for configuring font values. It is meant to be used by KPrefsDialog. The user is responsible for the layout management. */ -class KPrefsDialogWidFont : public QObject, public KPrefsDialogWid +class KPrefsDialogWidFont : public KPrefsDialogWid { Q_OBJECT public: /** Create a font widget consisting of a test field and a button for opening a font dialog. @param label Text of label. @param reference Pointer to variable read and written by this widget. @param parent Parent widget. */ KPrefsDialogWidFont(const QString &sampleText,const QString &labelText, QFont *reference,QWidget *parent); /** Destruct font setting widget. */ ~KPrefsDialogWidFont(); /** Return label. */ QLabel *label(); /** Return QFrame used as preview field. */ QLabel *preview(); /** Return button opening the font dialog. */ QPushButton *button(); void readConfig(); |