2 Situare - A location system for Facebook
3 Copyright (C) 2010 Ixonos Plc. Authors:
5 Katri Kaikkonen - katri.kaikkonen@ixonos.com
6 Jussi Laitinen - jussi.laitinen@ixonos.com
8 Situare is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 version 2 as published by the Free Software Foundation.
12 Situare is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with Situare; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
23 #ifndef SETTINGSDIALOG_H
24 #define SETTINGSDIALOG_H
28 #include <QStandardItemModel>
33 #include <QMaemo5ValueButton>
34 #include <QMaemo5ListPickSelector>
41 * @brief Settings Dialog.
43 * @class SettingsDialog settingsdialog.h "ui/settingsdialog.h"
45 class SettingsDialog : public QDialog
51 * @brief Default constructor
53 * @param parent Parent
55 SettingsDialog(QWidget *parent = 0);
60 * Saves automatic update interval in settings.
64 /*******************************************************************************
65 * MEMBER FUNCTIONS AND SLOTS
66 ******************************************************************************/
69 * @brief Sets automatic location update settings from settings dialog.
71 void setAutomaticLocationUpdateSettings(bool enabled);
74 * @brief Enables Situare related settings from settings dialog.
77 void enableSituareSettings(bool enabled);
80 * @brief Emits automatic location update settings.
82 void emitAutomaticLocationUpdateSettings();
86 * @brief Saves settings to file.
91 * @brief Rejects changes made to settings.
96 * @brief Toggles automatic location update state.
98 * Enables and disabled automatic location update interval time edit.
100 * @param value true if settings are enabled, false otherwise
102 void toggleAutomaticLocationUpdate(bool enabled);
105 void populateUpdateIntervalList(QStandardItemModel *model);
108 * @brief Read settings.
115 * @param time time to set
117 void setTime(const QTime &time);
120 * @brief Returns current update interval time.
122 * @return current time
128 * @brief Signal for enabling automatic location update.
130 * @param enabled true if enabled, false otherwise
131 * @param updateIntervalMsecs update interval in milliseconds
133 void enableAutomaticLocationUpdate(bool enabled, int updateIntervalMsecs = 0);
135 /*******************************************************************************
137 ******************************************************************************/
139 QCheckBox *m_automaticLocationUpdate; ///< Pointer to CheckBox
140 bool m_automaticLocationUpdateOldValue; ///< Automatic location update state
141 QTime m_automaticLocationUpdateIntervalOldValue;///< Automatic location update interval value
144 QMaemo5ValueButton *m_automaticLocationUpdateIntervalButton; ///< Maemo 5 value button
145 QMaemo5ListPickSelector *m_timePick; ///< Maemo 5 time pick selector
147 QTimeEdit *m_automaticLocationUpdateInterval; ///< Pointer to QTimeEdit
151 #endif // SETTINGSDIALOG_H