#ifndef ITEMRESIZE_H#define ITEMRESIZE_H#include <QGraphicsPolygonItem>class ItemResize : public QGraphicsPolygonItem{public: enum {Type = UserType + 37}; enum resizePositions { None, UpperLeft, LowerRight, UpperRight, LowerLeft, Top, Bottom, Left, Right, Center }; ItemResize(); int type() const { return Type; } void setResizePosition(resizePositions position); resizePositions getResizePosition() {return resizeposition;} resizePositions resizeposition;};#endif // ITEMRESIZE_H
C++ (Qt)class ItemResize{ ///Все перечисления, переменные и прочее... resizeFunction(...);} class MyRect : public QGraphicsPolygonItem, ItemResize{ }
C++ (Qt)void paintMarkers(QPainter* painter);
C++ (Qt)void QGraphicsItem::paint ( QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = 0 );