1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-24 19:55:53 +01:00
GPXSee/src/GUI/sliderinfoitem.h

32 lines
616 B
C
Raw Normal View History

2015-10-17 01:33:02 +02:00
#ifndef SLIDERINFOITEM_H
#define SLIDERINFOITEM_H
#include <QGraphicsItem>
class SliderInfoItem : public QGraphicsItem
{
public:
enum Side {Left, Right};
2015-10-17 01:33:02 +02:00
SliderInfoItem(QGraphicsItem *parent = 0);
QRectF boundingRect() const {return _boundingRect;}
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
QWidget *widget);
2017-09-29 11:43:09 +02:00
void setText(const QString &x, const QString &y);
void setSide(Side side);
2017-12-03 00:36:52 +01:00
void setColor(const QColor &color);
2015-10-17 01:33:02 +02:00
private:
void updateBoundingRect();
Side _side;
2017-09-29 11:43:09 +02:00
QString _x, _y;
2015-10-17 01:33:02 +02:00
QRectF _boundingRect;
2017-12-03 00:36:52 +01:00
QColor _color;
2018-05-18 01:38:33 +02:00
QFont _font;
2015-10-17 01:33:02 +02:00
};
#endif // SLIDERINFOITEM_H