class FacebookAuthentication;
class FriendListPanel;
+class MapScale;
class MapScene;
class MapView;
class SituareService;
class ZoomButtonPanel;
class SettingsDialog;
class QToolButton;
+class QMessageBox;
/**
* @brief Main Window Class
void loggedIn(bool logged);
/**
+ * @brief Requests automatic location update settings.
+ */
+ void requestAutomaticLocationUpdateSettings();
+
+
+ /**
* @brief Enable / disable auto centering button.
*
* @param enabled true if shoud be enabled, false otherwise
void setMapViewScene(QGraphicsScene *scene);
/**
+ * Shows dialog with enable automatic location update question.
+ *
+ * @param text text to show in dialog
+ */
+ void showEnableAutomaticUpdateLocationDialog(const QString &text);
+
+ /**
* @brief Gets the username from member variable for saving purposes
*
* @return QString Username
void buildMap();
/**
+ * @brief Build map scale and connect slots
+ */
+ void buildMapScale();
+
+ /**
* @brief Build OSM license and connect slots
*/
void buildOsmLicense();
*/
void setOwnLocationCrosshairVisibility(bool visible);
- void showErrorNote();
+ /**
+ * @brief Shows queued error information box
+ *
+ */
+ void showErrorInformationBox();
/**
* @brief Shows queued information box
private slots:
/**
+ * @brief Slot for automatic update dialog finished.
+ *
+ * @result result code
+ */
+ void automaticUpdateDialogFinished(int result);
+
+ /**
* @brief Slot to intercept signal when dialog/information note is processed
*
* @param status Status of the dialog
void drawFullScreenButton(const QSize &size);
/**
+ * @brief Slot for drawing the map distance scale
+ *
+ * @param size Size of the screen
+ */
+ void drawMapScale(const QSize &size);
+
+ /**
* @brief Slot for drawing the Open Street Map license text
*
* @param size Size of the screen
/**
* @brief Slot for drawing the own location crosshair
*
- * @param width Width of the viewport
- * @param height Height of the viewport
+ * @param size Size of the screen
+ */
+ void drawOwnLocationCrosshair(const QSize &size);
+
+ /**
+ * @brief Slot to intercept signal when error dialog/information note is processed
+ *
+ * @param status Status of the dialog
*/
- void drawOwnLocationCrosshair(int width, int height);
+ void errorDialogFinished(int status);
/**
* @brief Slot for gps timeout.
/**
* @brief Set correnct view port size to datamembers
*
- * @param width Width of the viewport
- * @param height Height of the viewport
+ * @param size Size of the screen
*/
- void setViewPortSize(const int width, const int height);
+ void setViewPortSize(const QSize &size);
/**
* @brief Toggle between fullscreen and normal window mode
*/
void toggleFullScreen();
+ /**
+ * @brief Slot to intercept signal from webview's networkaccessmanager
+ *
+ * @param reply Network reply (contains errors)
+ */
void webViewRequestFinished(QNetworkReply* reply);
- void errorNoteFinished();
-
/*******************************************************************************
* SIGNALS
******************************************************************************/
void maxZoomLevelReached();
/**
+ * @brief Signal that informs that user's message/location failed to update on Situare server
+ * This signal is originally sended from SituareService with name error
+ * Signal is renamed on MainWindow
+ */
+ void messageSendingFailed(const QString &error);
+
+ /**
* @brief Forwarding signal from MapEngine to MapView
*/
void minZoomLevelReached();
/**
+ * @brief Signal that used to inform user that his message/location update tp Situare server
+ * was failed.
+ * This signal is originally sended from UserInfo
+ */
+ void notificateUpdateFailing(const QString &message);
+
+ /**
+ * @brief Forwarding signal from MapEngine to MapScale
+ */
+ void newMapResolution(qreal scale);
+
+ /**
* @brief Signal for refreshing user data.
*
*/
void updateCredentials(const QUrl &url);
/**
+ * @brief Signals when updateLocation request finished successfully
+ *
+ */
+ void updateWasSuccessful();
+
+ /**
* @brief MapView has finished zooming
*/
void viewZoomFinished();
******************************************************************************/
private:
bool m_drawOwnLocationCrosshair; ///< Flag for making ownLocationCrosshair visible or not
+ bool m_errorShown; ///< Indicates if error dialog/note is shown
bool m_loggedIn; ///< Indicates login state
bool m_refresh; ///< Indicates when webpage is refreshed
QLabel *m_osmLicense; ///< Label for Open Street Map license
QLabel *m_ownLocationCrosshair; ///< Label that show ownLocationCrosshair
+ QList<QDialog *> m_error_queue; ///< QList type error dialog queue
+ QList<QDialog *> m_queue; ///< QList type dialog queue
+
QMenu *m_viewMenu; ///< Object that hold the view menu items
+ QMessageBox *m_automaticUpdateLocationDialog; ///< Automatic update location dialog
+
QString m_email; ///< Placeholder for email
QString m_password; ///< Placeholder for password
QWebView *m_webView; ///< Shows facebook login page
FriendListPanel *m_friendsListPanel; ///< Instance of friends list panel
+ MapScale *m_mapScale; ///< Instance of the map scale
MapView *m_mapView; ///< Instance of the map view
NetworkCookieJar *m_cookieJar; ///< Placeholder for QNetworkCookies
PanelSideBar *m_userPanelSidebar; ///< User panel side bar
ZoomButtonPanel *m_zoomButtonPanel; ///< Instance of zoom button panel
SettingsDialog *m_settingsDialog; ///< Settings dialog
-
- QList<QDialog *> m_queue;
- QList<QDialog *> m_modal_queue;
};
#endif // MAINWINDOW_H