00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef SETTINGSDIALOG_H
00024 #define SETTINGSDIALOG_H
00025
00026 #include <QDialog>
00027 #include <QTime>
00028 #include <QStandardItemModel>
00029
00030 class QCheckBox;
00031 class QPushButton;
00032
00033 #ifdef Q_WS_MAEMO_5
00034 #include <QMaemo5ValueButton>
00035 #include <QMaemo5ListPickSelector>
00036 #else
00037 #include <QTimeEdit>
00038 #endif
00039
00040
00046 class SettingsDialog : public QDialog
00047 {
00048 Q_OBJECT
00049
00050 public:
00056 SettingsDialog(QWidget *parent = 0);
00057
00058
00059
00060
00061 public:
00067 void enableSituareSettings(bool enabled);
00068
00069 private slots:
00073 void saveValues();
00074
00082 void toggleAutomaticLocationUpdate(bool enabled);
00083
00084 private:
00090 void populateUpdateIntervalList(QStandardItemModel *model);
00091
00095 void readSettings();
00096
00102 void setTime(const QTime &time);
00103
00109 QTime time();
00110
00111
00112
00113
00114 private:
00115 QCheckBox *m_automaticLocationUpdate;
00116
00117 #ifdef Q_WS_MAEMO_5
00118 QMaemo5ValueButton *m_automaticLocationUpdateIntervalButton;
00119 QMaemo5ListPickSelector *m_timePick;
00120 #else
00121 QTimeEdit *m_automaticLocationUpdateInterval;
00122 #endif
00123
00124 QPushButton *m_saveButton;
00125 };
00126
00127 #endif // SETTINGSDIALOG_H