SituareEngine::SituareEngine(QMainWindow *parent)
: QObject(parent)
{
- m_loggedIn = false;
- m_facebookAuthenticator = new FacebookAuthentication();
-
m_networkManager = new QNetworkAccessManager;
m_situareService = new SituareService(this,m_networkManager);
+
+ m_loggedIn = false;
+ m_facebookAuthenticator = new FacebookAuthentication();
connect(m_facebookAuthenticator, SIGNAL(credentialsReady()), this, SLOT(loginOk()));
connect(m_facebookAuthenticator, SIGNAL(userExit()), this, SLOT(loginScreenClosed()));
}
m_personalInfo->setTime("1 hour ago");
m_personalInfo->setAddress("Kiviharjunlenkki 1E, 91910 Oulu");
- m_locationDialog = new UpdateLocationDialog(this);
+
m_widgetProxy = new QGraphicsProxyWidget();
m_widgetProxy->setWidget(m_personalInfo);
void ListViewScreen::updateMessage()
{
qDebug() << __PRETTY_FUNCTION__;
- m_locationDialog->exec();
+// m_locationDialog->exec();
}
#include <QtGui>
#include "infotab.h"
#include "pixmap.h"
-#include "updatelocation/updatelocationdialog.h"
+
/**
* @brief List View class. Used for displaying List of friends
/*******************************************************************************
* DATA MEMBERS
******************************************************************************/
+public:
+ InfoTab *m_personalInfo; ///< Personal info tab
+
private:
QVBoxLayout *m_vbox; ///< Holds the graphics view
- InfoTab *m_personalInfo; ///< Personal info tab
Pixmap *m_arrowbutton; ///< Button which reveals/hides the info tab when pressed
QGraphicsProxyWidget *m_widgetProxy; ///< Embeds InfoTab to graphics view
QAbstractTransition *m_trans1; ///< Animation transition from hidden state to visible
QPropertyAnimation *m_anim2; ///< Animation for arrowbutton from hidden to visible
QPropertyAnimation *m_anim3; ///< Animation for infotab from visible to hidden
QPropertyAnimation *m_anim4; ///< Animation for arrowbutton from visible to hidden
- UpdateLocationDialog *m_locationDialog; ///< Message dialog
};
#endif // LISTVIEWTAB_H
connect(m_situareEngine, SIGNAL(engine_showMainWindow()), this, SLOT(show()));
connect(m_situareEngine, SIGNAL(engine_closeMainWindow()), this, SLOT(close()));
+ m_locationDialog = new UpdateLocationDialog(this);
// connect(m_listViewScreen->m_personalInfo,
// SIGNAL(launchUpdateFriendsStatus()),
// m_situareEngine,
// SLOT(updateFriendsList()));
+ connect(m_listViewScreen->m_personalInfo,SIGNAL(launchMessageUpdate()),
+ this,SLOT(openLocationUpdateDialog()));
m_situareEngine->start();
}
break;
}
}
+void MainWindow::openLocationUpdateDialog()
+{
+ qDebug() << __PRETTY_FUNCTION__;
+ m_locationDialog->exec();
+}
#include "engine/engine.h"
#include "listviewscreen.h"
#include "mapviewscreen.h"
+#include "updatelocation/updatelocationdialog.h"
class QLabel;
class QStackedWidget;
void switchView(int);
private slots:
-
+ void openLocationUpdateDialog();
/*******************************************************************************
* DATA MEMBERS
******************************************************************************/
QAction *m_toListViewAct; ///< Action to trigger switch to list view
QAction *m_toMapViewAct; ///< Action to trigger switch to map view
QMenu *m_viewMenu; ///< Object that hold the view menu items
+
+ UpdateLocationDialog *m_locationDialog; ///< Message dialog
};
#endif // MAINWINDOW_H