You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
1.2 KiB
38 lines
1.2 KiB
#ifndef UBGRAPHICSSTROKESGROUP_H
|
|
#define UBGRAPHICSSTROKESGROUP_H
|
|
|
|
#include <QGraphicsItemGroup>
|
|
#include <QGraphicsSceneMouseEvent>
|
|
|
|
#include "core/UB.h"
|
|
#include "UBItem.h"
|
|
|
|
class UBGraphicsStrokesGroup : public QObject, public QGraphicsItemGroup, public UBItem, public UBGraphicsItem
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
UBGraphicsStrokesGroup(QGraphicsItem* parent = 0);
|
|
~UBGraphicsStrokesGroup();
|
|
virtual UBItem* deepCopy() const;
|
|
virtual void copyItemParameters(UBItem *copy) const;
|
|
virtual void remove();
|
|
virtual UBGraphicsItemDelegate* Delegate() const {return mDelegate;}
|
|
enum { Type = UBGraphicsItemType::StrokeItemType };
|
|
virtual int type() const
|
|
{
|
|
return Type;
|
|
}
|
|
virtual void setUuid(const QUuid &pUuid);
|
|
|
|
protected:
|
|
|
|
virtual QPainterPath shape () const;
|
|
|
|
virtual void mousePressEvent(QGraphicsSceneMouseEvent *event);
|
|
virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
|
|
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
|
|
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
|
virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value);
|
|
};
|
|
|
|
#endif // UBGRAPHICSSTROKESGROUP_H
|
|
|