Merge branch 'master' into zoom_button_drag
[situare] / src / ui / mainwindow.cpp
index 5546a3e..8b58426 100644 (file)
@@ -116,9 +116,6 @@ void MainWindow::buildFriendListPanel()
             this, SIGNAL(findFriend(QPointF)));
 
     connect(m_mapView, SIGNAL(viewResized(QSize)),
-            m_zoomButtonPanel, SLOT(screenResized(QSize)));
-
-    connect(m_mapView, SIGNAL(viewResized(QSize)),
             m_friendsListPanel, SLOT(screenResized(QSize)));
 
     connect(this, SIGNAL(locationItemClicked(QList<QString>)),
@@ -200,6 +197,9 @@ void MainWindow::buildUserInfoPanel()
     m_userPanelSidebar->stackUnder(m_friendsListPanel);
     m_userPanel->stackUnder(m_userPanelSidebar);
 
+    connect(m_userPanel, SIGNAL(findUser(QPointF)),
+            this, SIGNAL(findUser(QPointF)));
+
     connect(this, SIGNAL(userLocationReady(User*)),
             m_userPanel, SLOT(userDataReceived(User*)));
 
@@ -223,8 +223,7 @@ void MainWindow::buildZoomButtonPanel()
 {
     qDebug() << __PRETTY_FUNCTION__;
 
-    m_zoomButtonPanel = new ZoomButtonPanel(this, ZOOM_BUTTON_PANEL_POSITION_X,
-                                            ZOOM_BUTTON_PANEL_POSITION_Y);
+    m_zoomButtonPanel = new ZoomButtonPanel(this);
 
     connect(m_zoomButtonPanel->zoomInButton(), SIGNAL(clicked()),
             this, SIGNAL(zoomIn()));
@@ -241,10 +240,8 @@ void MainWindow::buildZoomButtonPanel()
     connect(this, SIGNAL(minZoomLevelReached()),
             m_zoomButtonPanel, SLOT(disableZoomOutButton()));
 
-    QSettings settings(DIRECTORY_NAME, FILE_NAME);
-    m_zoomButtonPanel->move(settings.value(ZOOMPANEL_POSITION,
-                                           QPoint(ZOOM_BUTTON_PANEL_POSITION_X,
-                                                  ZOOM_BUTTON_PANEL_POSITION_Y)).toPoint());
+    connect(m_mapView, SIGNAL(viewResized(QSize)),
+            m_zoomButtonPanel, SLOT(screenResized(QSize)));
 }
 
 void MainWindow::createMenus()
@@ -287,8 +284,9 @@ void MainWindow::drawOsmLicense(const QSize &size)
 {
     qDebug() << __PRETTY_FUNCTION__ << size.width() << "x" << size.height();
 
-    m_osmLicense->move(size.width() - m_osmLicense->fontMetrics().width(OSM_LICENSE) - PANEL_PEEK_AMOUNT,
-                        size.height() - m_osmLicense->fontMetrics().height());
+    m_osmLicense->move(size.width() - m_osmLicense->fontMetrics().width(OSM_LICENSE)
+                       - PANEL_PEEK_AMOUNT,
+                       size.height() - m_osmLicense->fontMetrics().height());
 
 }