projects
/
situare
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Final implementation of logout
[situare]
/
src
/
ui
/
mainwindow.cpp
diff --git
a/src/ui/mainwindow.cpp
b/src/ui/mainwindow.cpp
index
cdd70f9
..
8c0942c
100644
(file)
--- a/
src/ui/mainwindow.cpp
+++ b/
src/ui/mainwindow.cpp
@@
-246,7
+246,6
@@
void MainWindow::createMenus()
// settings
m_toSettingsAct = new QAction(tr("Settings"), this);
// settings
m_toSettingsAct = new QAction(tr("Settings"), this);
- m_toSettingsAct->setObjectName(tr("Settings"));
connect(m_toSettingsAct, SIGNAL(triggered()),
this, SLOT(openSettingsDialog()));
connect(m_toSettingsAct, SIGNAL(triggered()),
this, SLOT(openSettingsDialog()));
@@
-400,15
+399,13
@@
void MainWindow::loggedIn(bool logged)
m_loggedIn = logged;
m_loggedIn = logged;
- if(m_loginAct) {
- if(logged) {
- m_loginAct->setText(tr("Logout"));
- }
- else {
- m_loginAct->setText(tr("Login"));
- }
- showPanels(m_loggedIn);
+ if(logged) {
+ m_loginAct->setText(tr("Logout"));
+ }
+ else {
+ m_loginAct->setText(tr("Login"));
}
}
+ showPanels(m_loggedIn);
}
void MainWindow::loginDialogDone(const QString &email, const QString &password)
}
void MainWindow::loginDialogDone(const QString &email, const QString &password)
@@
-490,12
+487,6
@@
void MainWindow::setMapViewScene(QGraphicsScene *scene)
m_mapView->setScene(scene);
}
m_mapView->setScene(scene);
}
-void MainWindow::setUsername(const QString &username)
-{
- qDebug() << __PRETTY_FUNCTION__;
- m_email = username;
-}
-
void MainWindow::setOwnLocationCrosshairVisibility(bool visibility)
{
qDebug() << __PRETTY_FUNCTION__;
void MainWindow::setOwnLocationCrosshairVisibility(bool visibility)
{
qDebug() << __PRETTY_FUNCTION__;
@@
-511,6
+502,12
@@
void MainWindow::setOwnLocationCrosshairVisibility(bool visibility)
}
}
}
}
+void MainWindow::setUsername(const QString &username)
+{
+ qDebug() << __PRETTY_FUNCTION__;
+ m_email = username;
+}
+
void MainWindow::setViewPortSize(int width, int height)
{
qDebug() << __PRETTY_FUNCTION__;
void MainWindow::setViewPortSize(int width, int height)
{
qDebug() << __PRETTY_FUNCTION__;
@@
-534,15
+531,16
@@
void MainWindow::showPanels(bool show)
{
qDebug() << __PRETTY_FUNCTION__;
if(show) {
{
qDebug() << __PRETTY_FUNCTION__;
if(show) {
- // ToDo: opening panels when needed
m_friendsListPanel->show();
m_friendsListPanelSidebar->show();
m_userPanel->show();
m_userPanelSidebar->show();
}
else {
m_friendsListPanel->show();
m_friendsListPanelSidebar->show();
m_userPanel->show();
m_userPanelSidebar->show();
}
else {
+ m_friendsListPanel->closePanel();
m_friendsListPanel->hide();
m_friendsListPanelSidebar->hide();
m_friendsListPanel->hide();
m_friendsListPanelSidebar->hide();
+ m_userPanel->closePanel();
m_userPanel->hide();
m_userPanelSidebar->hide();
}
m_userPanel->hide();
m_userPanelSidebar->hide();
}