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

38 lines
647 B
C++

#ifndef SLIDERITEM_H
#define SLIDERITEM_H
#include <QGraphicsObject>
class QColor;
class SliderItem : public QGraphicsObject
{
Q_OBJECT
public:
SliderItem(QGraphicsItem *parent = 0);
QRectF boundingRect() const;
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
QWidget *widget);
const QRectF &area() const {return _area;}
void setArea(const QRectF &area);
void setColor(const QColor &color);
void clear();
signals:
void positionChanged(const QPointF&);
protected:
QVariant itemChange(GraphicsItemChange change, const QVariant &value);
private:
QRectF _area;
QColor _color;
};
#endif // SLIDERITEM_H