ui/infotab.cpp \
ui/updatelocation/updatelocationdialog.cpp \
ui/updatelocation/texteditautoresizer.cpp \
+ engine/engine.cpp \
- user/user.cpp
+ user/user.cpp \
+ ui/settingsdialog.cpp
HEADERS += ui/mainwindow.h \
ui/mapviewscreen.h \
ui/listviewscreen.h \
facebookservice/facebookcredentials.h \
facebookservice/facebookauthentication.h \
facebookservice/facebookcommon.h \
+ engine/engine.h \
- user/user.h
+ user/user.h \
+ ui/settingsdialog.h
QT += network \
webkit
#include "mainwindow.h"
#include "listviewscreen.h"
#include "mapviewscreen.h"
+ #include "settingsdialog.h"
#include "facebookservice/facebookauthentication.h"
#include "situareservice/situareservice.h"
+#include "engine/engine.h"
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent)
break;
}
}
+
+void MainWindow::openLocationUpdateDialog()
+{
+ qDebug() << __PRETTY_FUNCTION__;
+ m_locationDialog->exec();
+}
++
+ void MainWindow::openSettingsDialog()
+ {
+ qDebug() << __PRETTY_FUNCTION__;
+ SettingsDialog *dialog = new SettingsDialog(this);
+ dialog->show();
+ }
+
-void MainWindow::loginScreenClosed()
-{
- qDebug() << __PRETTY_FUNCTION__ << m_loggedIn;
- if (m_loggedIn) {
- this->show();
- return;
- }
- else {
- this->close();
- }
-}
+
-void MainWindow::loginOK()
-{
- qDebug() << __PRETTY_FUNCTION__ << m_loggedIn;
- m_loggedIn = true;
- m_facebookAuthenticator->close();
-}
/*******************************************************************************
* MEMBER FUNCTIONS AND SLOTS
******************************************************************************/
-
public slots:
/**
+ * @brief Public slot, which open settings dialog
+ */
+ void openSettingsDialog();
+
+ /**
* @brief Public slot, which initiates toListViewAct action to switch view
*/
void toListView();
QStackedWidget *m_situareViews; ///< Stacked widget that hold both view widgets
QAction *m_toListViewAct; ///< Action to trigger switch to list view
QAction *m_toMapViewAct; ///< Action to trigger switch to map view
+ QAction *m_toSettingsAct; ///< Action to trigger switch to settings dialog
QMenu *m_viewMenu; ///< Object that hold the view menu items
+ UpdateLocationDialog *m_locationDialog; ///< Message dialog
};
#endif // MAINWINDOW_H