diff --git a/sources/qetgraphicsitem/element.cpp b/sources/qetgraphicsitem/element.cpp index 05a8cdbc5..449e73cd4 100644 --- a/sources/qetgraphicsitem/element.cpp +++ b/sources/qetgraphicsitem/element.cpp @@ -1322,6 +1322,15 @@ void Element::setElementInformations(DiagramContext dc) emit elementInfoChange(old_info, m_data.m_informations); } +/** + * @brief Element::elementData + * @return the element data used by this element + */ +ElementData Element::elementData() const +{ + return m_data; +} + /** @brief comparPos Compare position of the two elements. Compare 3 points: diff --git a/sources/qetgraphicsitem/element.h b/sources/qetgraphicsitem/element.h index 554e70f81..ca4d8fa69 100644 --- a/sources/qetgraphicsitem/element.h +++ b/sources/qetgraphicsitem/element.h @@ -103,6 +103,15 @@ class Element : public QetGraphicsItem DiagramContext elementInformations()const {return m_data.m_informations;} virtual void setElementInformations(DiagramContext dc); + + ElementData elementData() const; + + /** + * @brief kindInformations + * @deprecated + * use elementData function instead + * @return + */ DiagramContext kindInformations() const {return m_kind_informations;} //@kind_information_ is used to store more information @@ -165,8 +174,20 @@ class Element : public QetGraphicsItem virtual void unlinkElement(Element *) {} virtual void initLink(QETProject *); QList linkedElements (); + + /** + * @brief linkType + * use elementData function instead + * @return + */ virtual kind linkType() const {return m_link_type;} // return the linkable type + /** + * @brief linkTypeToString + * use elementData function instead + * @return + */ QString linkTypeToString() const; + void newUuid() {m_uuid = QUuid::createUuid();} //create new uuid for this element protected: