mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-07-28 09:24:24 +02:00
Fixed track tooltip area handling
Added some more waypoint info to waypoint tooltips. Refactoring & optimization.
This commit is contained in:
32
src/trackitem.h
Normal file
32
src/trackitem.h
Normal file
@ -0,0 +1,32 @@
|
||||
#ifndef TRACKITEM_H
|
||||
#define TRACKITEM_H
|
||||
|
||||
#include <QGraphicsPathItem>
|
||||
#include <QDateTime>
|
||||
#include "units.h"
|
||||
#include "track.h"
|
||||
|
||||
class TrackItem : public QGraphicsPathItem
|
||||
{
|
||||
public:
|
||||
TrackItem(const Track &track);
|
||||
|
||||
QPainterPath shape() const {return _shape;}
|
||||
void setScale(qreal scale);
|
||||
|
||||
void setUnits(enum Units units);
|
||||
void setColor(const QColor &color);
|
||||
|
||||
private:
|
||||
void updateShape();
|
||||
QString toolTip();
|
||||
|
||||
QPainterPath _shape;
|
||||
|
||||
Units _units;
|
||||
QDateTime _date;
|
||||
qreal _time;
|
||||
qreal _distance;
|
||||
};
|
||||
|
||||
#endif // TRACKITEM_H
|
Reference in New Issue
Block a user