network/networkaccessmanager.cpp \
network/networkhandler.cpp \
network/networkcookiejar.cpp \
- network/networkreply.cpp
+ network/networkreply.cpp \
+ ui/mapscale.cpp
HEADERS += ui/mainwindow.h \
map/mapengine.h \
map/mapview.h \
network/networkaccessmanager.h \
network/networkhandler.h \
network/networkcookiejar.h \
- network/networkreply.h
+ network/networkreply.h \
+ ui/mapscale.h
QT += network \
webkit
#include "settingsdialog.h"
#include "userinfopanel.h"
#include "zoombuttonpanel.h"
+#include "mapscale.h"
#include "mainwindow.h"
createMenus();
setWindowTitle(tr("Situare"));
+ MapScale *mapScale = new MapScale(this);
+ mapScale->move(250,250);
+
// set stacking order of widgets
m_zoomButtonPanel->stackUnder(m_userPanel);
if(m_fullScreenButton) {
m_fullScreenButton->stackUnder(m_zoomButtonPanel);
m_osmLicense->stackUnder(m_fullScreenButton);
} else
- m_osmLicense->stackUnder(m_zoomButtonPanel);
+ m_osmLicense->stackUnder(m_zoomButtonPanel);
m_ownLocationCrosshair->stackUnder(m_osmLicense);
- m_mapView->stackUnder(m_ownLocationCrosshair);
+
+ mapScale->stackUnder(m_ownLocationCrosshair);
+
+ m_mapView->stackUnder(mapScale);
this->toggleProgressIndicator(true);
--- /dev/null
+ /*
+ Situare - A location system for Facebook
+ Copyright (C) 2010 Ixonos Plc. Authors:
+
+ Kaj Wallin - kaj.wallin@ixonos.com
+
+ Situare is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ version 2 as published by the Free Software Foundation.
+
+ Situare is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Situare; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ USA.
+ */
+
+#include <QPainter>
+#include <QLine>
+#include "mapscale.h"
+
+MapScale::MapScale(QWidget *parent) :
+ QWidget(parent)
+{
+ qDebug() << __PRETTY_FUNCTION__;
+}
+
+MapScale::paintEvent(QPaintEvent *event)
+{
+ qDebug() << __PRETTY_FUNCTION__;
+
+ Q_UNUSED(event);
+
+ QLineF mapScaleBaseLine(2.0, 5.0, 20.0, 5.0);
+ QPainter painter(this);
+ painter.drawLine(mapScaleBaseLine);
+
+}
--- /dev/null
+ /*
+ Situare - A location system for Facebook
+ Copyright (C) 2010 Ixonos Plc. Authors:
+
+ Kaj Wallin - kaj.wallin@ixonos.com
+
+ Situare is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ version 2 as published by the Free Software Foundation.
+
+ Situare is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Situare; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ USA.
+ */
+
+
+#ifndef MAPSCALE_H
+#define MAPSCALE_H
+
+#include <QWidget>
+
+class MapScale : public QWidget
+{
+ Q_OBJECT
+
+public:
+ MapScale(QWidget *parent = 0);
+
+/*******************************************************************************
+ * BASE CLASS INHERITED AND REIMPLEMENTED MEMBER FUNCTIONS
+ ******************************************************************************/
+ /**
+ * @brief Event handler for paint events
+ *
+ * Paints the button and its icon
+ * @param event Paint event
+ */
+ void paintEvent(QPaintEvent *event);
+
+/******************************************************************************
+ * MEMBER FUNCTIONS AND SLOTS
+ ******************************************************************************/
+public slots:
+
+/*******************************************************************************
+ * SIGNALS
+ ******************************************************************************/
+signals:
+
+/*******************************************************************************
+ * DATA MEMBERS
+ ******************************************************************************/
+};
+
+#endif // MAPSCALE_H