m_errorShown(false),
m_loggedIn(false),
m_refresh(false),
+ m_progressIndicatorCount(0),
m_ownLocationCrosshair(0),
m_email(),
m_password(),
m_mapScale->stackUnder(m_ownLocationCrosshair);
m_mapView->stackUnder(m_mapScale);
- this->toggleProgressIndicator(true);
-
grabZoomKeys(true);
// Set default screen size
connect(m_mapView, SIGNAL(viewZoomFinished()),
this, SIGNAL(viewZoomFinished()));
+
+ connect(m_mapView, SIGNAL(zoomIn()),
+ this, SIGNAL(zoomIn()));
}
void MainWindow::buildMapScale()
qDebug() << __PRETTY_FUNCTION__;
clearCookieJar();
-
- toggleProgressIndicator(false);
-
startLoginProcess();
}
{
qDebug() << __PRETTY_FUNCTION__;
+ toggleProgressIndicator(true);
+
buildWebView();
loadCookies();
}
}
+void MainWindow::showPanels()
+{
+ qDebug() << __PRETTY_FUNCTION__;
+
+ drawFullScreenButton(m_viewPortSize);
+
+ if(m_loggedIn) {
+ if(!m_friendsListPanel->isVisible()) {
+ m_friendsListPanel->show();
+ m_friendsListPanelSidebar->show();
+ }
+
+ if(!m_userPanel->isVisible()) {
+ m_userPanel->show();
+ m_userPanelSidebar->show();
+ }
+ }
+}
+
void MainWindow::startLoginProcess()
{
qDebug() << __PRETTY_FUNCTION__;
qDebug() << __PRETTY_FUNCTION__;
#ifdef Q_WS_MAEMO_5
- static int counter = 0;
-
- if (value)
- counter++;
- else
- counter--;
-
- if (counter < 0)
- counter = 0;
-
- if (counter == 0)
- setAttribute(Qt::WA_Maemo5ShowProgressIndicator, false);
- else
+ if(value) {
+ m_progressIndicatorCount++;
setAttribute(Qt::WA_Maemo5ShowProgressIndicator, true);
+ } else {
+ if(m_progressIndicatorCount > 0)
+ m_progressIndicatorCount--;
+
+ if(m_progressIndicatorCount == 0)
+ setAttribute(Qt::WA_Maemo5ShowProgressIndicator, false);
+ }
#else
Q_UNUSED(value);
#endif // Q_WS_MAEMO_5
{
qDebug() << __PRETTY_FUNCTION__;
- if(m_loggedIn) {
- m_friendsListPanel->show();
- m_friendsListPanelSidebar->show();
- m_userPanel->show();
- m_userPanelSidebar->show();
+ if(m_loggedIn) {
if(!m_gpsToggleAct->isChecked())
setOwnLocationCrosshairVisibility(true);
m_userPanelSidebar->hide();
setOwnLocationCrosshairVisibility(false);
}
- drawFullScreenButton(m_viewPortSize);
}
const QString MainWindow::username()
// qwebview starts to load a new page while the current page loading is not finished
if(reply->error() != QNetworkReply::OperationCanceledError &&
reply->error() != QNetworkReply::NoError) {
- emit error(reply->error());
- toggleProgressIndicator(false);
+ emit error(ErrorContext::NETWORK, reply->error());
}
}