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
00032 #ifdef Q_WS_MAEMO_5
00033 #include <QMaemo5ValueButton>
00034 #include <QMaemo5ListPickSelector>
00035 #else
00036 #include <QTimeEdit>
00037 #endif
00038
00039
00045 class SettingsDialog : public QDialog
00046 {
00047 Q_OBJECT
00048
00049 public:
00055 SettingsDialog(QWidget *parent = 0);
00056
00057
00058
00059
00060 public:
00066 void setAutomaticLocationUpdateSettings(bool enabled);
00067
00073 void enableSituareSettings(bool enabled);
00074
00078 void emitAutomaticLocationUpdateSettings();
00079
00083 void readSettings();
00084
00085 private slots:
00089 void saveValues();
00090
00098 void toggleAutomaticLocationUpdate(bool enabled);
00099
00100 private:
00106 void populateUpdateIntervalList(QStandardItemModel *model);
00107
00113 void setTime(const QTime &time);
00114
00120 QTime time();
00121
00122 signals:
00129 void enableAutomaticLocationUpdate(bool enabled, int updateIntervalMsecs = 0);
00130
00131
00132
00133
00134 private:
00135 QCheckBox *m_automaticLocationUpdate;
00136
00137 #ifdef Q_WS_MAEMO_5
00138 QMaemo5ValueButton *m_automaticLocationUpdateIntervalButton;
00139 QMaemo5ListPickSelector *m_timePick;
00140 #else
00141 QTimeEdit *m_automaticLocationUpdateInterval;
00142 #endif
00143 };
00144
00145 #endif // SETTINGSDIALOG_H