|
QElectroTech
0.8-dev
|
Go to the documentation of this file.
18 #ifndef DIAGRAMEVENTADDSHAPE_H
19 #define DIAGRAMEVENTADDSHAPE_H
51 #endif // DIAGRAMEVENTADDSHAPE_H
void updateHelpCross(const QPointF &p)
DiagramEventAddShape::updateHelpCross Create and update the position of the cross to help user for dr...
Definition: diagrameventaddshape.cpp:211
void removePoints(int number=1)
QetShapeItem::removePoints Number of point to remove on the polygon If number is superior to number o...
Definition: qetshapeitem.cpp:228
Diagram * m_diagram
Definition: diagrameventinterface.h:66
static QColor background_color
background color of diagram
Definition: diagram.h:99
@ Rectangle
Definition: qetshapeitem.h:58
ShapeType shapeType() const
Definition: qetshapeitem.h:77
virtual void addItem(QGraphicsItem *item)
Diagram::addItem Réimplemented from QGraphicsScene::addItem(QGraphicsItem *item) Do some specific ope...
Definition: diagram.cpp:1550
void setNextPoint(QPointF P)
QetShapeItem::setNextPoint Add a new point to the curent polygon.
Definition: qetshapeitem.cpp:215
ShapeType
Definition: qetshapeitem.h:57
The DiagramEventAddShape class This event manage the creation of a shape.
Definition: diagrameventaddshape.h:29
BorderTitleBlock border_and_titleblock
Diagram dimensions and title block.
Definition: diagram.h:83
QPolygonF polygon
Definition: qetshapeitem.h:43
QGraphicsLineItem * m_help_verti
Definition: diagrameventaddshape.h:48
QRectF insideBorderRect() const
BorderTitleBlock::insideBorderRect.
Definition: bordertitleblock.cpp:185
@ Ellipse
Definition: qetshapeitem.h:59
bool setRect(const QRectF &rect)
QetShapeItem::setRect Set this item geometry to rect (only available if shape is a rectangle or an el...
Definition: qetshapeitem.cpp:140
The Diagram class This class represents an electric diagram. It manages its various child elements,...
Definition: diagram.h:56
QGraphicsLineItem * m_help_horiz
Definition: diagrameventaddshape.h:48
virtual void removeItem(QGraphicsItem *item)
Diagram::removeItem Reimplemented from QGraphicsScene::removeItem(QGraphicsItem *item) Do some specif...
Definition: diagram.cpp:1581
bool isReadOnly() const
Diagram::isReadOnly.
Definition: diagram.cpp:2363
~DiagramEventAddShape() override
DiagramEventAddShape::~DiagramEventAddShape.
Definition: diagrameventaddshape.cpp:42
The AddItemCommand class This command add an item in a diagram The item to add is template,...
Definition: diagramcommands.h:42
@ Polygon
Definition: qetshapeitem.h:60
void setP2(const QPointF &P2)
QetShapeItem::setP2 Set the second point of this item. If this item is a polyline,...
Definition: qetshapeitem.cpp:104
QUndoStack & undoStack()
Diagram::undoStack.
Definition: diagram.h:397
QRectF rect
Definition: qetshapeitem.h:41
int pointsCount() const
QetShapeItem::pointCount.
Definition: qetshapeitem.cpp:206
DiagramEventAddShape(Diagram *diagram, QetShapeItem::ShapeType shape_type)
DiagramEventAddShape::DiagramEventAddShape Default constructor.
Definition: diagrameventaddshape.cpp:28
void init() override
Definition: diagrameventaddshape.cpp:200
static QPointF snapToGrid(const QPointF &p)
Diagram::snapToGrid Return a nearest snap point of p.
Definition: diagram.cpp:2240
bool m_running
Definition: diagrameventinterface.h:67
The QetShapeItem class this class is used to draw a basic shape (line, rectangle, ellipse) into a dia...
Definition: qetshapeitem.h:36
QetShapeItem * m_shape_item
Definition: diagrameventaddshape.h:47
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override
DiagramEventAddShape::mouseReleaseEvent Action when mouse button is released.
Definition: diagrameventaddshape.cpp:135
bool m_abort
Definition: diagrameventinterface.h:68
void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override
DiagramEventAddShape::mouseMoveEvent Action when mouse move.
Definition: diagrameventaddshape.cpp:114
QetShapeItem::ShapeType m_shape_type
Definition: diagrameventaddshape.h:46
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) override
DiagramEventAddShape::mouseDoubleClickEvent Action when mouse button is double clicked.
Definition: diagrameventaddshape.cpp:177
The DiagramEventInterface class isRunning() return true if action is running (do something)....
Definition: diagrameventinterface.h:46
void setClosed(bool close)
QetShapeItem::setClosed Close this item, have effect only if this item is a polygon.
Definition: qetshapeitem.cpp:176
void mousePressEvent(QGraphicsSceneMouseEvent *event) override
DiagramEventAddShape::mousePressEvent Action when mouse is pressed.
Definition: diagrameventaddshape.cpp:61