21#include "../ElementsCollection/elementslocation.h"
22#include "../NameList/nameslist.h"
23#include "../autoNum/assignvariables.h"
24#include "../diagramcontext.h"
27#include "../properties/elementdata.h"
64 QGraphicsItem * =
nullptr,
78 enum {
Type = UserType + 1000 };
135 QString
name()
const override;
149 virtual QDomElement
toXml(
164 QList<ElementTextItemGroup *>
textGroups()
const;
196 void drawAxes(QPainter *,
const QStyleOptionGraphicsItem *);
202 const QStyleOptionGraphicsItem *);
205 const QStyleOptionGraphicsItem *);
206 bool buildFromXml(
const QDomElement &,
int * =
nullptr);
208 bool parseInput(
const QDomElement &dom_element);
210 const QDomElement &dom_element);
217 const QStyleOptionGraphicsItem *,
223 QGraphicsSceneMouseEvent *event)
override;
Definition conductor.h:43
Definition diagramcontext.h:57
The DiagramEventAddElement class This diagram event add a new element, for each left click button at ...
Definition diagrameventaddelement.h:33
The DynamicElementTextItem class This class provide a simple text field of element who can be added o...
Definition dynamicelementtextitem.h:40
The ElementData class WARNING This class inherit from PropertiesInterface but only fromXml is actuall...
Definition elementdata.h:32
DiagramContext m_informations
Definition elementdata.h:145
QList< QUuid > tmp_uuids_link
Definition element.h:230
ElementsLocation location() const
Definition element.cpp:1593
void drawHighlight(QPainter *, const QStyleOptionGraphicsItem *)
Definition element.cpp:377
QRectF boundingRect() const override
Definition element.cpp:253
void textRemoved(DynamicElementTextItem *deti)
QString linkTypeToString() const
linkTypeToString use elementData function instead
Definition element.cpp:1312
~Element() override
Element::~Element.
Definition element.cpp:134
void newUuid()
Definition element.h:193
Terminal * parseTerminal(const QDomElement &dom_element)
Element::parseTerminal Parse partTerminal from xml structure.
Definition element.cpp:653
bool buildFromXml(const QDomElement &, int *=nullptr)
Element::buildFromXml Build this element from an xml description.
Definition element.cpp:418
autonum::sequentialNumbers & rSequenceStruct()
Definition element.h:125
void linkedElementChanged()
DynamicElementTextItem * parseDynamicText(const QDomElement &dom_element)
Element::parseDynamicText Create the dynamic text field described in dom_element.
Definition element.cpp:631
void hoverEnterEvent(QGraphicsSceneHoverEvent *) override
Definition element.cpp:1447
QList< Conductor * > conductors() const
Element::conductors.
Definition element.cpp:155
QUuid m_uuid
Definition element.h:231
QList< QPair< Terminal *, Terminal * > > AlignedFreeTerminals() const
Element::AlignedFreeTerminals.
Definition element.cpp:1266
void textRemovedFromGroup(DynamicElementTextItem *text, ElementTextItemGroup *group)
QString m_prefix
Definition element.h:251
virtual void unlinkElement(Element *)
Definition element.h:176
bool isFree() const
Definition element.h:259
kind m_link_type
Definition element.h:232
bool m_mouse_over
Definition element.h:250
QList< DynamicElementTextItem * > dynamicTextItems() const
Element::dynamicTextItems.
Definition element.cpp:1101
QPoint setHotspot(QPoint)
Definition element.cpp:289
const QPicture m_picture
Definition element.h:242
virtual void initLink(QETProject *)
Element::initLink Initialise the link between this element and other elements. This method can be cal...
Definition element.cpp:1294
QSize size() const
Definition element.cpp:279
@ Type
Definition element.h:78
DiagramContext kindInformations() const
kindInformations
Definition element.h:117
ElementData m_data
Definition element.h:244
const QPicture m_low_zoom_picture
Definition element.h:243
void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override
Element::mouseMoveEvent.
Definition element.cpp:1419
QList< Element * > linkedElements()
Element::linkedElements.
Definition element.h:288
void removeDynamicTextItem(DynamicElementTextItem *deti)
Element::removeDynamicTextItem Remove deti, no matter if is a child of this element or a child of a g...
Definition element.cpp:1072
int type() const override
Definition element.h:79
kind
The kind enum Used to know the kind of this element (master, slave, report ect...)
Definition element.h:53
@ Simple
Definition element.h:54
@ NextReport
Definition element.h:55
@ Thumbnail
Definition element.h:61
@ AllReport
Definition element.h:57
@ Master
Definition element.h:58
@ Slave
Definition element.h:59
@ Terminale
Definition element.h:60
@ PreviousReport
Definition element.h:56
void textAdded(DynamicElementTextItem *deti)
void elementInfoChange(DiagramContext old_info, DiagramContext new_info)
QList< ElementTextItemGroup * > m_texts_group
Definition element.h:253
void hoverLeaveEvent(QGraphicsSceneHoverEvent *) override
Definition element.cpp:1465
QString m_F_str
Definition element.h:238
bool m_freeze_label
Definition element.h:237
virtual kind linkType() const
linkType use elementData function instead
Definition element.h:185
QUuid uuid() const
Element::uuid.
Definition element.h:281
QString name() const override
Element::name.
Definition element.cpp:1589
autonum::sequentialNumbers m_autoNum_seq
Definition element.h:236
bool parseElement(const QDomElement &dom)
Element::parseElement Parse the element of the xml description of this element.
Definition element.cpp:562
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override
Element::mouseReleaseEvent.
Definition element.cpp:1432
void drawAxes(QPainter *, const QStyleOptionGraphicsItem *)
Definition element.cpp:327
bool parseInput(const QDomElement &dom_element)
Element::parseInput Parse the input (old text field) the parsed input are converted to dynamic text f...
Definition element.cpp:578
autonum::sequentialNumbers sequenceStruct() const
Definition element.h:123
virtual void unlinkAllElements()
Definition element.h:175
void textAddedToGroup(DynamicElementTextItem *text, ElementTextItemGroup *group)
void setPrefix(QString)
Element::setPrefix set Element Prefix.
Definition element.cpp:1538
void displayHelpLine(bool b=true)
Element::displayHelpLine Display the help line of each terminal if b is true.
Definition element.cpp:198
void setSize(int, int)
Element::setSize Define the size of the element. The size must be a multiple of 10....
Definition element.cpp:267
void addDynamicTextItem(DynamicElementTextItem *deti=nullptr)
Element::addDynamiqueTextItem Add deti as a dynamic text item of this element, deti is reparented to ...
Definition element.cpp:1049
virtual bool fromXml(QDomElement &, QHash< int, Terminal * > &)
Element::fromXml Import the parameters of this element from a xml document. When call this function e...
Definition element.cpp:715
QPoint hotspot_coord
Definition element.h:249
QList< Terminal * > terminals() const
Element::terminals.
Definition element.cpp:144
void removeTextGroup(ElementTextItemGroup *group)
Element::removeTextGroup Remove the text group group from this element, and set the parent of group t...
Definition element.cpp:1164
QList< ElementTextItemGroup * > textGroups() const
Element::textGroups.
Definition element.cpp:1206
void drawSelection(QPainter *, const QStyleOptionGraphicsItem *)
Definition element.cpp:349
QList< Terminal * > m_terminals
Definition element.h:241
QString getPrefix() const
Element::getPrefix get Element Prefix.
Definition element.cpp:1529
void setUpFormula(bool code_letter=true)
Element::setUpFormula Set up the formula used to create the label of this element.
Definition element.cpp:1484
QList< DynamicElementTextItem * > m_dynamic_text_list
Definition element.h:252
QPixmap pixmap()
Element::pixmap.
Definition element.cpp:315
void textsGroupAdded(ElementTextItemGroup *group)
QString actualLabel()
Element::actualLabel Always return the current label to be displayed. This function is useful when la...
Definition element.cpp:1571
bool addTextToGroup(DynamicElementTextItem *text, ElementTextItemGroup *group)
Element::addTextToGroup Add the text text to the group group; If group isn't owned by this element re...
Definition element.cpp:1218
DiagramContext m_kind_informations
Definition element.h:235
void freezeLabel(bool freeze)
Element::freezeLabel Freeze this element label.
Definition element.cpp:1547
QList< Element * > connected_elements
Definition element.h:229
void freezeNewAddedElement()
Element::freezeNewAddedElement Freeze this label if needed.
Definition element.cpp:1556
bool m_must_highlight
Definition element.h:247
void textsGroupAboutToBeRemoved(ElementTextItemGroup *group)
ElementData elementData() const
Element::elementData.
Definition element.cpp:1361
void setElementData(ElementData data)
Element::setElementData Set new data for this element. If m_information of data is changed,...
Definition element.cpp:1372
ElementsLocation m_location
Definition element.h:240
ElementTextItemGroup * addTextGroup(const QString &name)
Element::addTextGroup Create and add an element text item group to this element. If this element alre...
Definition element.cpp:1114
QSize dimensions
Definition element.h:248
void editProperty() override
Definition element.cpp:166
virtual QDomElement toXml(QDomDocument &, QHash< Terminal *, int > &) const
Element::toXml Allows to export the element in XML.
Definition element.cpp:897
DiagramContext elementInformations() const
Definition element.h:104
static bool valideXml(QDomElement &)
Definition element.cpp:684
virtual void setHighlighted(bool)
Definition element.cpp:187
void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *) override
Element::paint.
Definition element.cpp:209
bool isFreezeLabel() const
Definition element.h:131
QPoint hotspot() const
Definition element.cpp:306
bool removeTextFromGroup(DynamicElementTextItem *text, ElementTextItemGroup *group)
Element::removeTextFromGroup Remove the text text from the group group, en reparent text to this elem...
Definition element.cpp:1241
int orientation() const
Definition element.h:272
ElementTextItemGroup * textGroup(const QString &name) const
Element::textGroup.
Definition element.cpp:1193
virtual void setElementInformations(DiagramContext dc)
Element::setElementInformations Set new information for this element. If new information is different...
Definition element.cpp:1341
virtual void linkToElement(Element *)
Definition element.h:174
The ElementTextItemGroup class This class represent a group of element text Texts in the group can be...
Definition elementtextitemgroup.h:36
The ElementsLocation class This class represents the location, the location of an element or of a cat...
Definition elementslocation.h:47
Definition qetproject.h:62
Definition qetgraphicsitem.h:28
QET::GraphicsItemState state() const
QetGraphicsItem::state.
Definition qetgraphicsitem.cpp:75
The Terminal class This class represents a terminal of an electrical element, i.e....
Definition terminal.h:36
Definition assignvariables.h:34
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 ...
Definition element.cpp:1393
qreal correctAngle(const qreal &, const bool &positive=false)
Definition qet.cpp:582