backup...
[situare] / src / ui / updatelocation / updatelocationdialog.h
1 /*
2    Situare - A location system for Facebook
3    Copyright (C) 2010  Ixonos Plc. Authors:
4
5       Katri Kaikkonen - katri.kaikkonen@ixonos.com
6       Henri Lampela - henri.lampela@ixonos.com
7
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.
11
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.
16
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,
20    USA.
21 */
22
23 #ifndef UPDATELOCATIONDIALOG_H
24 #define UPDATELOCATIONDIALOG_H
25
26 #include <QDialog>
27 #ifdef Q_WS_MAEMO_5
28 #include <QAbstractKineticScroller>
29 #endif // Q_WS_MAEMO_5
30 #include "texteditautoresizer.h"
31
32 class QCheckBox;
33 class QDialogButtonBox;
34 class QGroupBox;
35 class QLabel;
36 class QLineEdit;
37 class QPushButton;
38 class QScrollArea;
39 class QTextEdit;
40
41 /**
42 * @brief Update Location UI
43 *
44 * UI for update location functionality.
45 *
46 * @class UpdateLocationDialog
47 */
48 class UpdateLocationDialog : public QDialog
49 {
50     Q_OBJECT
51
52 public:
53     /**
54     * @brief Default constructor
55     *
56     * @param parent
57     */
58     UpdateLocationDialog(QWidget *parent = 0);
59     ~UpdateLocationDialog();
60
61 /*******************************************************************************
62  * MEMBER FUNCTIONS AND SLOTS
63  ******************************************************************************/
64
65 public slots:
66
67     /**
68     * @brief Public slot, which is used to set the street address to location label
69     *
70     * @param address Street address, result from SituareService's reverseGeo
71     */
72     void setAddress(const QString &address);
73     void saveMessageAndClose();
74
75 private slots:
76
77     /**
78     * @brief Private slot, which is used to connect send button
79     *
80     */
81     void sendUpdate();
82
83 /*******************************************************************************
84  * SIGNALS
85  ******************************************************************************/
86
87 signals:
88     void saveMessage(const QString &message);
89
90     /**
91     * @brief Signal Signal for requestLocationUpdate from SituareEngine via MainWindow class
92     *
93     * @param status Status message
94     * @param publish Publish on Facebook
95     */
96     void statusUpdate(const QString &status, const bool &publish);
97
98 /*******************************************************************************
99  * DATA MEMBERS
100  ******************************************************************************/
101
102 private:
103     //bool m_messageReceivedOnSituareServer; ///< Indicates when message is received on Situare server
104
105     QCheckBox *m_checkBox; ///< Pointer to CheckBox
106     QLabel *m_locationLabel; ///< Pointer to locationLabel
107     QTextEdit *m_textEdit; ///< Pointer to TextEdit
108 };
109
110 #endif // UPDATELOCATIONDIALOG_H