#ifdef Q_WS_MAEMO_5
#include <QtMaemo5/QMaemo5InformationBox>
+#include <X11/Xlib.h>
+#include <X11/Xatom.h>
#endif // Q_WS_MAEMO_5
#include "common.h"
#include "mainwindow.h"
#include <QtGui/QX11Info>
-#include <X11/Xlib.h>
-#include <X11/Xatom.h>
// values for setting screen size in desktop matching N900 screen size
const int N900_APP_WIDTH = 800;
qDebug() << __PRETTY_FUNCTION__;
m_gpsToggleAct->setChecked(enabled);
- setOwnLocationCrosshairVisibility(!enabled);
+
+ if(m_loggedIn)
+ setOwnLocationCrosshairVisibility(!enabled);
+
m_autoCenteringAct->setVisible(enabled);
}
#endif
}
-void MainWindow::updateItemVisibility(bool show)
-{
- qDebug() << __PRETTY_FUNCTION__;
- if(show) {
- m_friendsListPanel->show();
- m_friendsListPanelSidebar->show();
- m_userPanel->show();
- m_userPanelSidebar->show();
-
- if(m_drawOwnLocationCrosshair)
- m_ownLocationCrosshair->show();
- }
- else {
- m_friendsListPanel->closePanel();
- m_friendsListPanel->hide();
- m_friendsListPanelSidebar->hide();
- m_userPanel->closePanel();
- m_userPanel->hide();
- m_userPanelSidebar->hide();
-
- m_ownLocationCrosshair->hide();
- }
-}
-
void MainWindow::startLoginProcess(const QUrl &url)
{
qDebug() << __PRETTY_FUNCTION__;
#endif // Q_WS_MAEMO_5
}
+void MainWindow::updateItemVisibility(bool show)
+{
+ qDebug() << __PRETTY_FUNCTION__;
+ if(show) {
+ m_friendsListPanel->show();
+ m_friendsListPanelSidebar->show();
+ m_userPanel->show();
+ m_userPanelSidebar->show();
+
+ if(m_drawOwnLocationCrosshair) {
+ m_ownLocationCrosshair->show();
+ setGPSButtonEnabled(false);
+ emit gpsTriggered(false);
+ }
+ }
+ else {
+ m_friendsListPanel->closePanel();
+ m_friendsListPanel->hide();
+ m_friendsListPanelSidebar->hide();
+ m_userPanel->closePanel();
+ m_userPanel->hide();
+ m_userPanelSidebar->hide();
+
+ m_ownLocationCrosshair->hide();
+ }
+}
+
const QString MainWindow::username()
{
qDebug() << __PRETTY_FUNCTION__;
void setUsername(const QString &username);
/**
- * @brief Shows / hides Situare related UI items
- *
- * @param show
- */
- void updateItemVisibility(bool show);
-
- /**
* @brief Public slot to intercept signal when old cerdentials are invalid or credentials
* doesn't exist yet
*
*/
void toggleProgressIndicator(bool state);
+ /**
+ * @brief Shows / hides Situare related UI items
+ *
+ * @param show
+ */
+ void updateItemVisibility(bool show);
+
private:
/**
* @brief Build friend list panel and connect slots