mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-07-24 23:44:25 +02:00
Code cleanup
This commit is contained in:
@ -3,10 +3,8 @@
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QPen>
|
||||
#include "pathitem.h"
|
||||
#include "units.h"
|
||||
#include "track.h"
|
||||
#include "markeritem.h"
|
||||
#include "pathitem.h"
|
||||
|
||||
|
||||
class TrackItem : public PathItem
|
||||
@ -16,37 +14,13 @@ class TrackItem : public PathItem
|
||||
public:
|
||||
TrackItem(const Track &track, QGraphicsItem *parent = 0);
|
||||
|
||||
QPainterPath shape() const {return _shape;}
|
||||
QRectF boundingRect() const {return _shape.boundingRect();}
|
||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
|
||||
QWidget *widget);
|
||||
|
||||
const QPainterPath &path() const {return _path;}
|
||||
|
||||
void setScale(qreal scale);
|
||||
void setUnits(enum Units units);
|
||||
void setColor(const QColor &color);
|
||||
|
||||
void showMarker(bool show) {_marker->setVisible(show);}
|
||||
void moveMarker(qreal distance);
|
||||
|
||||
private:
|
||||
void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
|
||||
void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);
|
||||
|
||||
void updateShape();
|
||||
QString toolTip();
|
||||
|
||||
QPainterPath _path;
|
||||
QPainterPath _shape;
|
||||
QPen _pen;
|
||||
|
||||
MarkerItem *_marker;
|
||||
|
||||
Units _units;
|
||||
QDateTime _date;
|
||||
qreal _time;
|
||||
qreal _distance;
|
||||
};
|
||||
|
||||
#endif // TRACKITEM_H
|
||||
|
Reference in New Issue
Block a user