2015-10-17 01:33:02 +02:00
|
|
|
#ifndef SLIDERINFOITEM_H
|
|
|
|
#define SLIDERINFOITEM_H
|
|
|
|
|
|
|
|
#include <QGraphicsItem>
|
|
|
|
|
|
|
|
class SliderInfoItem : public QGraphicsItem
|
|
|
|
{
|
|
|
|
public:
|
2016-03-30 01:48:48 +02:00
|
|
|
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);
|
2016-03-30 01:48:48 +02:00
|
|
|
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();
|
|
|
|
|
2016-03-30 01:48:48 +02:00
|
|
|
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
|