69 enum {
Type = UserType + 1000 };
104 QString
name()
const override;
114 virtual bool fromXml(QDomElement &, QHash<int, Terminal *> &,
bool =
false);
115 virtual QDomElement
toXml(QDomDocument &, QHash<Terminal *, int> &)
const;
127 QList<ElementTextItemGroup *>
textGroups()
const;
142 void drawAxes(QPainter *,
const QStyleOptionGraphicsItem *);
146 void drawSelection(QPainter *,
const QStyleOptionGraphicsItem *);
147 void drawHighlight(QPainter *,
const QStyleOptionGraphicsItem *);
148 bool buildFromXml(
const QDomElement &,
int * =
nullptr);
150 bool parseInput(
const QDomElement &dom_element);
156 void paint(QPainter *,
const QStyleOptionGraphicsItem *, QWidget *)
override;
void removeTextGroup(ElementTextItemGroup *group)
Element::removeTextGroup Remove the text group from this element, and set the parent of group to 0...
QList< QPair< Terminal *, Terminal * > > AlignedFreeTerminals() const
Element::AlignedFreeTerminals.
virtual void linkToElement(Element *)
virtual kind linkType() const
ElementsLocation location() const
void freezeNewAddedElement()
Element::freezeNewAddedElement Freeze this label if needed.
QList< Element * > linkedElements()
Element::linkedElements.
QList< Element * > connected_elements
Element(const ElementsLocation &location, QGraphicsItem *=nullptr, int *state=nullptr, Element::kind link_type=Element::Simple)
Element::Element.
virtual void unlinkElement(Element *)
The DynamicElementTextItem class This class provide a simple text field of element who can be added o...
void hoverEnterEvent(QGraphicsSceneHoverEvent *) override
kind
The kind enum Used to know the kind of this element (master, slave, report ect...) ...
autonum::sequentialNumbers m_autoNum_seq
void textsGroupAdded(ElementTextItemGroup *group)
bool parseInput(const QDomElement &dom_element)
Element::parseInput Parse the input (old text field) the parsed input are converted to dynamic text f...
QRectF boundingRect() const override
~Element() override
Element::~Element.
DiagramContext elementInformations() const
QUuid uuid() const
Element::uuid.
QPoint setHotspot(QPoint)
autonum::sequentialNumbers & rSequenceStruct()
void drawHighlight(QPainter *, const QStyleOptionGraphicsItem *)
autonum::sequentialNumbers sequenceStruct() const
int type() const override
virtual void setHighlighted(bool)
void setUpFormula(bool code_letter=true)
Element::setUpFormula Set up the formula used to create the label of this element.
const QPicture m_low_zoom_picture
Terminal * parseTerminal(const QDomElement &dom_element)
QString name() const override
Element::name.
void linkedElementChanged()
bool buildFromXml(const QDomElement &, int *=nullptr)
Element::buildFromXml Build this element from an xml description.
QList< Conductor * > conductors() const
Element::conductors.
void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *) override
Element::paint.
ElementTextItemGroup * textGroup(const QString &name) const
DiagramContext m_element_informations
void setSize(int, int)
Element::setSize Define the size of the element. The size must be a multiple of 10. If not, the dimensions indicated will be arrrondies to higher tens.
virtual QDomElement toXml(QDomDocument &, QHash< Terminal *, int > &) const
QList< Terminal * > terminals() const
Element::terminals.
void textsGroupAboutToBeRemoved(ElementTextItemGroup *group)
void textAddedToGroup(DynamicElementTextItem *text, ElementTextItemGroup *group)
QET::GraphicsItemState state() const
QetGraphicsItem::state.
void addDynamicTextItem(DynamicElementTextItem *deti=nullptr)
Element::addDynamiqueTextItem Add as a dynamic text item of this element, is reparented to this If ...
void removeDynamicTextItem(DynamicElementTextItem *deti)
Element::removeDynamicTextItem Remove , no matter if is a child of this element or a child of a group...
qreal correctAngle(const qreal &)
QList< ElementTextItemGroup * > m_texts_group
bool parseElement(const QDomElement &dom)
Element::parseElement Parse the element of the xml description of this element.
QList< QUuid > tmp_uuids_link
virtual void initLink(QETProject *)
Element::initLink Initialise the link between this element and other elements. This method can be cal...
virtual bool fromXml(QDomElement &, QHash< int, Terminal *> &, bool=false)
Element::fromXml Import the parameters of this element from a xml document. When call this function e...
DynamicElementTextItem * parseDynamicText(const QDomElement &dom_element)
Element::parseDynamicText Create the dynamic text field describ in .
QPixmap pixmap()
Element::pixmap.
virtual void unlinkAllElements()
bool removeTextFromGroup(DynamicElementTextItem *text, ElementTextItemGroup *group)
Element::removeTextFromGroup Remove the text from the group , en reparent to this element...
void editProperty() override
bool isFreezeLabel() const
virtual void setElementInformations(DiagramContext dc)
Element::setElementInformations Set new information for this element. If new information is different...
QList< Terminal * > m_terminals
ElementTextItemGroup * addTextGroup(const QString &name)
void textRemovedFromGroup(DynamicElementTextItem *text, ElementTextItemGroup *group)
void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override
Element::mouseMoveEvent.
void hoverLeaveEvent(QGraphicsSceneHoverEvent *) override
The ElementTextItemGroup class This class represent a group of element text Texts in the group can be...
void elementInfoChange(DiagramContext old_info, DiagramContext new_info)
DiagramContext m_kind_informations
void drawSelection(QPainter *, const QStyleOptionGraphicsItem *)
bool comparPos(const Element *elmt1, const Element *elmt2)
comparPos Compare position of the two elements. Compare 3 points: 1 folio - 2 row - 3 line returns a ...
void setPrefix(QString)
Element::setPrefix set Element Prefix.
static bool valideXml(QDomElement &)
The DiagramEventAddElement class This diagram event add a new element, for each left click button at ...
void drawAxes(QPainter *, const QStyleOptionGraphicsItem *)
ElementsLocation m_location
QList< DynamicElementTextItem * > m_dynamic_text_list
void textAdded(DynamicElementTextItem *deti)
void textRemoved(DynamicElementTextItem *deti)
DiagramContext kindInformations() const
QString getPrefix() const
Element::getPrefix get Element Prefix.
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override
Element::mouseReleaseEvent.
void freezeLabel(bool freeze)
Element::freezeLabel Freeze this element label.
QHash< DynamicElementTextItem *, QPointF > m_converted_text_from_xml_description
bool addTextToGroup(DynamicElementTextItem *text, ElementTextItemGroup *group)
Element::addTextToGroup Add the text to the group ; If isn't owned by this element return false...
QList< DynamicElementTextItem * > dynamicTextItems() const
Element::dynamicTextItems.
void displayHelpLine(bool b=true)
Element::displayHelpLine Display the help line of each terminal if b is true.
QList< ElementTextItemGroup * > textGroups() const
Element::textGroups.