18 #ifndef ELEMENT_SCENE_H 19 #define ELEMENT_SCENE_H 103 virtual int xGrid()
const;
104 virtual int yGrid()
const;
105 virtual void setGrid(
int,
int);
106 virtual const QDomDocument
toXml(
bool =
true);
108 virtual void fromXml(
const QDomDocument &,
const QPointF & = QPointF(),
bool =
true,
ElementContent * =
nullptr);
109 virtual void reset();
110 virtual QList<CustomElementPart *>
primitives()
const;
173 Q_DECLARE_OPERATORS_FOR_FLAGS(ElementScene::ItemOptions)
180 m_names_list = nameslist;
void setEventInterface(ESEventInterface *event_interface)
ElementScene::setEventInterface Set a new event interface.
virtual void fromXml(const QDomDocument &, const QPointF &=QPointF(), bool=true, ElementContent *=nullptr)
void mousePressEvent(QGraphicsSceneMouseEvent *) override
ElementScene::mousePressEvent.
void drawForeground(QPainter *, const QRectF &) override
DiagramContext m_elmt_kindInfo
element type
void slot_deselectAll()
ElementScene::slot_deselectAll deselect all item.
void elementInfoChanged()
void setBehavior(ElementScene::Behavior)
ElementScene::setBehavior Modifie the current behavior of this scene.
void slot_editAuthorInformations()
QMutex * m_decorator_lock
void partsRemoved()
Signal emitted after one or several parts were removed.
virtual QRectF boundingRectFromXml(const QDomDocument &)
void slot_selectAll()
ElementScene::slot_selectAll Select all items.
QGIManager m_qgi_manager
element kind info
void slot_editProperties()
ElementScene::slot_editProperties Open dialog to edit the element properties.
QString informations() const
bool wasCopiedFromThisElement(const QString &)
void stackAction(ElementEditionCommand *)
void mouseReleaseEvent(QGraphicsSceneMouseEvent *) override
ElementScene::mouseReleaseEvent.
static bool zValueLessThan(QGraphicsItem *, QGraphicsItem *)
ElementContent loadContent(const QDomDocument &)
ElementScene::loadContent.
QString m_informations
List of localized names.
virtual const QDomDocument toXml(bool=true)
ElementScene::toXml Export this element as a xml file.
virtual void setGrid(int, int)
void addPrimitive(QGraphicsItem *)
void partsZValueChanged()
Signal emitted when the zValue of one or several parts change.
void slot_select(const ElementContent &)
ElementScene::slot_select Select the item in content, every others items in the scene are deselected...
QGIManager & qgiManager()
QRectF elementContentBoundingRect(const ElementContent &) const
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) override
ElementScene::mouseDoubleClickEvent.
~ElementScene() override
ElementScene::~ElementScene.
ESEventInterface * m_event_interface
void pasteAreaDefined(const QRectF &)
Signal emitted when users have defined the copy/paste area.
QETElementEditor * editor() const
void managePrimitivesGroups()
ElementScene::managePrimitivesGroups Ensure the decorator is adequately shown, hidden or updated so i...
void needZoomFit()
Signal emitted when need zoomFit.
The ElementEditionCommand class ElementEditionCommand is the base class for all commands classes invo...
DiagramContext elementKindInfo() const
void partsAdded()
Signal emitted after one or several parts were added.
ElementScene(QETElementEditor *, QObject *=nullptr)
void setNames(const NamesList &)
virtual void reset()
ElementScene::reset Remove all QGraphicsItems in the scene and clear the undo stack.
static bool clipboardMayContainElement()
void contextMenuEvent(QGraphicsSceneContextMenuEvent *event) override
ElementScene::contextMenuEvent Display the context menu event, only if behavior are Normal...
void keyPressEvent(QKeyEvent *event) override
ElementScene::keyPressEvent manage key press event.
virtual int yGrid() const
bool containsTerminals() const
void clearEventInterface()
ElementScene::clearEventInterface Clear the current event interface.
bool applyInformations(const QDomDocument &)
virtual ElementContent selectedContent() const
virtual QList< CustomElementPart * > primitives() const
QString m_elmt_type
Extra informations.
void mouseMoveEvent(QGraphicsSceneMouseEvent *) override
ElementScene::mouseMoveEvent.
DiagramContext m_elmt_information
DiagramContext elementInformation() const
virtual QList< QGraphicsItem * > zItems(ItemOptions options=ItemOptions(SortByZValue|IncludeTerminals|SelectedOrNot)) const
QRectF m_defined_paste_area
void centerElementToOrigine()
ElementScene::centerElementToOrigine try to center better is possible the element to the scene (the c...
virtual void getPasteArea(const QRectF &)
QString elementType() const
QETElementEditor * m_element_editor
ElementContent addContentAtPos(const ElementContent &, const QPointF &)
virtual int xGrid() const
QList< QGraphicsItem * > ElementContent
void setInformations(const QString &)
QPointF snapToGrid(QPointF point)
ElementPrimitiveDecorator * m_decorator
Decorator item displayed when at least one item is selected.
QRectF elementSceneGeometricRect() const
void slot_editNames()
ElementScene::slot_editNames Launch a dialog for edit the names of the edited element.
ElementScene::Behavior behavior() const
void setElementInfo(const DiagramContext &dc)
QGraphicsRectItem * m_paste_area
ElementContent addContent(const ElementContent &)
void slot_invertSelection()