+++ /dev/null
-/*
- Situare - A location system for Facebook
- Copyright (C) 2010 Ixonos Plc. Authors:
-
- Pekka Nissinen - pekka.nissinen@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 <QDebug>
-#include <QPixmap>
-
-#include "mapbutton.h"
-#include "mapcommon.h"
-
-MapButton::MapButton(QString fileName)
- : m_buttonMode(QIcon::Normal)
- , m_buttonWidth(MAP_ZOOM_PANEL_BUTTON_SIZE)
- , m_buttonHeight(MAP_ZOOM_PANEL_BUTTON_SIZE)
-{
- qDebug() << __PRETTY_FUNCTION__;
-
- addFile(fileName);
-}
-
-void MapButton::draw(QPainter *painter, int x, int y)
-{
- qDebug() << __PRETTY_FUNCTION__;
-
- paint(painter, x, y, m_buttonWidth, m_buttonHeight, NULL, m_buttonMode);
-}
-
-void MapButton::setMode(QIcon::Mode mode)
-{
- qDebug() << __PRETTY_FUNCTION__;
-
- m_buttonMode = mode;
-}
+++ /dev/null
-/*
- Situare - A location system for Facebook
- Copyright (C) 2010 Ixonos Plc. Authors:
-
- Pekka Nissinen - pekka.nissinen@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 MAPBUTTON_H
-#define MAPBUTTON_H
-
-#include <QIcon>
-#include <QString>
-#include <QPainter>
-
-/**
-* @brief A simple class for icon button
-*
-* @author Pekka Nissinen - pekka.nissinen (at) ixonos.com
-*/
-class MapButton : public QIcon
-{
-public:
- /**
- * @brief Constructor
- *
- * @param fileName Icon image file name
- */
- MapButton(QString fileName);
-
-/*******************************************************************************
- * MEMBER FUNCTIONS AND SLOTS
- ******************************************************************************/
-public:
- /**
- * @brief Draws the button
- *
- * @param painter Painter
- * @param x Button x coordinate
- * @param y Button y coordinate
- */
- void draw(QPainter *painter, int x, int y);
-
- /**
- * @brief Sets the button icon mode
- *
- * @param mode Button icon mode
- */
- void setMode(QIcon::Mode mode);
-
-/*******************************************************************************
- * DATA MEMBERS
- ******************************************************************************/
-private:
- QIcon::Mode m_buttonMode; ///< Button mode (Normal, Selected etc...)
- int m_buttonWidth; ///< Button width
- int m_buttonHeight; ///< Button height
-};
-
-#endif // MAPBUTTON_H
const int ZOOM_FPS = 30; ///< FPS for the zoom effect
const qreal ZOOM_TIME = 250; ///< Length of the zoom effect (ms)
-const int MAP_ZOOM_PANEL_POSITION_X = 10 + 25; ///< Horizontal position of zoom panel
-const int MAP_ZOOM_PANEL_POSITION_Y = 10; ///< Vertical position of zoom panel
-const int MAP_ZOOM_PANEL_LEVEL = OWN_LOCATION_ICON_Z_LEVEL + 1; ///< Zepth of zoom panel (Z-axis)
-const int MAP_ZOOM_PANEL_BUTTON_SIZE = 74; ///< Size of a zoom panel button
-const int MAP_ZOOM_PANEL_BUTTON_SPACING = 4; ///< Size of a zoom button spacing
-
const qreal MAX_LATITUDE = 85.05112877980659237802; ///< Maximum latitude value
const qreal MIN_LATITUDE = -MAX_LATITUDE; ///< Minimum latitude value
const qreal MIN_LONGITUDE = -180.0; ///< Minimum longitude value
connect(m_mapFetcher, SIGNAL(mapImageReceived(int,int,int,QPixmap)),
this, SLOT(mapImageReceived(int,int,int,QPixmap)));
- m_mapZoomPanel = new MapZoomPanel(NULL, MAP_ZOOM_PANEL_POSITION_X, MAP_ZOOM_PANEL_POSITION_Y);
- m_mapScene->addItem(m_mapZoomPanel);
- connect(m_mapZoomPanel, SIGNAL(zoomInPressed()), this, SLOT(zoomIn()));
- connect(m_mapZoomPanel, SIGNAL(zoomOutPressed()), this, SLOT(zoomOut()));
-
m_ownLocation = new OwnLocationItem();
m_ownLocation->hide(); // hide until first location info is received
m_mapScene->addItem(m_ownLocation);
void MapEngine::alignImmovableItems(QPoint viewTopLeft)
{
qDebug() << __PRETTY_FUNCTION__ << "viewTopLeft:" << viewTopLeft;
-
- m_mapZoomPanel->setPos(viewTopLeft);
}
void MapEngine::setLocation(QPoint sceneCoordinate)
#include "mapfetcher.h"
#include "mapscene.h"
#include "maptile.h"
-#include "mapzoompanel.h"
#include "ownlocationitem.h"
#include "user/user.h"
*
* Logic for controlling map functionality. Does also include static methods for
* converting coordinates.
+*
* @author Sami Rämö - sami.ramo (at) ixonos.com
* @author Jussi Laitinen - jussi.laitinen (at) ixonos.com
* @author Pekka Nissinen - pekka.nissinen (at) ixonos.com
FriendItemsHandler *m_friendItemsHandler; ///< Handler for friend and group items
MapFetcher *m_mapFetcher; ///< Fetcher for map tiles
MapScene *m_mapScene; ///< Scene for map tiles
- MapZoomPanel *m_mapZoomPanel; ///< Toolbar for zoom buttons
OwnLocationItem *m_ownLocation; ///< Item to show own location
QPoint m_sceneCoordinate; ///< Current center coordinate
QRect m_viewTilesGrid; ///< Current grid of tiles in view (includes margin)
Copyright (C) 2010 Ixonos Plc. Authors:
Sami Rämö - sami.ramo@ixonos.com
+ Pekka Nissinen - pekka.nissinen@ixonos.com
Situare is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
Copyright (C) 2010 Ixonos Plc. Authors:
Sami Rämö - sami.ramo@ixonos.com
+ Pekka Nissinen - pekka.nissinen@ixonos.com
Situare is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
* @brief Map view widget
*
* @author Sami Rämö - sami.ramo (at) ixonos.com
+* @author Pekka Nissinen - pekka.nissinen (at) ixonos.com
*/
class MapView : public QGraphicsView
{
+++ /dev/null
-/*
- Situare - A location system for Facebook
- Copyright (C) 2010 Ixonos Plc. Authors:
-
- Pekka Nissinen - pekka.nissinen@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 <QDebug>
-
-#include "mapcommon.h"
-#include "mapzoompanel.h"
-
-MapZoomPanel::MapZoomPanel(QGraphicsItem *parent, int x, int y) : QGraphicsItem(parent)
-{
- qDebug() << __PRETTY_FUNCTION__;
-
- m_x = x;
- m_y = y;
- m_width = MAP_ZOOM_PANEL_BUTTON_SIZE;
- m_height = MAP_ZOOM_PANEL_BUTTON_SIZE + MAP_ZOOM_PANEL_BUTTON_SPACING
- + MAP_ZOOM_PANEL_BUTTON_SIZE;
-
- m_zoomInBtn = new MapButton(":/res/images/zoom_in.png");
- m_zoomOutBtn = new MapButton(":/res/images/zoom_out.png");
-
- setFlag(QGraphicsItem::ItemIgnoresTransformations);
- setZValue(static_cast<qreal>(MAP_ZOOM_PANEL_LEVEL));
-}
-
-MapZoomPanel::~MapZoomPanel()
-{
- qDebug() << __PRETTY_FUNCTION__;
-
- delete m_zoomInBtn;
- delete m_zoomOutBtn;
- m_zoomInBtn = 0;
- m_zoomOutBtn = 0;
-}
-
-QRectF MapZoomPanel::boundingRect() const
-{
- qDebug() << __PRETTY_FUNCTION__;
-
- return QRectF(m_x, m_y, m_width, m_height);
-}
-
-void MapZoomPanel::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
-{
- qDebug() << __PRETTY_FUNCTION__;
-
- Q_UNUSED(option);
- Q_UNUSED(widget);
-
- m_zoomInBtn->draw(painter, m_x, m_y);
- m_zoomOutBtn->draw(painter, m_x, m_y + MAP_ZOOM_PANEL_BUTTON_SPACING
- + MAP_ZOOM_PANEL_BUTTON_SIZE);
-}
-
-void MapZoomPanel::mousePressEvent(QGraphicsSceneMouseEvent *event)
-{
- qDebug() << __PRETTY_FUNCTION__;
-
- if ( event->pos().y() < (m_y + MAP_ZOOM_PANEL_BUTTON_SPACING + MAP_ZOOM_PANEL_BUTTON_SIZE) )
- m_zoomInBtn->setMode(QIcon::Selected);
- else
- m_zoomOutBtn->setMode(QIcon::Selected);
-
- update();
-}
-
-void MapZoomPanel::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
-{
- qDebug() << __PRETTY_FUNCTION__;
-
- Q_UNUSED(event);
-
- m_zoomInBtn->setMode(QIcon::Normal);
- m_zoomOutBtn->setMode(QIcon::Normal);
-
- if ( event->pos().y() < (m_y + MAP_ZOOM_PANEL_BUTTON_SPACING + MAP_ZOOM_PANEL_BUTTON_SIZE) )
- emit zoomInPressed();
- else
- emit zoomOutPressed();
-
- update();
-}
+++ /dev/null
-/*
- Situare - A location system for Facebook
- Copyright (C) 2010 Ixonos Plc. Authors:
-
- Pekka Nissinen - pekka.nissinen@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 MAPZOOMPANEL_H
-#define MAPZOOMPANEL_H
-
-#include <QRectF>
-#include <QWidget>
-#include <QPainter>
-#include <QGraphicsItem>
-#include <QStyleOptionGraphicsItem>
-#include <QGraphicsSceneMouseEvent>
-
-#include "mapbutton.h"
-
-/**
-* @brief Panel for zoom buttons
-*
-* @author Pekka Nissinen - pekka.nissinen (at) ixonos.com
-*/
-class MapZoomPanel : public QObject, public QGraphicsItem
-{
- Q_OBJECT
-
-public:
- /**
- * @brief Constructor
- *
- * @param parent Parent
- * @param x Panel x coordinate
- * @param y Panel y coordinate
- */
- MapZoomPanel(QGraphicsItem *parent = 0, int x = 0, int y = 0);
-
- /**
- * @brief Destructor
- */
- ~MapZoomPanel();
-
-/*******************************************************************************
- * BASE CLASS INHERITED AND REIMPLEMENTED MEMBER FUNCTIONS
- ******************************************************************************/
-public:
- /**
- * @brief Returns the outer bounds of the panel
- */
- QRectF boundingRect() const;
-
- /**
- * @brief Paints the panel and its content
- *
- * @param painter Painter
- * @param option Style options
- * @param widget Widget
- */
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
-
-protected:
- /**
- * @brief Event handler for mouse press events
- *
- * @param event Mouse event
- */
- void mousePressEvent(QGraphicsSceneMouseEvent *event);
-
- /**
- * @brief Event handler for mouse release events
- *
- * @param event Mouse event
- */
- void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
-
-/*******************************************************************************
- * SIGNALS
- ******************************************************************************/
-signals:
- /**
- * @brief Signal for zoom in button click
- */
- void zoomInPressed();
-
- /**
- * @brief Signal for zoom out button click
- */
- void zoomOutPressed();
-
-/*******************************************************************************
- * DATA MEMBERS
- ******************************************************************************/
-private:
- MapButton *m_zoomInBtn; ///< Button for zoom in
- MapButton *m_zoomOutBtn; ///< Button for zoom out
- qreal m_x; ///< Panel x coordinate
- qreal m_y; ///< Panel y coordinate
- qreal m_width; ///< Panel width
- qreal m_height; ///< Panel height
-};
-
-#endif // MAPZOOMPANEL_H
map/mapscene.cpp \
map/maptile.cpp \
map/mapfetcher.cpp \
- map/mapzoompanel.cpp \
- map/mapbutton.cpp \
map/ownlocationitem.cpp \
map/baselocationitem.cpp \
map/friendlocationitem.cpp \
ui/panelsliderbar.cpp \
map/friendgroupitem.cpp \
map/frienditemshandler.cpp \
- gps/gpspositioninterface.cpp
+ gps/gpspositioninterface.cpp \
+ ui/zoombuttonpanel.cpp
HEADERS += ui/mainwindow.h \
ui/mapviewscreen.h \
map/mapengine.h \
map/maptile.h \
map/mapfetcher.h \
map/mapcommon.h \
- map/mapzoompanel.h \
- map/mapbutton.h \
map/ownlocationitem.h \
map/baselocationitem.h \
map/friendlocationitem.h \
ui/panelsliderbar.h \
map/friendgroupitem.h \
map/frienditemshandler.h \
- gps/gpspositioninterface.h
+ gps/gpspositioninterface.h \
+ ui/zoombuttonpanel.h
QT += network \
webkit
DEFINES += QT_NO_DEBUG_OUTPUT
Q_UNUSED(event);
QPainter painter(this);
+
+ // Temporary border
+ painter.setPen(Qt::white);
+ painter.drawRect(this->rect().x(), this->rect().y(),
+ this->rect().width() - 1, this->rect().height() - 1);
+
icon().paint(&painter, this->rect(), NULL, m_buttonMode);
}
* @param selectedIconPictureFileName Selected state Icon image file name (optional)
*/
ImageButton(QWidget *parent = 0, QString normalIconPictureFileName = "",
- QString selectedIconPictureFileName = "");
+ QString selectedIconPictureFileName = "");
/*******************************************************************************
* BASE CLASS INHERITED AND REIMPLEMENTED MEMBER FUNCTIONS
m_toSettingsAct = new QAction(tr("Settings"), this);
m_toSettingsAct->setObjectName(tr("Settings"));
- connect(m_toSettingsAct, SIGNAL(triggered()), this, SLOT(openSettingsDialog()));
- m_gpsToggleAct = new QAction(tr("GPS"), this);
+ connect(m_toSettingsAct, SIGNAL(triggered()),
+ this, SLOT(openSettingsDialog()));
+ m_gpsToggleAct = new QAction(tr("GPS"), this);
m_gpsToggleAct->setCheckable(true);
m_gpsToggleAct->setChecked(true);
- connect(m_gpsToggleAct, SIGNAL(toggled(bool)), this, SLOT(gpsActionToggled(bool)));
+ connect(m_gpsToggleAct, SIGNAL(toggled(bool)),
+ this, SLOT(gpsActionToggled(bool)));
m_autoCenteringAct = new QAction(tr("Auto centering"), this);
m_autoCenteringAct->setCheckable(true);
m_autoCenteringAct->setChecked(true);
- connect(m_autoCenteringAct, SIGNAL(toggled(bool)), this, SLOT(autoCenteringToggled(bool)));
+ connect(m_autoCenteringAct, SIGNAL(toggled(bool)),
+ this, SLOT(autoCenteringToggled(bool)));
m_viewMenu = menuBar()->addMenu(tr("Main"));
#include "mapviewscreen.h"
#include "../map/mapview.h"
#include "../map/mapengine.h"
-#include "friendlistpanel.h"
-#include "userpanel.h"
#include "panelcommon.h"
-
#include "panelsidebar.h"
MapViewScreen::MapViewScreen(QWidget *parent)
m_autoCenteringEnabled(false)
{
MapView *mapView = new MapView(this);
- mapEngine = new MapEngine(this);
- mapView->setScene(mapEngine->scene());
+ m_mapEngine = new MapEngine(this);
+ mapView->setScene(m_mapEngine->scene());
- FriendListPanel *friendsListPanel = new FriendListPanel(this);
- UserInfoPanel *userPanel = new UserInfoPanel(this);
+ m_friendsListPanel = new FriendListPanel(this);
+ m_userPanel = new UserInfoPanel(this);
PanelSideBar *userPanelSidebar = new PanelSideBar(this, LEFT);
PanelSideBar *friendsListPanelSidebar = new PanelSideBar(this, RIGHT);
+ m_zoomButtonPanel = new ZoomButtonPanel(this, ZOOM_BUTTON_PANEL_POSITION_X,
+ ZOOM_BUTTON_PANEL_POSITION_Y);
+
connect(mapView, SIGNAL(viewScrolled(QPoint)),
- mapEngine, SLOT(setLocation(QPoint)));
- connect(mapEngine, SIGNAL(locationChanged(QPoint)),
+ m_mapEngine, SLOT(setLocation(QPoint)));
+ connect(m_mapEngine, SIGNAL(locationChanged(QPoint)),
mapView, SLOT(centerToSceneCoordinates(QPoint)));
- connect(mapEngine, SIGNAL(zoomLevelChanged(int)),
+ connect(m_mapEngine, SIGNAL(zoomLevelChanged(int)),
mapView, SLOT(setZoomLevel(int)));
connect(mapView, SIGNAL(viewResized(QSize)),
- mapEngine, SLOT(viewResized(QSize)));
+ m_mapEngine, SLOT(viewResized(QSize)));
connect(mapView, SIGNAL(viewContentChanged(QPoint)),
- mapEngine, SLOT(alignImmovableItems(QPoint)));
+ m_mapEngine, SLOT(alignImmovableItems(QPoint)));
connect(mapView, SIGNAL(viewZoomFinished()),
- mapEngine, SLOT(viewZoomFinished()));
+ m_mapEngine, SLOT(viewZoomFinished()));
connect(mapView, SIGNAL(viewResizedNewSize(int,int)),
this, SLOT(drawOsmLicense(int, int)));
-
connect(mapView, SIGNAL(viewResizedNewSize(int,int)),
- friendsListPanel, SLOT(reDrawFriendsPanel(int,int)));
+ m_friendsListPanel, SLOT(reDrawFriendsPanel(int,int)));
connect(mapView, SIGNAL(viewResizedNewSize(int,int)),
- userPanel, SLOT(reDrawUserPanel(int,int)));
+ m_userPanel, SLOT(reDrawUserPanel(int,int)));
connect(mapView, SIGNAL(viewResizedNewSize(int,int)),
friendsListPanelSidebar, SLOT(reDrawSidebar(int,int)));
+ connect(m_zoomButtonPanel->m_zoomInBtn, SIGNAL(clicked()),
+ m_mapEngine, SLOT(zoomIn()));
+ connect(m_zoomButtonPanel->m_zoomOutBtn, SIGNAL(clicked()),
+ m_mapEngine, SLOT(zoomOut()));
+
connect(this, SIGNAL(friendsLocationsReady(QList<User*>&)),
- friendsListPanel, SLOT(friendInfoReceived(QList<User*>&)));
+ m_friendsListPanel, SLOT(friendInfoReceived(QList<User*>&)));
connect(this, SIGNAL(userLocationReady(User*)),
- mapEngine, SLOT(receiveOwnLocation(User*)));
+ m_mapEngine, SLOT(receiveOwnLocation(User*)));
connect(this, SIGNAL(friendsLocationsReady(QList<User*>&)),
- mapEngine, SIGNAL(friendsLocationsReady(QList<User*>&)));
+ m_mapEngine, SIGNAL(friendsLocationsReady(QList<User*>&)));
QHBoxLayout *mapViewLayout = new QHBoxLayout;
- osmLicense = new QLabel(this);
- osmLicense->setAttribute(Qt::WA_TranslucentBackground, true);
- osmLicense->setAttribute(Qt::WA_TransparentForMouseEvents, true);
- osmLicense->setText("<font color='black'>"+OSM_LICENSE+"</font>");
- osmLicense->setFont(QFont("Nokia Sans", 9));
- osmLicense->resize(osmLicense->fontMetrics().width(OSM_LICENSE),
- osmLicense->fontMetrics().height());
-
- friendsListPanel->stackUnder(friendsListPanelSidebar);
- userPanelSidebar->stackUnder(friendsListPanel);
- userPanel->stackUnder(userPanelSidebar);
- osmLicense->stackUnder(userPanel);
- mapView->stackUnder(osmLicense);
+ m_osmLicense = new QLabel(this);
+ m_osmLicense->setAttribute(Qt::WA_TranslucentBackground, true);
+ m_osmLicense->setAttribute(Qt::WA_TransparentForMouseEvents, true);
+ m_osmLicense->setText("<font color='black'>"+OSM_LICENSE+"</font>");
+ m_osmLicense->setFont(QFont("Nokia Sans", 9));
+ m_osmLicense->resize(m_osmLicense->fontMetrics().width(OSM_LICENSE),
+ m_osmLicense->fontMetrics().height());
+
+ m_friendsListPanel->stackUnder(friendsListPanelSidebar);
+ userPanelSidebar->stackUnder(m_friendsListPanel);
+ m_userPanel->stackUnder(userPanelSidebar);
+ m_zoomButtonPanel->stackUnder(m_userPanel);
+ m_osmLicense->stackUnder(m_zoomButtonPanel);
+ mapView->stackUnder(m_osmLicense);
mapViewLayout->addWidget(mapView);
setLayout(mapViewLayout);
mapViewLayout->setMargin(0);
- mapEngine->init();
+ m_mapEngine->init();
setObjectName("Map view");
}
void MapViewScreen::drawOsmLicense(int width, int height)
{
qDebug() << __PRETTY_FUNCTION__ << width << "x" << height;
- osmLicense->move(width - osmLicense->fontMetrics().width(OSM_LICENSE) - PANEL_PEEK_AMOUNT,
- height - osmLicense->fontMetrics().height());
+ m_osmLicense->move(width - m_osmLicense->fontMetrics().width(OSM_LICENSE) - PANEL_PEEK_AMOUNT,
+ height - m_osmLicense->fontMetrics().height());
}
void MapViewScreen::positionReceived(QPointF position)
qDebug() << __PRETTY_FUNCTION__;
if (m_autoCenteringEnabled)
- mapEngine->setViewLocation(position);
+ m_mapEngine->setViewLocation(position);
}
void MapViewScreen::enableAutoCentering(bool enabled)
#include "map/mapengine.h"
#include "friendlistpanel.h"
#include "userpanel.h"
+#include "zoombuttonpanel.h"
/**
* @brief Map View class. Used to display Map
* DATA MEMBERS
******************************************************************************/
private:
- bool m_autoCenteringEnabled; ///< Enable
- FriendListPanel *friendsListPanel; ///< Instance of friends list panel
- MapEngine *mapEngine; ///< MapEngine
- QLabel *osmLicense; ///< Label for Open Street Map license
- UserInfoPanel *userPanel; ///< Instance of the user information panel
+ MapEngine *m_mapEngine; ///< MapEngine
+ UserInfoPanel *m_userPanel; ///< Instance of the user information panel
+ FriendListPanel *m_friendsListPanel; ///< Instance of friends list panel
+ ZoomButtonPanel *m_zoomButtonPanel; ///< Instance of zoom button panel
+ QLabel *m_osmLicense; ///< Label for Open Street Map license
+ bool m_autoCenteringEnabled; ///< Enable
};
#endif // MAPVIEWTAB_H
#include <QtCore>
#include "map/mapcommon.h"
-
enum Side{LEFT, RIGHT}; ///< Enumerator for panel sideness
const int PANEL_PEEK_AMOUNT = 25; ///< Amount of pixels shown when panel is closed
const int SLIDINGBAR_WIDTH = 24;
const int SLIDINGBAR_HEIGHT = 424;
+const int ZOOM_BUTTON_PANEL_POSITION_X = 10 + PANEL_PEEK_AMOUNT; ///< Horizontal position of zoom panel
+const int ZOOM_BUTTON_PANEL_POSITION_Y = 10; ///< Vertical position of zoom panel
+const int ZOOM_BUTTON_PANEL_BUTTON_SPACING = 4; ///< Size of a zoom button spacing
+
#endif // PANELCOMMON_H
{
Q_OBJECT
-
public:
/**
* @brief Constructor