prefs.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef PREFS_H
00022 #define PREFS_H
00023
00024 #include <qsize.h>
00025 #include <qdatetime.h>
00026 #include <ktabctl.h>
00027 #include "recurrenceedit.h"
00028 class QCheckBox;
00029 class QRadioButton;
00030 class QSpinBox;
00031 class QComboBox;
00032 class FontColourChooser;
00033 class Settings;
00034 class TimeSpinBox;
00035
00036
00037
00038 class PrefsTabBase : public QWidget
00039 {
00040 Q_OBJECT
00041 public:
00042 PrefsTabBase(QVBox*);
00043
00044 void setSettings(Settings*);
00045 virtual void restore() = 0;
00046 virtual void apply(bool syncToDisc) = 0;
00047 virtual void setDefaults() = 0;
00048
00049 protected:
00050 QVBox* mPage;
00051 Settings* mSettings;
00052 };
00053
00054
00055
00056 class AppearancePrefTab : public PrefsTabBase
00057 {
00058 Q_OBJECT
00059 public:
00060 AppearancePrefTab(QVBox*);
00061
00062 virtual void restore();
00063 virtual void apply(bool syncToDisc);
00064 virtual void setDefaults();
00065
00066 private:
00067 FontColourChooser* mFontChooser;
00068 };
00069
00070
00071
00072 class MiscPrefTab : public PrefsTabBase
00073 {
00074 Q_OBJECT
00075 public:
00076 MiscPrefTab(QVBox*);
00077
00078 virtual void restore();
00079 virtual void apply(bool syncToDisc);
00080 virtual void setDefaults();
00081
00082 private slots:
00083 void slotRunModeToggled(bool on);
00084
00085 private:
00086 QRadioButton* mRunInSystemTray;
00087 QRadioButton* mRunOnDemand;
00088 QCheckBox* mDisableAlarmsIfStopped;
00089 QCheckBox* mAutostartTrayIcon1;
00090 QCheckBox* mAutostartTrayIcon2;
00091 QCheckBox* mConfirmAlarmDeletion;
00092 QSpinBox* mDaemonTrayCheckInterval;
00093 TimeSpinBox* mStartOfDay;
00094 };
00095
00096
00097
00098 class DefaultPrefTab : public PrefsTabBase
00099 {
00100 Q_OBJECT
00101 public:
00102 DefaultPrefTab(QVBox*);
00103
00104 virtual void restore();
00105 virtual void apply(bool syncToDisc);
00106 virtual void setDefaults();
00107
00108 private:
00109 QCheckBox* mDefaultLateCancel;
00110 QCheckBox* mDefaultConfirmAck;
00111 QCheckBox* mDefaultBeep;
00112 QComboBox* mDefaultRecurPeriod;
00113
00114 static int recurIndex(RecurrenceEdit::RepeatType);
00115 };
00116
00117 #endif // PREFS_H
This file is part of the documentation for kdelibs Version 3.1.5.