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 Enables Situare related settings from settings dialog.
72 void enableSituareSettings(bool enabled);
77 * @brief Saves settings to file.
82 * @brief Rejects changes made to settings.
87 * @brief Toggles automatic location update state.
89 * Enables and disabled automatic location update interval time edit.
91 * @param value true if settings are enabled, false otherwise
93 void toggleAutomaticLocationUpdate(bool enabled);
96 void populateUpdateIntervalList(QStandardItemModel *model);
99 * @brief Read settings.
106 * @param time time to set
108 void setTime(const QTime &time);
111 * @brief Returns current update interval time.
113 * @return current time
119 * @brief Signal for enabling automatic location update.
121 * @param enabled true if enabled, false otherwise
122 * @param updateIntervalMsecs update interval in milliseconds
124 void enableAutomaticLocationUpdate(bool enabled, int updateIntervalMsecs = 0);
126 /*******************************************************************************
128 ******************************************************************************/
130 QCheckBox *m_automaticLocationUpdate; ///< Pointer to CheckBox
131 bool m_automaticLocationUpdateOldValue; ///< Automatic location update state
132 QTime m_automaticLocationUpdateIntervalOldValue;///< Automatic location update interval value
135 QMaemo5ValueButton *m_automaticLocationUpdateIntervalButton;
136 QMaemo5ListPickSelector *m_timePick;
138 QTimeEdit *m_automaticLocationUpdateInterval; ///< Pointer to QTimeEdit
142 #endif // SETTINGSDIALOG_H