Error message is shown when location search does not find locations
[situare] / src / ui / updatelocation / updatelocationdialog.h
1 /*\r
2    Situare - A location system for Facebook\r
3    Copyright (C) 2010  Ixonos Plc. Authors:\r
4 \r
5       Katri Kaikkonen - katri.kaikkonen@ixonos.com\r
6       Henri Lampela - henri.lampela@ixonos.com\r
7 \r
8    Situare is free software; you can redistribute it and/or\r
9    modify it under the terms of the GNU General Public License\r
10    version 2 as published by the Free Software Foundation.\r
11 \r
12    Situare is distributed in the hope that it will be useful,\r
13    but WITHOUT ANY WARRANTY; without even the implied warranty of\r
14    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
15    GNU General Public License for more details.\r
16 \r
17    You should have received a copy of the GNU General Public License\r
18    along with Situare; if not, write to the Free Software\r
19    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301,\r
20    USA.\r
21 */\r
22 \r
23 #ifndef UPDATELOCATIONDIALOG_H\r
24 #define UPDATELOCATIONDIALOG_H\r
25 \r
26 #include <QDialog>\r
27 #ifdef Q_WS_MAEMO_5\r
28 #include <QAbstractKineticScroller>\r
29 #endif // Q_WS_MAEMO_5\r
30 #include "texteditautoresizer.h"\r
31 \r
32 class QCheckBox;\r
33 class QDialogButtonBox;\r
34 class QGroupBox;\r
35 class QLabel;\r
36 class QLineEdit;\r
37 class QPushButton;\r
38 class QScrollArea;\r
39 class QTextEdit;\r
40 \r
41 /**\r
42 * @brief Update Location UI\r
43 *\r
44 * UI for update location functionality.\r
45 *\r
46 * @class UpdateLocationDialog\r
47 */\r
48 class UpdateLocationDialog : public QDialog\r
49 {\r
50     Q_OBJECT\r
51 \r
52 public:\r
53     /**\r
54     * @brief Default constructor\r
55     *\r
56     * @param userMessage update location dialog message\r
57     * @param publishOnFacebook update location dialog Facebook publish policity\r
58     * @param parent\r
59     */\r
60     UpdateLocationDialog(const QString &userMessage = "", bool publishOnFacebook = false,\r
61                          QWidget *parent = 0);\r
62 \r
63     ~UpdateLocationDialog();\r
64 \r
65 /*******************************************************************************\r
66  * MEMBER FUNCTIONS AND SLOTS\r
67  ******************************************************************************/\r
68 \r
69 public slots:\r
70 \r
71     /**\r
72     * @brief Public slot, which is used to set the street address to location label\r
73     *\r
74     * @param address Street address, result from SituareService's reverseGeo\r
75     */\r
76     void setAddress(const QString &address);\r
77 \r
78 private slots:\r
79 \r
80     /**\r
81     * @brief Private slot, which is used to connect send button\r
82     *\r
83     */\r
84     void sendUpdate();\r
85 \r
86     /**\r
87     * @brief Private slot, which is used to get changes in messagetext\r
88     *\r
89     */\r
90     void textChanged();\r
91 \r
92     /**\r
93     * @brief Private slot, which is used to clear default messagetext\r
94     *\r
95     */\r
96     void textSelectionChanged();\r
97 \r
98 /*******************************************************************************\r
99  * SIGNALS\r
100  ******************************************************************************/\r
101 \r
102 signals:\r
103 \r
104     /**\r
105     * @brief Signal Signal for requestLocationUpdate from SituareEngine via MainWindow class\r
106     *\r
107     * @param status Status message\r
108     * @param publish Publish on Facebook\r
109     */\r
110     void statusUpdate(const QString &status, const bool &publish);\r
111 \r
112 /*******************************************************************************\r
113  * DATA MEMBERS\r
114  ******************************************************************************/\r
115 \r
116 private:\r
117 \r
118     QCheckBox *m_checkBox; ///< Pointer to CheckBox\r
119     QLabel *m_locationLabel; ///< Pointer to locationLabel\r
120     QLabel *m_charCountLabel; ///< Pointer to locationLabel\r
121     QTextEdit *m_textEdit; ///< Pointer to TextEdit\r
122 };\r
123 \r
124 #endif // UPDATELOCATIONDIALOG_H\r