1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-24 11:45:53 +01:00

Code cleanup

This commit is contained in:
Martin Tůma 2016-01-19 09:04:54 +01:00
parent c2391929d3
commit 16cce5abd0

View File

@ -9,11 +9,11 @@
#include "ll.h" #include "ll.h"
#include "track.h" #include "track.h"
#include <QDebug>
#define MARGIN 10.0 #define MARGIN 10.0
#define TRACK_WIDTH 3 #define TRACK_WIDTH 3
#define SCALE_OFFSET_X 7
#define SCALE_OFFSET_Y 15
Track::Track(QWidget *parent) Track::Track(QWidget *parent)
: QGraphicsView(parent) : QGraphicsView(parent)
@ -391,7 +391,8 @@ void Track::resizeEvent(QResizeEvent *e)
void Track::paintEvent(QPaintEvent *e) void Track::paintEvent(QPaintEvent *e)
{ {
QPointF scenePos = mapToScene(rect().bottomLeft() + QPoint(10, -15)); QPointF scenePos = mapToScene(rect().bottomLeft() + QPoint(SCALE_OFFSET_X,
-SCALE_OFFSET_Y));
_mapScale->setPos(scenePos); _mapScale->setPos(scenePos);
QGraphicsView::paintEvent(e); QGraphicsView::paintEvent(e);