2015-10-05 01:43:48 +02:00
|
|
|
#ifndef SLIDERITEM_H
|
|
|
|
#define SLIDERITEM_H
|
|
|
|
|
|
|
|
#include <QGraphicsItem>
|
|
|
|
|
|
|
|
class SliderItem : public QGraphicsObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2015-10-17 01:33:02 +02:00
|
|
|
SliderItem(QGraphicsObject *parent = 0);
|
2015-10-05 01:43:48 +02:00
|
|
|
|
|
|
|
QRectF boundingRect() const;
|
|
|
|
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
|
|
|
|
QWidget *widget);
|
|
|
|
|
2016-03-19 17:24:53 +01:00
|
|
|
const QRectF &area() const {return _area;}
|
2015-10-05 01:43:48 +02:00
|
|
|
void setArea(const QRectF &area) {_area = area;}
|
|
|
|
|
2015-12-19 20:23:07 +01:00
|
|
|
void clear();
|
|
|
|
|
2015-10-05 01:43:48 +02:00
|
|
|
signals:
|
|
|
|
void positionChanged(const QPointF&);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
QVariant itemChange(GraphicsItemChange change, const QVariant &value);
|
|
|
|
|
|
|
|
private:
|
|
|
|
QRectF _area;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // SLIDERITEM_H
|