From 45f011d73b7c528a6e940a67a7e974faec83d4f4 Mon Sep 17 00:00:00 2001 From: Katri Kaikkonen Date: Tue, 10 Aug 2010 12:14:48 +0300 Subject: [PATCH] Added signals, distance counter, text label to panel and distance text. Also added draggability to the panel. --- src/map/mapcommon.h | 2 +- src/map/mapengine.cpp | 8 +- src/ui/indicatorbutton.cpp | 77 ++++++++----------- src/ui/indicatorbutton.h | 28 +++---- src/ui/indicatorbuttonpanel.cpp | 159 ++++++++++++++++++++++++--------------- src/ui/indicatorbuttonpanel.h | 70 +++++++---------- src/ui/mainwindow.cpp | 5 +- src/ui/mainwindow.h | 1 + src/ui/panelcommon.h | 15 +--- 9 files changed, 177 insertions(+), 188 deletions(-) diff --git a/src/map/mapcommon.h b/src/map/mapcommon.h index a0852aa..e5ddddb 100644 --- a/src/map/mapcommon.h +++ b/src/map/mapcommon.h @@ -89,7 +89,7 @@ const int MAP_GRID_PADDING = 0; ///< Grid padding used in tile grid calculation const QString OSM_LICENSE = QString::fromUtf8("© OpenStreetMap contributors, CC-BY-SA"); -const int AUTO_CENTERING_DISABLE_DISTANCE = 100; ///< Distance in pixels +const int AUTO_CENTERING_DISABLE_DISTANCE = 50; ///< Distance in pixels //String constants for storing map settings: const QString MAP_LAST_ZOOMLEVEL = "LAST_MAP_ZOOM_LEVEL"; ///< Maps last zoom level before logout diff --git a/src/map/mapengine.cpp b/src/map/mapengine.cpp index 53dd1cf..6e2eb3d 100644 --- a/src/map/mapengine.cpp +++ b/src/map/mapengine.cpp @@ -249,13 +249,15 @@ void MapEngine::gpsPositionUpdate(GeoCoordinate position, qreal accuracy) { qDebug() << __PRETTY_FUNCTION__; + m_gpsPosition = position; + // update GPS location item (but only if accuracy is a valid number) if (!isnan(accuracy)) { qreal resolution = MapScene::horizontalResolutionAtLatitude(position.latitude()); m_gpsLocationItem->updateItem(SceneCoordinate(position).toPointF(), accuracy, resolution); } -m_mapScene->spanItems(currentViewSceneRect()); + m_mapScene->spanItems(currentViewSceneRect()); // do automatic centering (if enabled) if (m_autoCenteringEnabled) { @@ -406,6 +408,9 @@ void MapEngine::setAutoCentering(bool enabled) qDebug() << __PRETTY_FUNCTION__; m_autoCenteringEnabled = enabled; + + if (!m_autoCenteringEnabled && m_gpsLocationItem->isVisible()) + updateDirectionIndicator(); } void MapEngine::setCenterPosition(SceneCoordinate coordinate) @@ -509,7 +514,6 @@ void MapEngine::updateDirectionIndicator() { qDebug() << __PRETTY_FUNCTION__; - /// @todo implement distance calculation qreal distance = m_gpsPosition.distanceTo(m_sceneCoordinate); qreal direction = m_sceneCoordinate.azimuthTo(SceneCoordinate(m_gpsPosition)); diff --git a/src/ui/indicatorbutton.cpp b/src/ui/indicatorbutton.cpp index 24e8e8f..6312965 100644 --- a/src/ui/indicatorbutton.cpp +++ b/src/ui/indicatorbutton.cpp @@ -2,8 +2,8 @@ Situare - A location system for Facebook Copyright (C) 2010 Ixonos Plc. Authors: - Kaj Wallin - kaj.wallin@ixonos.com Katri Kaikkonen - katri.kaikkonen@ixonos.com + Kaj Wallin - kaj.wallin@ixonos.com Sami Rämö - sami.ramo@ixonos.com Situare is free software; you can redistribute it and/or @@ -21,31 +21,28 @@ USA. */ -#include -#include #include - -#include "math.h" +#include +#include #include "indicatorbutton.h" - -#include "common.h" #include "panelcommon.h" +#include "common.h" +#include "math.h" -enum State {OFF, ON}; ///< Enumerator for led state +enum State {OFF, ON}; ///< Enumerator for led state -const qreal OPACITY = 0.50; ///< Opacity of the background in percents -const int ROUNDING_RADIUS = 9; ///< Roundness of the rounded edge -const int BUTTON_WIDTH = 66; ///< Button width -const int BUTTON_HEIGHT = 66; ///< Button height +const qreal OPACITY = 0.50; ///< Opacity of the background in percents +const int ROUNDING_RADIUS = 9; ///< Roundness of the rounded edge +const int BUTTON_WIDTH = 66; ///< Button width +const int BUTTON_HEIGHT = 66; ///< Button height -const qreal M_TO_KM = 1000; ///< Meters to kilometers conversion +const qreal M_TO_KM = 1000; ///< Meters to kilometers conversion IndicatorButton::IndicatorButton(QWidget *parent) : QToolButton(parent), m_drawTriangle(false), - m_direction(0), - m_distance(0) + m_direction(0) { m_indicatorLeds[OFF].load(":res/images/gps_position.png"); m_indicatorLeds[ON].load(":res/images/gps_position_s.png"); @@ -77,40 +74,41 @@ IndicatorButton::~IndicatorButton() delete m_selectedGradient; } -void IndicatorButton::mousePressEvent(QMouseEvent *event) +void IndicatorButton::setDirection(qreal direction, bool draw) { qDebug() << __PRETTY_FUNCTION__; - QToolButton::mousePressEvent(event); + m_direction = direction; + m_drawTriangle = draw; - m_eventPosition = mapToParent(event->pos()); + update(); } void IndicatorButton::mouseMoveEvent(QMouseEvent *event) { qDebug() << __PRETTY_FUNCTION__; - if(rect().contains(event->pos())) - m_eventPosition = mapToParent(event->pos()); - QToolButton::mouseMoveEvent(event); + + event->ignore(); +} + +void IndicatorButton::mousePressEvent(QMouseEvent *event) +{ + qDebug() << __PRETTY_FUNCTION__; + + QToolButton::mousePressEvent(event); + + event->ignore(); } void IndicatorButton::mouseReleaseEvent(QMouseEvent *event) { qDebug() << __PRETTY_FUNCTION__; - if(this->rect().contains(event->pos())) { - if(isChecked()) { - setChecked(false); - emit autoCenteringTriggered(false); - } else { - setChecked(true); - emit autoCenteringTriggered(true); - } - } - -// QToolButton::mouseReleaseEvent(event); + QToolButton::mouseReleaseEvent(event); + + event->ignore(); } const QPoint& IndicatorButton::eventPosition() @@ -184,18 +182,3 @@ void IndicatorButton::paintEvent(QPaintEvent *event) } } -void IndicatorButton::updateValues(qreal direction, qreal distance, bool draw) -{ - qDebug() << __PRETTY_FUNCTION__; - - qWarning() << distance; - - m_direction = direction; - m_distance = distance; - m_drawTriangle = draw; - - qWarning() << m_distance; - update(); -} - - diff --git a/src/ui/indicatorbutton.h b/src/ui/indicatorbutton.h index a65726d..2296db6 100644 --- a/src/ui/indicatorbutton.h +++ b/src/ui/indicatorbutton.h @@ -25,9 +25,9 @@ #define INDICATORBUTTON_H #include -#include #include #include +#include /** * @brief Indicator button class @@ -57,14 +57,14 @@ public: ******************************************************************************/ protected: /** - * @brief Move event for the distance indicator button + * @brief Event handler for mouse move events * * @param event Mouse event */ void mouseMoveEvent(QMouseEvent *event); /** - * @brief Press event for the distance indicator button + * @brief Event handler for mouse press events * * @param event Mouse event */ @@ -95,15 +95,13 @@ public slots: const QPoint& eventPosition(); /** - * @brief Called when direction and distance from current map center point to current GPS - * location is changed - * - * @param direction Direction in degrees - * @param distance Distance in kilometers - * @param draw Should the indicator triangle be drawn or not - */ - void updateValues(qreal direction, qreal distance, bool draw); - + * @brief Sets direction information for the distance indicator button + * + * Paints the button and its icon + * @param Direction to the GPS position (in degrees) + * @param Draw direction triangle + */ + void setDirection(qreal direction, bool draw); /******************************************************************************* * SIGNALS @@ -116,11 +114,6 @@ signals: */ void autoCenteringTriggered(bool enabled); - /** - * @brief Dragging mode triggered. - */ - void draggingModeTriggered(); - /******************************************************************************* * DATA MEMBERS ******************************************************************************/ @@ -128,7 +121,6 @@ private: bool m_drawTriangle; ///< Should the direction triange be drawn qreal m_direction; ///< Direction to the GPS position (in degrees) - qreal m_distance; QColor *m_normalColor; ///< Normal background color diff --git a/src/ui/indicatorbuttonpanel.cpp b/src/ui/indicatorbuttonpanel.cpp index 3be6109..28e14b6 100644 --- a/src/ui/indicatorbuttonpanel.cpp +++ b/src/ui/indicatorbuttonpanel.cpp @@ -4,6 +4,7 @@ Pekka Nissinen - pekka.nissinen@ixonos.com Kaj Wallin - kaj.wallin@ixonos.com + Katri Kaikkonen - katri.kaikkonen@ixonos.com Situare is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -20,38 +21,60 @@ USA. */ -#include -#include #include +#include +#include #include "indicatorbuttonpanel.h" -#include "common.h" -#include "panelcommon.h" #include "indicatorbutton.h" +#include "panelcommon.h" +#include "common.h" -const int ROUNDING_RADIUS = 9; ///< Roundness of the background edges -const qreal OPACITY = 0.50; ///< Opacity of the background in percents + +const int ROUNDING_RADIUS = 9; ///< Roundness of the background edges +const qreal OPACITY = 0.50; ///< Opacity of the background in percents IndicatorButtonPanel::IndicatorButtonPanel(QWidget *parent) : QWidget(parent), - m_isDraggable(false), m_indicatorButton(0), + m_isDraggable(false), m_distanceText("") { + /** + * @brief Horizontal position of direction indicator button + * + * @var DIRECTION_INDICATOR_POSITION_X + */ + const int DIRECTION_INDICATOR_POSITION_X = 10 + PANEL_PEEK_AMOUNT; + const int DIRECTION_INDICATOR_POSITION_Y = 290; ///< Vertical position of indicator button + + const QString DIRECTION_INDICATOR_BUTTON_POSITION = "Direction_Indicator_Position"; + + const int MARGIN_LEFT = 0; ///< Inner margin (left) + const int MARGIN_TOP = 3; ///< Inner margin (top) + const int MARGIN_RIGHT = 0; ///< Inner margin (right) + const int MARGIN_BOTTOM = 0; ///< Inner margin (bottom) + const int LABEL_MARGIN_TOP = 0; ///< Distance text label inner margin (top) + + const int INDICATOR_BUTTON_PANEL_SPACING = 5; ///< Size of a indicator button spacing + + const int PANEL_WIDTH = 90; ///< Width of the draggable panel + const int PANEL_HEIGHT = 100; ///< Height of the draggable panel + qDebug() << __PRETTY_FUNCTION__; QVBoxLayout *verticalLayout = new QVBoxLayout; setLayout(verticalLayout); - verticalLayout->setContentsMargins(0, 0, 0, 0); - verticalLayout->setSpacing(5); + verticalLayout->setContentsMargins(MARGIN_LEFT, MARGIN_TOP, MARGIN_RIGHT, MARGIN_BOTTOM); + verticalLayout->setSpacing(INDICATOR_BUTTON_PANEL_SPACING); m_indicatorButton = new IndicatorButton(this); m_distanceTextLabel = new QLabel(); m_distanceTextLabel->setFont(QFont(NOKIA_FONT_SMALL)); - m_distanceTextLabel->setText(m_distanceText); m_distanceTextLabel->setAlignment(Qt::AlignHCenter); - m_distanceTextLabel->setContentsMargins(0, 0, 0, 0); + m_distanceTextLabel->setContentsMargins(MARGIN_LEFT, LABEL_MARGIN_TOP, MARGIN_RIGHT + , MARGIN_BOTTOM); m_normalColor = new QColor(Qt::black); m_normalColor->setAlpha(OPACITY * 255); @@ -59,7 +82,8 @@ IndicatorButtonPanel::IndicatorButtonPanel(QWidget *parent) verticalLayout->addWidget(m_indicatorButton, 0, Qt::AlignHCenter); verticalLayout->addWidget(m_distanceTextLabel, 0, Qt::AlignHCenter); verticalLayout->addStretch(); - setFixedSize(90, 100); + + setFixedSize(PANEL_WIDTH, PANEL_HEIGHT); QSettings settings(DIRECTORY_NAME, FILE_NAME); QPoint savedLocation = settings.value(DIRECTION_INDICATOR_BUTTON_POSITION, @@ -81,24 +105,16 @@ IndicatorButtonPanel::IndicatorButtonPanel(QWidget *parent) m_forceReleaseTimer->setSingleShot(true); m_forceReleaseTimer->setInterval(FORCE_RELEASE_TIME); - connect(m_indicatorButton, SIGNAL(pressed()), - m_dragStartTimer, SLOT(start())); - connect(m_indicatorButton, SIGNAL(released()), - m_dragStartTimer, SLOT(stop())); - connect(m_dragStartTimer, SIGNAL(timeout()), this, SLOT(timerExpired())); connect(m_forceReleaseTimer, SIGNAL(timeout()), this, SLOT(forceMouseRelease())); connect(this, SIGNAL(directionIndicatorValuesUpdate(qreal, qreal, bool)), - m_indicatorButton, SLOT(updateValues(qreal, qreal, bool))); + this, SLOT(updateValues(qreal, qreal, bool))); connect(m_indicatorButton, SIGNAL(autoCenteringTriggered(bool)), this, SIGNAL(autoCenteringTriggered(bool))); - - connect(this, SIGNAL(draggingModeTriggered()), - this, SIGNAL(draggingModeTriggered())); } void IndicatorButtonPanel::mouseMoveEvent(QMouseEvent *event) @@ -148,11 +164,9 @@ void IndicatorButtonPanel::mouseReleaseEvent(QMouseEvent *event) setDraggable(false); QSettings settings(DIRECTORY_NAME, FILE_NAME); - settings.setValue(ZOOMPANEL_POSITION, pos()); + settings.setValue(DIRECTION_INDICATOR_BUTTON_POSITION, pos()); releaseMouse(); - -// m_indicatorButton->setDown(); } } @@ -165,13 +179,25 @@ void IndicatorButtonPanel::paintEvent(QPaintEvent *event) QPainter painter(this); painter.setRenderHint(QPainter::Antialiasing); - QPainterPath backgroundPath; - QRect distanceLabelRect = m_distanceTextLabel->rect(); + if (!m_indicatorButton->isChecked()) { + const int ADJUST_LEFT = -5; ///< Pixels added to the rectangle (left) + const int ADJUST_TOP = 0; ///< Pixels added to the rectangle (top) + const int ADJUST_RIGHT = +5; ///< Pixels added to the rectangle (right) + const int ADJUST_BOTTOM = 0; ///< Pixels added to the rectangle (bottom) - distanceLabelRect.translate(m_distanceTextLabel->pos()); - distanceLabelRect.adjust(-5, 0, +5, 0); - backgroundPath.addRoundedRect(distanceLabelRect, 5, 5); - painter.fillPath(backgroundPath, QBrush(*m_normalColor)); + const int RADIUS_WIDTH = 5; ///< Roundness width + const int RADIUS_HEIGHT = 5; ///< Roundness height + + QPainterPath backgroundPath; + QRect distanceLabelRect = m_distanceTextLabel->rect(); + + distanceLabelRect.translate(m_distanceTextLabel->pos()); + distanceLabelRect.adjust(ADJUST_LEFT, ADJUST_TOP, ADJUST_RIGHT, ADJUST_BOTTOM); + backgroundPath.addRoundedRect(distanceLabelRect, RADIUS_WIDTH, RADIUS_HEIGHT); + painter.fillPath(backgroundPath, QBrush(*m_normalColor)); + + update(); + } if(m_isDraggable) { QPainterPath backgroundPath; @@ -187,6 +213,7 @@ void IndicatorButtonPanel::setDraggable(bool mode, QPoint eventPosition) qDebug() << __PRETTY_FUNCTION__; m_isDraggable = mode; + emit draggingModeTriggered(); if(mode) { grabMouse(); @@ -200,6 +227,11 @@ void IndicatorButtonPanel::setDraggable(bool mode, QPoint eventPosition) update(); } +void IndicatorButtonPanel::setIndicatorButtonEnabled(bool enabled) +{ + m_indicatorButton->setChecked(enabled); +} + void IndicatorButtonPanel::screenResized(const QSize &newSize) { qDebug() << __PRETTY_FUNCTION__; @@ -250,41 +282,48 @@ void IndicatorButtonPanel::timerExpired() { qDebug() << __PRETTY_FUNCTION__; - if(m_indicatorButton->isDown()) - m_dragPosition = m_indicatorButton->eventPosition(); - setDraggable(true, m_dragPosition); } -QString IndicatorButtonPanel::countDistance(qreal m_distance) +void IndicatorButtonPanel::updateValues(qreal direction, qreal distance, bool draw) { qDebug() << __PRETTY_FUNCTION__; -// QString m_distanceText; - -// if(m_distance < 0.01) -// { -// m_distanceText.setNum(10); -// m_distanceText.prepend("< "); -// m_distanceText.append(" m"); -// } -// else if((m_distance >= 0.01) && (m_distance <= 0.999999)) -// { -// m_distanceText.setNum(m_distance * 1000,1,1); -// m_distanceText.append(" m"); -// } -// else if((m_distance >= 1) && (m_distance <= 100)) -// { -// m_distanceText.setNum(m_distance,1,1); -// m_distanceText.append(" km"); -// } -// else { -// m_distanceText.setNum(m_distance,0,0); -// m_distanceText.append(" km"); -// } - -// return m_distanceText; -// qWarning() << m_distanceText; + const int SMALL_REDUCE = 0.5; ///< 0.5 meter reduce + const int BIG_REDUCE = 100; ///< 100 meter reduce + const qreal M_TO_KM = 1000.0; ///< Meters to kilometers conversion -} + m_indicatorButton->setDirection(direction, draw); + + m_distance = distance; + + if(m_distance < 10.0) + { + m_distanceText.setNum(10); + m_distanceText.prepend("< "); + m_distanceText.append(" m"); + } + else if(m_distance < 1000 - SMALL_REDUCE) + { + m_distanceText.setNum(m_distance, 0 , 0); + m_distanceText.append(" m"); + } + else if(m_distance < 100000 - BIG_REDUCE) + { + m_distanceText.setNum(m_distance / M_TO_KM, 1, 1); + m_distanceText.append(" km"); + } + else { + m_distanceText.setNum(m_distance / M_TO_KM, 0, 0); + m_distanceText.append(" km"); + } + + if (!m_indicatorButton->isChecked()) { + m_distanceTextLabel->setText(m_distanceText); + } + else { + m_distanceTextLabel->setText(""); + } + update(); + } diff --git a/src/ui/indicatorbuttonpanel.h b/src/ui/indicatorbuttonpanel.h index 12e0ac1..a64fcfd 100644 --- a/src/ui/indicatorbuttonpanel.h +++ b/src/ui/indicatorbuttonpanel.h @@ -4,6 +4,7 @@ Pekka Nissinen - pekka.nissinen@ixonos.com Kaj Wallin - kaj.wallin@ixonos.com + Katri Kaikkonen - katri.kaikkonen@ixonos.com Situare is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -25,17 +26,17 @@ #include #include -#include +#include #include +#include #include -#include -#include #include "indicatorbutton.h" /** - * @brief Panel for zoom buttons + * @brief Draggable panel for indicator button * + * @author Katri Kaikkonen - katri.kaikkonen (at) ixonos.com * @author Pekka Nissinen - pekka.nissinen (at) ixonos.com * @author Kaj Wallin - kaj.wallin (at) ixonos.com */ @@ -56,14 +57,14 @@ public: ******************************************************************************/ protected: /** - * @brief Move event for the zoom button panel + * @brief Move event for the indicator button panel * * @param event Event */ void mouseMoveEvent(QMouseEvent *event); /** - * @brief Press event for the zoom button panel + * @brief Press event for the indicator button panel * * @param event Event */ @@ -87,31 +88,19 @@ protected: /******************************************************************************* * MEMBER FUNCTIONS AND SLOTS ******************************************************************************/ -public: -// /** -// * @brief Getter for the zoom in button -// * -// * @return Pointer to the zoomInButton -// */ -// const IndicatorButton* IndicatorButtonPanel::indicatorButton(); - public slots: -// /** -// * @brief Disables the zoom in button -// */ -// void disableZoomInButton(); -// /** -// * @brief Disables the zoom out button -// */ -// void disableZoomOutButton(); - -// /** -// * @brief Reset zoom button states to normal -// */ -// void resetButtons(); + /** + * @brief Called when direction and distance from current map center point to current GPS + * location is changed + * + * @param direction Direction in degrees + * @param distance Distance in kilometers + * @param draw Should the indicator triangle be drawn or not + */ + void updateValues(qreal direction, qreal distance, bool draw); - QString countDistance(qreal m_distance); + void setIndicatorButtonEnabled(bool enabled); /** * @brief Toggle zoom panel draggability @@ -163,39 +152,32 @@ signals: */ void draggingModeTriggered(); - /** - * @brief Called when direction and distance from current map center point to current GPS - * location is changed - * - * @param direction Direction in degrees - * @param distance Distance in kilometers - * @param draw Should the indicator triangle be drawn or not - */ - void updateValues(qreal direction, qreal distance, bool draw); - /******************************************************************************* * DATA MEMBERS ******************************************************************************/ +//public: +// IndicatorButton *m_indicatorButton; ///< Indicator button + private: + IndicatorButton *m_indicatorButton; ///< Indicator button + bool m_isDraggable; ///< Boolean for tracking the draggability state + qreal m_distance; ///< Distance to the GPS position + QColor *m_normalColor; ///< Normal background color - QLabel *m_distanceTextLabel; ///< Pointer to locationLabel + QLabel *m_distanceTextLabel; ///< Pointer to distanceTextLabel QPoint m_dragPosition; ///< Location from where the widget is grabbed QSize m_screenSize; ///< Store for the screen size - IndicatorButton *m_indicatorButton; ///< Button for zoom in - - QString m_distanceText; + QString m_distanceText; ///< Text description of the distance QTimer *m_dragStartTimer; ///< Timer to init draggability of the zoom panel QTimer *m_forceReleaseTimer; ///< Timer to run forceMouseRelease; - - }; #endif // INDICATORBUTTONPANEL_H diff --git a/src/ui/mainwindow.cpp b/src/ui/mainwindow.cpp index 21c362c..628d003 100644 --- a/src/ui/mainwindow.cpp +++ b/src/ui/mainwindow.cpp @@ -192,7 +192,7 @@ void MainWindow::buildIndicatorButtonPanel() m_indicatorButtonPanel, SLOT(screenResized(QSize))); connect(this, SIGNAL(directionIndicatorValuesUpdate(qreal, qreal, bool)), - m_indicatorButtonPanel, SIGNAL(updateValues(qreal, qreal, bool))); + m_indicatorButtonPanel, SIGNAL(directionIndicatorValuesUpdate(qreal, qreal, bool))); connect(m_indicatorButtonPanel, SIGNAL(draggingModeTriggered()), this, SIGNAL(draggingModeTriggered())); @@ -814,8 +814,7 @@ void MainWindow::setIndicatorButtonEnabled(bool enabled) { qDebug() << __PRETTY_FUNCTION__; -// m_indicatorButton->setChecked(enabled); - + m_indicatorButtonPanel->setIndicatorButtonEnabled(enabled); } void MainWindow::setMapViewScene(QGraphicsScene *scene) diff --git a/src/ui/mainwindow.h b/src/ui/mainwindow.h index e27ba33..b61ff22 100644 --- a/src/ui/mainwindow.h +++ b/src/ui/mainwindow.h @@ -653,6 +653,7 @@ private: FriendListPanel *m_friendsListPanel; ///< Instance of friends list panel FullScreenButton *m_fullScreenButton; ///< Instance of the fullscreen toggle button +// IndicatorButton *m_indicatorButton; ///< Instance of direction indicator button IndicatorButtonPanel *m_indicatorButtonPanel; ///< Instance of direction indicator button MapScale *m_mapScale; ///< Instance of the map scale MapView *m_mapView; ///< Instance of the map view diff --git a/src/ui/panelcommon.h b/src/ui/panelcommon.h index e909377..2d3968d 100644 --- a/src/ui/panelcommon.h +++ b/src/ui/panelcommon.h @@ -123,20 +123,9 @@ const int USERPANEL_OPENED_X = 0; ///< Horizontal position of a // Zoom button panel settings 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 +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 const QString ZOOMPANEL_POSITION = "Zoom_Panel_Position"; -// Direction indicator button settings -/** - * @brief Horizontal position of direction indicator button - * - * @var DIRECTION_INDICATOR_POSITION_X - */ -const int DIRECTION_INDICATOR_POSITION_X = 10 + PANEL_PEEK_AMOUNT; -const int DIRECTION_INDICATOR_POSITION_Y = 290; ///< Vertical position of direction indicator button - -const QString DIRECTION_INDICATOR_BUTTON_POSITION = "Direction_Indicator_Position"; - #endif // PANELCOMMON_H -- 1.7.9.5