23 #ifndef KPREFSDIALOG_H
24 #define KPREFSDIALOG_H
26 #include <tqptrlist.h>
27 #include <tqlineedit.h>
28 #include <tqvaluelist.h>
29 #include <tqdatetimeedit.h>
31 #include <kdialogbase.h>
32 #include <tdecmodule.h>
33 #include <tdeconfigskeleton.h>
35 #include <tdemacros.h>
77 virtual TQValueList<TQWidget *> widgets()
const;
101 KPrefsWidBool( TDEConfigSkeleton::ItemBool *item, TQWidget *parent );
106 TQCheckBox *checkBox();
111 TQValueList<TQWidget *> widgets()
const;
114 TDEConfigSkeleton::ItemBool *mItem;
136 KPrefsWidInt( TDEConfigSkeleton::ItemInt *item, TQWidget *parent );
146 TQSpinBox *spinBox();
151 TQValueList<TQWidget *> widgets()
const;
154 TDEConfigSkeleton::ItemInt *mItem;
176 KPrefsWidTime( TDEConfigSkeleton::ItemDateTime *item, TQWidget *parent );
191 TDEConfigSkeleton::ItemDateTime *mItem;
223 TQTimeEdit *timeEdit();
229 TDEConfigSkeleton::ItemDateTime *mItem;
232 TQTimeEdit *mTimeEdit;
251 KPrefsWidDate( TDEConfigSkeleton::ItemDateTime *item, TQWidget *parent );
266 TDEConfigSkeleton::ItemDateTime *mItem;
291 KPrefsWidColor( TDEConfigSkeleton::ItemColor *item, TQWidget *parent );
304 KColorButton *button();
310 TDEConfigSkeleton::ItemColor *mItem;
313 KColorButton *mButton;
336 TQWidget *parent,
const TQString &sampleText );
353 TQPushButton *button();
362 TDEConfigSkeleton::ItemFont *mItem;
366 TQPushButton *mButton;
390 KPrefsWidRadios( TDEConfigSkeleton::ItemEnum *item, TQWidget *parent );
399 void addRadio(
const TQString &text,
400 const TQString &whatsThis = TQString() );
405 TQButtonGroup *groupBox();
410 TQValueList<TQWidget *> widgets()
const;
413 TDEConfigSkeleton::ItemEnum *mItem;
438 KPrefsWidCombo( TDEConfigSkeleton::ItemEnum *item, TQWidget *parent );
444 TQComboBox *comboBox();
445 TQValueList<TQWidget *> widgets()
const;
448 TDEConfigSkeleton::ItemEnum *mItem;
472 KPrefsWidString( TDEConfigSkeleton::ItemString *item, TQWidget *parent,
473 TQLineEdit::EchoMode echomode=TQLineEdit::Normal );
486 TQLineEdit *lineEdit();
491 TQValueList<TQWidget *> widgets()
const;
494 TDEConfigSkeleton::ItemString *mItem;
520 KPrefsWidPath( TDEConfigSkeleton::ItemPath *item, TQWidget *parent,
521 const TQString &filter = TQString(), uint mode = KFile::File );
534 KURLRequester *urlRequester();
539 TQValueList<TQWidget *> widgets()
const;
542 TDEConfigSkeleton::ItemPath *mItem;
545 KURLRequester *mURLRequester;
571 TDEConfigSkeleton *prefs()
const {
return mPrefs; }
584 KPrefsWidBool *addWidBool( TDEConfigSkeleton::ItemBool *item,
593 KPrefsWidInt *addWidInt( TDEConfigSkeleton::ItemInt *item,
602 KPrefsWidDate *addWidDate( TDEConfigSkeleton::ItemDateTime *item,
611 KPrefsWidTime *addWidTime( TDEConfigSkeleton::ItemDateTime *item,
669 KPrefsWidPath *addWidPath ( TDEConfigSkeleton::ItemPath *item, TQWidget *parent,
670 const TQString &filter = TQString(),
671 uint mode = KFile::File );
690 KPrefsWidFont *addWidFont( TDEConfigSkeleton::ItemFont *item,
691 TQWidget *parent,
const TQString &sampleText );
694 void setWidDefaults();
697 void readWidConfig();
700 void writeWidConfig();
703 TDEConfigSkeleton *mPrefs;
705 TQPtrList<KPrefsWid> mPrefsWids;
734 KPrefsDialog( TDEConfigSkeleton *prefs, TQWidget *parent = 0,
char *name = 0,
735 bool modal =
false );
780 KPrefsModule( TDEConfigSkeleton *, TQWidget *parent = 0,
const char *name = 0 );
789 void slotWidChanged();
793 virtual void usrReadConfig() {}
795 virtual void usrWriteConfig() {}
A date editing widget that consists of an editable combo box.
Base class for a preferences dialog.
virtual void usrReadConfig()
Implement this to read custom configuration widgets.
void configChanged()
Emitted when the a changed configuration has been stored.
virtual void usrWriteConfig()
Implement this to write custom configuration widgets.
Widgets for bool settings in KPrefsDialog.
Widgets for color settings in KPrefsDialog.
Widgets for settings represented by a combo box in KPrefsDialog.
Widgets for time settings in KPrefsDialog.
Widgets for duration settings in KPrefsDialog.
Widgets for font settings in KPrefsDialog.
Widgets for int settings in KPrefsDialog.
Class for managing KPrefsWid objects.
Widgets for string settings in KPrefsDialog.
Widgets for settings represented by a group of radio buttons in KPrefsDialog.
Widgets for string settings in KPrefsDialog.
Widgets for time settings in KPrefsDialog.
Base class for GUI control elements used by KPrefsDialog.
void changed()
Emitted when widget value has changed.
virtual void writeConfig()=0
This function is called to write the current setting of the widget to the stored configuration.
virtual void readConfig()=0
This function is called to read value of the setting from the stored configuration and display it in ...
This is a class that provides an easy, user friendly way to edit times.