Changed from dialog to stacked widget
[situare] / src / ui / updatelocation / updatelocationdialog.h
old mode 100755 (executable)
new mode 100644 (file)
index 56639fa..a19a237
-/*
-   Situare - A location system for Facebook
-   Copyright (C) 2010  Ixonos Plc. Authors:
-
-      Katri Kaikkonen - katri.kaikkonen@ixonos.com
-      Henri Lampela - henri.lampela@ixonos.com
-
-   Situare is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public License
-   version 2 as published by the Free Software Foundation.
-
-   Situare is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with Situare; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301,
-   USA.
-*/
-
-#ifndef UPDATELOCATIONDIALOG_H
-#define UPDATELOCATIONDIALOG_H
-
-#include <QDialog>
-#ifdef Q_WS_MAEMO_5
-#include <QAbstractKineticScroller>
-#endif // Q_WS_MAEMO_5
-#include "texteditautoresizer.h"
-
-class QCheckBox;
-class QDialogButtonBox;
-class QGroupBox;
-class QLabel;
-class QLineEdit;
-class QPushButton;
-class QScrollArea;
-class QTextEdit;
-
-/**
-* @brief Update Location UI
-*
-* UI for update location functionality.
-*
-* @class UpdateLocationDialog
-*/
-class UpdateLocationDialog : public QDialog
-{
-    Q_OBJECT
-
-public:
-    /**
-    * @brief Default constructor
-    *
-    * @param parent
-    */
-    UpdateLocationDialog(QWidget *parent = 0);
-    ~UpdateLocationDialog();
-
-/*******************************************************************************
- * MEMBER FUNCTIONS AND SLOTS
- ******************************************************************************/
-public slots:
-    /**
-    * @brief Public slot, which is used to set the street address to location label
-    *
-    * @param address Street address, result from SituareService's reverseGeo
-    */
-    void setAddress(const QString &address);
-
-private slots:
-    /**
-    * @brief Private slot, which is used to connect send button
-    *
-    */
-    void sendUpdate();
-
-    /**
-    * @brief Private slot, which counts message text length
-    *
-    */
-    void characterCounter();
-
-/*******************************************************************************
- * SIGNALS
- ******************************************************************************/
-signals:
-    /**
-    * @brief Signal Signal for requestLocationUpdate from SituareEngine via MainWindow class
-    *
-    * @param status Status message
-    * @param publish Publish on Facebook
-    */
-    void statusUpdate(const QString &status, const bool &publish);
-
-/*******************************************************************************
- * DATA MEMBERS
- ******************************************************************************/
-private:
-    QCheckBox *m_checkBox; ///< Pointer to CheckBox
-    QLabel *m_characterLabel; ///< Pointer to characterLabel
-    QLabel *m_characterNumberLabel;
-    QLabel *m_locationLabel; ///< Pointer to locationLabel
-    QTextEdit *m_textEdit; ///< Pointer to TextEdit
-};
-
-#endif // UPDATELOCATIONDIALOG_H
+/*\r
+   Situare - A location system for Facebook\r
+   Copyright (C) 2010  Ixonos Plc. Authors:\r
+\r
+      Katri Kaikkonen - katri.kaikkonen@ixonos.com\r
+      Henri Lampela - henri.lampela@ixonos.com\r
+\r
+   Situare is free software; you can redistribute it and/or\r
+   modify it under the terms of the GNU General Public License\r
+   version 2 as published by the Free Software Foundation.\r
+\r
+   Situare is distributed in the hope that it will be useful,\r
+   but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+   GNU General Public License for more details.\r
+\r
+   You should have received a copy of the GNU General Public License\r
+   along with Situare; if not, write to the Free Software\r
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301,\r
+   USA.\r
+*/\r
+\r
+#ifndef UPDATELOCATIONDIALOG_H\r
+#define UPDATELOCATIONDIALOG_H\r
+\r
+#include <QDialog>\r
+#ifdef Q_WS_MAEMO_5\r
+#include <QAbstractKineticScroller>\r
+#endif // Q_WS_MAEMO_5\r
+#include "texteditautoresizer.h"\r
+\r
+class QCheckBox;\r
+class QDialogButtonBox;\r
+class QGroupBox;\r
+class QLabel;\r
+class QLineEdit;\r
+class QPushButton;\r
+class QScrollArea;\r
+class QTextEdit;\r
+\r
+/**\r
+* @brief Update Location UI\r
+*\r
+* UI for update location functionality.\r
+*\r
+* @class UpdateLocationDialog\r
+*/\r
+class UpdateLocationDialog : public QDialog\r
+{\r
+    Q_OBJECT\r
+\r
+public:\r
+    /**\r
+    * @brief Default constructor\r
+    *\r
+    * @param userMessage update location dialog message\r
+    * @param publishOnFacebook update location dialog Facebook publish policity\r
+    * @param parent\r
+    */\r
+    UpdateLocationDialog(const QString &userMessage = "", bool publishOnFacebook = false,\r
+                         QWidget *parent = 0);\r
+\r
+    ~UpdateLocationDialog();\r
+\r
+/*******************************************************************************\r
+ * MEMBER FUNCTIONS AND SLOTS\r
+ ******************************************************************************/\r
+\r
+public slots:\r
+\r
+    /**\r
+    * @brief Public slot, which is used to set the street address to location label\r
+    *\r
+    * @param address Street address, result from SituareService's reverseGeo\r
+    */\r
+    void setAddress(const QString &address);\r
+\r
+private slots:\r
+\r
+    /**\r
+    * @brief Private slot, which is used to connect send button\r
+    *\r
+    */\r
+    void sendUpdate();\r
+    void textChanged();\r
+    void textSelectionChanged();\r
+\r
+/*******************************************************************************\r
+ * SIGNALS\r
+ ******************************************************************************/\r
+\r
+signals:\r
+\r
+    /**\r
+    * @brief Signal Signal for requestLocationUpdate from SituareEngine via MainWindow class\r
+    *\r
+    * @param status Status message\r
+    * @param publish Publish on Facebook\r
+    */\r
+    void statusUpdate(const QString &status, const bool &publish);\r
+\r
+/*******************************************************************************\r
+ * DATA MEMBERS\r
+ ******************************************************************************/\r
+\r
+private:\r
+\r
+    QCheckBox *m_checkBox; ///< Pointer to CheckBox\r
+    QLabel *m_locationLabel; ///< Pointer to locationLabel\r
+    QLabel *m_charCountLabel; ///< Pointer to locationLabel\r
+    QTextEdit *m_textEdit; ///< Pointer to TextEdit\r
+};\r
+\r
+#endif // UPDATELOCATIONDIALOG_H\r