Review & fixing some small defects
authorSami Rämö <sami.ramo@ixonos.com>
Tue, 24 Aug 2010 07:44:02 +0000 (10:44 +0300)
committerSami Rämö <sami.ramo@ixonos.com>
Tue, 24 Aug 2010 07:44:02 +0000 (10:44 +0300)
 - Reviewed by Jussi Laitinen

src/map/mapview.cpp
src/map/mapview.h
src/ui/mainwindow.cpp
src/ui/mainwindow.h

index 8df461c..952fb06 100644 (file)
@@ -87,9 +87,8 @@ void MapView::centerToSceneCoordinates(const SceneCoordinate &coordinate, bool i
     QPointF target = coordinate.toPointF();
     m_lastSetScenePosition = coordinate;
 
-    if (!isUserDragAction) {
+    if (!isUserDragAction)
         target += m_centerHorizontalShiftPoint;
-    }
 
     centerOn(target);
 }
index 91c9e36..41a3a68 100644 (file)
@@ -188,13 +188,6 @@ private:
     void setViewShift(qreal viewShift);
 
     /**
-    * @brief Toggles the shifting of the center point
-    *
-    * @param enabled True if shifting is enabled
-    */
-    void toggleCenterShift(bool enabled);
-
-    /**
     * @brief Update center shifting value
     */
     void updateCenterShift();
index daa00c2..515cb3b 100644 (file)
@@ -278,7 +278,7 @@ void MainWindow::buildMap()
             this, SLOT(drawMapScale(QSize)));
 
     connect(m_mapView, SIGNAL(viewResized(QSize)),
-             this, SLOT(setViewPortSize(QSize)));
+             this, SLOT(moveCrosshair()));
 
     connect(this, SIGNAL(zoomLevelChanged(int)),
             m_mapView, SLOT(setZoomLevel(int)));
@@ -904,13 +904,6 @@ void MainWindow::setUsername(const QString &username)
     m_email = username;
 }
 
-void MainWindow::setViewPortSize(const QSize &size)
-{
-    qDebug() << __PRETTY_FUNCTION__;
-
-    m_viewPortSize = size;
-}
-
 void MainWindow::showEnableAutomaticUpdateLocationDialog(const QString &text)
 {
     qDebug() << __PRETTY_FUNCTION__;
index 64d5630..c36342b 100644 (file)
@@ -394,13 +394,6 @@ private slots:
     void settingsDialogAccepted();
 
     /**
-     * @brief Set correnct view port size to datamembers
-     *
-     * @param size Size of the screen
-     */
-    void setViewPortSize(const QSize &size);
-
-    /**
      * @brief Start location search (open search dialog)
      */
     void startLocationSearch();
@@ -685,8 +678,6 @@ private:
 
     QMessageBox *m_automaticUpdateLocationDialog;   ///< Automatic update location dialog
 
-    QSize m_viewPortSize;                 ///< Size of the viewport
-
     QString m_email;                        ///< Placeholder for email
     QString m_password;                     ///< Placeholder for password