mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 05:00:33 +01:00
Improve code style, Wrap code for better readability
This commit is contained in:
@@ -23,34 +23,42 @@
|
||||
|
||||
/**
|
||||
@brief The QetGraphicsHandlerItem class
|
||||
This graphics item represents a point, destined to be used as an handler,
|
||||
This graphics item represents a point,
|
||||
destined to be used as an handler,
|
||||
for modifie the geometrie of a another graphics item (like shapes).
|
||||
The graphics item to be modified, must call "installSceneEventFilter" of this item with itself for argument,.
|
||||
The ghraphics item to be modified, need to reimplement "sceneEventFilter" for create the modification behavior.
|
||||
The graphics item to be modified,
|
||||
must call "installSceneEventFilter"
|
||||
of this item with itself for argument,.
|
||||
The ghraphics item to be modified,
|
||||
need to reimplement "sceneEventFilter"
|
||||
for create the modification behavior.
|
||||
*/
|
||||
class QetGraphicsHandlerItem : public QGraphicsItem
|
||||
{
|
||||
public:
|
||||
QetGraphicsHandlerItem(qreal size = 10);
|
||||
QRectF boundingRect() const override;
|
||||
public:
|
||||
QetGraphicsHandlerItem(qreal size = 10);
|
||||
QRectF boundingRect() const override;
|
||||
|
||||
enum { Type = UserType + 1200};
|
||||
int type() const override {return Type;}
|
||||
|
||||
void setColor(QColor color);
|
||||
|
||||
protected:
|
||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
|
||||
protected:
|
||||
void paint(QPainter *painter,
|
||||
const QStyleOptionGraphicsItem *option,
|
||||
QWidget *widget) override;
|
||||
|
||||
private:
|
||||
private:
|
||||
QRectF m_handler_rect,
|
||||
m_br;
|
||||
qreal m_size;
|
||||
qreal m_size;
|
||||
QColor m_color;
|
||||
QPen m_pen;
|
||||
|
||||
public:
|
||||
static QVector<QetGraphicsHandlerItem *> handlerForPoint(const QVector<QPointF> &points, int size = 10);
|
||||
static QVector<QetGraphicsHandlerItem *> handlerForPoint(
|
||||
const QVector<QPointF> &points, int size = 10);
|
||||
};
|
||||
|
||||
#endif // QETGRAPHICSHANDLERITEM_H
|
||||
|
||||
Reference in New Issue
Block a user