#include "map/mapview.h"
#include "panelsidebar.h"
#include "settingsdialog.h"
-#include "userpanel.h"
+#include "userinfopanel.h"
#include "zoombuttonpanel.h"
#include "mainwindow.h"
connect(m_friendsListPanel, SIGNAL(findFriend(QPointF)),
this, SIGNAL(findFriend(QPointF)));
- connect(m_mapView, SIGNAL(viewResizedNewSize(int, int)),
- m_friendsListPanel, SLOT(reDrawFriendsPanel(int, int)));
+ connect(m_mapView, SIGNAL(viewResized(QSize)),
+ m_friendsListPanel, SLOT(screenResized(QSize)));
connect(m_mapView, SIGNAL(viewResizedNewSize(int, int)),
friendsListPanelSidebar, SLOT(reDrawSidebar(int, int)));
void MainWindow::buildOsmLicense()
{
- qDebug() << __PRETTY_FUNCTION__;
+ qWarning() << __PRETTY_FUNCTION__;
m_osmLicense = new QLabel(this);
m_osmLicense->setAttribute(Qt::WA_TranslucentBackground, true);
m_osmLicense->resize(m_osmLicense->fontMetrics().width(OSM_LICENSE),
m_osmLicense->fontMetrics().height());
- connect(m_mapView, SIGNAL(viewResizedNewSize(int, int)),
- this, SLOT(drawOsmLicense(int, int)));
+ connect(m_mapView, SIGNAL(viewResized(QSize)),
+ this, SLOT(drawOsmLicense(QSize)));
}
void MainWindow::buildUserInfoPanel()
connect(m_userPanel, SIGNAL(refreshUserData()),
this, SIGNAL(refreshUserData()));
- connect(m_mapView, SIGNAL(viewResizedNewSize(int, int)),
- m_userPanel, SLOT(reDrawUserPanel(int, int)));
+ connect(m_mapView, SIGNAL(viewResized(QSize)),
+ m_userPanel, SLOT(screenResized(QSize)));
}
void MainWindow::buildZoomButtonPanel()
m_viewMenu->setObjectName(tr("Menu"));
}
-void MainWindow::drawOsmLicense(int width, int height)
+void MainWindow::drawOsmLicense(const QSize &size)
{
- qDebug() << __PRETTY_FUNCTION__ << width << "x" << height;
+ 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(width - m_osmLicense->fontMetrics().width(OSM_LICENSE) - PANEL_PEEK_AMOUNT,
- height - m_osmLicense->fontMetrics().height());
}
void MainWindow::drawOwnLocationCrosshair(int width, int height)
this, SIGNAL(toggleState()));
// set mask to allow clicking zoom button at their default position
- setMask(QPixmap(":/res/images/userpanel_mask.png").mask());
+// setMask(QPixmap(":/res/images/userpanel_mask.png").mask());
m_panelStateClosed->assignProperty(this, "pos", QPoint(
USERPANEL_CLOSED_X, PANEL_TOP_Y));
setObjectName("FriendPanel");
}
else {
+ qWarning() << "In" << __PRETTY_FUNCTION__ << ":" << type;
qFatal("Illegal type set for SidePanel::setType");
}
m_panelStateMachine->start();