X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=src%2Fui%2Fmainwindow.cpp;h=446e9526c03883c4e55bc5a8659f7db1163410ec;hb=e6008e53f49cd12f512f9e8a301b268cc6ef19d4;hp=a32659e17ae416278eaf545327280e70663aeff7;hpb=804f5f55ea87dd57d5bf60725a42e84345fac07e;p=situare diff --git a/src/ui/mainwindow.cpp b/src/ui/mainwindow.cpp index a32659e..446e952 100644 --- a/src/ui/mainwindow.cpp +++ b/src/ui/mainwindow.cpp @@ -7,6 +7,7 @@ Jussi Laitinen - jussi.laitinen@ixonos.com Sami Rämö - sami.ramo@ixonos.com Ville Tiensuu - ville.tiensuu@ixonos.com + Katri Kaikkonen - katri.kaikkonen@ixonos.com Situare is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -34,7 +35,6 @@ #include "error.h" #include "friendlistpanel.h" #include "fullscreenbutton.h" -#include "indicatorbutton.h" #include "logindialog.h" #include "mapscale.h" #include "panelcommon.h" @@ -43,6 +43,7 @@ #include "settingsdialog.h" #include "userinfopanel.h" #include "zoombuttonpanel.h" +#include "indicatorbuttonpanel.h" #include "mainwindow.h" @@ -96,8 +97,8 @@ MainWindow::MainWindow(QWidget *parent) m_osmLicense->stackUnder(m_zoomButtonPanel); } m_ownLocationCrosshair->stackUnder(m_osmLicense); - m_indicatorButton->stackUnder(m_ownLocationCrosshair); - m_mapScale->stackUnder(m_indicatorButton); + m_indicatorButtonPanel->stackUnder(m_ownLocationCrosshair); + m_mapScale->stackUnder(m_indicatorButtonPanel); m_mapView->stackUnder(m_mapScale); grabZoomKeys(true); @@ -169,19 +170,22 @@ void MainWindow::buildFriendListPanel() m_friendsListPanel, SLOT(friendImageReady(User*))); } -void MainWindow::buildIndicatorButton() +void MainWindow::buildIndicatorButtonPanel() { qDebug() << __PRETTY_FUNCTION__; - m_indicatorButton = new IndicatorButton(this); + m_indicatorButtonPanel = new IndicatorButtonPanel(this); - connect(m_indicatorButton, SIGNAL(autoCenteringTriggered(bool)), + connect(m_indicatorButtonPanel, SIGNAL(autoCenteringTriggered(bool)), this, SIGNAL(autoCenteringTriggered(bool))); connect(m_mapView, SIGNAL(viewResized(QSize)), - m_indicatorButton, SLOT(screenResized(QSize))); + m_indicatorButtonPanel, SLOT(screenResized(QSize))); - connect(m_indicatorButton, SIGNAL(draggingModeTriggered()), + connect(this, SIGNAL(directionIndicatorValuesUpdate(qreal, qreal, bool)), + m_indicatorButtonPanel, SIGNAL(directionIndicatorValuesUpdate(qreal, qreal, bool))); + + connect(m_indicatorButtonPanel, SIGNAL(draggingModeTriggered()), this, SIGNAL(draggingModeTriggered())); } @@ -242,7 +246,7 @@ void MainWindow::buildMap() buildOsmLicense(); buildManualLocationCrosshair(); buildFullScreenButton(); - buildIndicatorButton(); + buildIndicatorButtonPanel(); buildMapScale(); connect(m_mapView, SIGNAL(viewScrolled(SceneCoordinate)), @@ -801,8 +805,7 @@ void MainWindow::setIndicatorButtonEnabled(bool enabled) { qDebug() << __PRETTY_FUNCTION__; - m_indicatorButton->setChecked(enabled); - + m_indicatorButtonPanel->setIndicatorButtonEnabled(enabled); } void MainWindow::setMapViewScene(QGraphicsScene *scene)