40 static void loadSequential(
const QDomElement &dom_element,
const QString& seq, QStringList* list)
43 while (!dom_element.attribute(seq + QString::number(i+1)).isEmpty())
45 list->append(dom_element.attribute(seq + QString::number(i+1)));
97 m_uuid = QUuid::createUuid();
99 setFlags(QGraphicsItem::ItemIsMovable | QGraphicsItem::ItemIsSelectable);
100 setAcceptHoverEvents(
true);
102 connect(
this, &Element::rotationChanged, [
this]() {
103 for(QGraphicsItem *qgi : childItems())
105 if (
Terminal *t = qgraphicsitem_cast<Terminal *>(qgi))
106 t->updateConductor();
154 dialog.setWindowModality(Qt::WindowModal);
184 void Element::paint(QPainter *painter,
const QStyleOptionGraphicsItem *options, QWidget *)
190 if (options && options -> levelOfDetail < 1.0) {
219 prepareGeometryChange();
221 while (wid % 10) ++ wid;
222 while (hei % 10) ++ hei;
240 prepareGeometryChange();
275 painter -> setPen(Qt::blue);
276 painter -> drawLine(0, 0, 10, 0);
277 painter -> drawLine(7,-3, 10, 0);
278 painter -> drawLine(7, 3, 10, 0);
279 painter -> setPen(Qt::red);
280 painter -> drawLine(0, 0, 0, 10);
281 painter -> drawLine(0, 10,-3, 7);
282 painter -> drawLine(0, 10, 3, 7);
296 painter -> setRenderHint(QPainter::Antialiasing,
false);
297 painter -> setRenderHint(QPainter::TextAntialiasing,
false);
298 painter -> setRenderHint(QPainter::SmoothPixmapTransform,
false);
301 t.setColor(Qt::gray);
302 t.setStyle(Qt::DashDotLine);
304 painter -> setPen(t);
306 painter -> drawRoundRect(
boundingRect().adjusted(1, 1, -1, -1), 10, 10);
307 painter -> restore();
320 QRadialGradient gradient(
325 gradient.setColorAt(0.0, QColor::fromRgb(69, 137, 255, 255));
326 gradient.setColorAt(1.0, QColor::fromRgb(69, 137, 255, 0));
327 QBrush brush(gradient);
329 painter -> setPen(Qt::NoPen);
330 painter -> setBrush(brush);
332 painter -> drawRoundRect(
boundingRect().adjusted(1, 1, -1, -1), 10, 10);
333 painter -> restore();
354 if (xml_def_elmt.tagName() !=
"definition" || xml_def_elmt.attribute(
"type") !=
"element")
362 if (xml_def_elmt.hasAttribute(
"version"))
365 qreal element_version = xml_def_elmt.attribute(
"version").toDouble(&conv_ok);
366 if (conv_ok &&
QET::version.toDouble() < element_version)
368 std::cerr << qPrintable(
370 " a été enregistré avec une version" 371 " ultérieure de QElectroTech.")
377 int w, h, hot_x, hot_y;
393 if (xml_def_elmt.firstChild().isNull())
409 int parsed_elements_count = 0;
410 for (QDomNode node = xml_def_elmt.firstChild() ; !node.isNull() ; node = node.nextSibling())
412 QDomElement elmts = node.toElement();
416 if (elmts.tagName() ==
"description")
420 QList <QDomElement> input_field;
421 bool have_label =
false;
422 for (QDomElement input_node = node.firstChildElement(
"input") ; !input_node.isNull() ; input_node = input_node.nextSiblingElement(
"input"))
424 if (!input_node.isNull())
426 input_field << input_node;
427 if (input_node.attribute(
"tagg",
"none") ==
"label")
431 if(!have_label && !input_field.isEmpty())
432 input_field.first().setAttribute(
"tagg",
"label");
435 for (QDomNode n = node.firstChild() ; !n.isNull() ; n = n.nextSibling())
437 QDomElement qde = n.toElement();
442 ++ parsed_elements_count;
459 ++ parsed_elements_count;
462 if (!parsed_elements_count)
487 else if (dom.tagName() ==
"input")
return(
parseInput(dom));
512 deti->
setText(dom_element.attribute(
"text",
"_"));
513 QFont font = deti->
font();
514 font.setPointSize(dom_element.attribute(
"size", QString::number(9)).toInt());
516 deti->setRotation(dom_element.attribute(
"rotation", QString::number(0)).toDouble());
518 if(dom_element.attribute(
"tagg",
"none") !=
"none")
527 QTransform transform;
529 transform.rotate(dom_element.attribute(
"rotation",
"0").toDouble());
530 QPointF pos = transform.map(QPointF(0, -deti->boundingRect().height()/2));
533 QPointF p(dom_element.attribute(
"x", QString::number(0)).toDouble(),
534 dom_element.attribute(
"y", QString::number(0)).toDouble());
535 transform.translate(p.x(), p.y());
536 deti->setPos(transform.map(pos));
557 QDomElement dom(dom_element.cloneNode(
true).toElement());
560 deti->
m_uuid = QUuid::createUuid();
567 qreal terminalx, terminaly;
575 if (!dom_element.hasAttribute(
"orientation")) {
578 if (dom_element.attribute(
"orientation") ==
"n") {
581 else if (dom_element.attribute(
"orientation") ==
"s") {
584 else if (dom_element.attribute(
"orientation") ==
"e") {
587 else if (dom_element.attribute(
"orientation") ==
"w") {
594 Terminal *new_terminal =
new Terminal(terminalx, terminaly, terminalo,
this);
606 return(new_terminal);
616 if (e.tagName() !=
"element")
return(
false);
619 if (!e.hasAttribute(
"type"))
return(
false);
620 if (!e.hasAttribute(
"x"))
return(
false);
621 if (!e.hasAttribute(
"y"))
return(
false);
625 e.attribute(
"x").toDouble(&conv_ok);
626 if (!conv_ok)
return(
false);
629 e.attribute(
"y").toDouble(&conv_ok);
630 if (!conv_ok)
return(
false);
647 bool Element::fromXml(QDomElement &e, QHash<int, Terminal *> &table_id_adr,
bool handle_inputs_rotation)
654 QList<QDomElement> liste_terminals;
659 QHash<int, Terminal *> priv_id_adr;
660 int terminals_non_trouvees = 0;
661 foreach(QGraphicsItem *qgi, childItems()) {
662 if (
Terminal *p = qgraphicsitem_cast<Terminal *>(qgi)) {
663 bool terminal_trouvee =
false;
664 foreach(QDomElement qde, liste_terminals) {
666 priv_id_adr.insert(qde.attribute(
"id").toInt(), p);
667 terminal_trouvee =
true;
673 if (!terminal_trouvee) ++ terminals_non_trouvees;
677 if (terminals_non_trouvees > 0)
685 foreach(
int id_trouve, priv_id_adr.keys())
687 if (table_id_adr.contains(id_trouve))
695 foreach(
int id_trouve, priv_id_adr.keys()) {
696 table_id_adr.insert(id_trouve, priv_id_adr.value(id_trouve));
702 foreach (QDomElement qdo, uuid_list)
tmp_uuids_link << qdo.attribute(
"uuid");
705 m_uuid= QUuid(e.attribute(
"uuid", QUuid::createUuid().toString()));
710 QString fl = e.attribute(
"freezeLabel",
"false");
714 if (e.hasAttribute(
"sequ_1") || e.hasAttribute(
"sequf_1") || e.hasAttribute(
"seqt_1") || e.hasAttribute(
"seqtf_1") || e.hasAttribute(
"seqh_1") || e.hasAttribute(
"sequf_1"))
721 QGraphicsObject::setPos(e.attribute(
"x").toDouble(), e.attribute(
"y").toDouble());
722 setZValue(e.attribute(
"z", QString::number(this->zValue())).toDouble());
723 setFlags(QGraphicsItem::ItemIsMovable | QGraphicsItem::ItemIsSelectable);
727 int read_ori = e.attribute(
"orientation").toInt(&conv_ok);
728 if (!conv_ok || read_ori < 0 || read_ori > 3) read_ori = 0;
729 if (handle_inputs_rotation) {
730 setRotation(rotation() + (90*read_ori));
732 setRotation(90*read_ori);
759 QList <DynamicElementTextItem *> successfully_converted;
760 const QList <QDomElement> dom_inputs = inputs;
764 for(
const QDomElement& dom_input : dom_inputs)
777 deti->setText(dom_input.attribute(
"text"));
779 qreal rotation = deti->rotation();
782 if (dom_input.attribute(
"userrotation").toDouble())
783 rotation = dom_input.attribute(
"userrotation").toDouble();
785 if (dom_input.hasAttribute(
"userx"))
786 xml_pos.setX(dom_input.attribute(
"userx").toDouble());
787 if(dom_input.hasAttribute(
"usery"))
788 xml_pos.setY(dom_input.attribute(
"usery",
"0").toDouble());
794 deti->setPos(xml_pos);
795 deti->setRotation(rotation);
797 QTransform transform;
799 transform.rotate(rotation);
800 QPointF pos = transform.map(QPointF(0, -deti->boundingRect().height()/2));
803 transform.translate(xml_pos.x(), xml_pos.y());
804 deti->setPos(transform.map(pos));
809 inputs.removeAll(dom_input);
812 successfully_converted << deti;
837 dc.
fromXml(e.firstChildElement(
"elementInformations"),
"elementInformation");
844 if (dc[
"label"].toString().
contains(
"%") && dc[
"formula"].toString().isNull())
846 dc.
addValue(
"formula", dc[
"label"]);
849 if(dc.
value(
"label").toString().isEmpty() &&
856 deti->m_block_alignment =
true;
859 deti->m_block_alignment =
false;
869 if(!successfully_converted.isEmpty())
885 if(!label.isEmpty() && la &&
886 ((!comment.isEmpty() && c) || (!
location.isEmpty() && lo)))
893 qreal rotation = deti->rotation();
902 if(!comment.isEmpty() && c)
907 QFont font = comment_text->
font();
908 font.setPointSize(6);
911 if(comment_text->toPlainText().count() > 17)
913 comment_text->setPos(deti->x(), deti->y()+10);
928 QFont font = location_text->
font();
929 font.setPointSize(6);
931 if(location_text->toPlainText().count() > 17)
933 location_text->setPos(deti->x(), deti->y()+20);
937 QPointF pos = deti->pos();
955 group->
setPos(pos - deti->pos());
965 if((!comment.isEmpty() && c) || (!
location.isEmpty() && lo))
969 if(!comment.isEmpty() && c)
974 QFont font = comment_text->
font();
975 font.setPointSize(6);
988 QFont font = location_text->
font();
989 font.setPointSize(6);
993 location_text->setPos(comment_text->x(), comment_text->y()+10);
1021 QDomElement
Element::toXml(QDomDocument &document, QHash<Terminal *, int> &table_adr_id)
const 1023 QDomElement element = document.createElement(
"element");
1029 element.setAttribute(
"uuid",
uuid().toString());
1032 element.setAttribute(
"prefix",
m_prefix);
1035 element.setAttribute(
"freezeLabel",
m_freeze_label?
"true" :
"false");
1039 if (seq.hasChildNodes())
1040 element.appendChild(seq);
1043 element.setAttribute(
"x", QString::number(pos().x()));
1044 element.setAttribute(
"y", QString::number(pos().y()));
1045 element.setAttribute(
"z", QString::number(this->zValue()));
1046 element.setAttribute(
"orientation", QString::number(
orientation()));
1049 int id_terminal = 0;
1050 if (!table_adr_id.isEmpty()) {
1053 foreach (
int id_t, table_adr_id.values()) {
1054 if (id_t > max_id_t) max_id_t = id_t;
1056 id_terminal = max_id_t + 1;
1060 QDomElement xml_terminals = document.createElement(
"terminals");
1064 QDomElement terminal = t ->
toXml(document);
1065 terminal.setAttribute(
"id", id_terminal);
1066 table_adr_id.insert(t, id_terminal ++);
1067 xml_terminals.appendChild(terminal);
1069 element.appendChild(xml_terminals);
1072 QDomElement inputs = document.createElement(
"inputs");
1073 element.appendChild(inputs);
1078 QDomElement links_uuids = document.createElement(
"links_uuids");
1080 QDomElement link_uuid = document.createElement(
"link_uuid");
1081 link_uuid.setAttribute(
"uuid", elmt->
uuid().toString());
1082 links_uuids.appendChild(link_uuid);
1084 element.appendChild(links_uuids);
1089 QDomElement infos = document.createElement(
"elementInformations");
1091 element.appendChild(infos);
1095 QDomElement dyn_text = document.createElement(
"dynamic_texts");
1097 dyn_text.appendChild(deti->toXml(document));
1099 QDomElement texts_group = document.createElement(
"texts_groups");
1104 group->blockAlignmentUpdate(
true);
1108 Qt::Alignment al = group->alignment();
1109 group->setAlignment(Qt::AlignTop);
1112 QList<DynamicElementTextItem *> deti_list = group->texts();
1114 group->removeFromGroup(deti);
1118 dyn_text.appendChild(deti->toXml(document));
1122 group->addToGroup(deti);
1125 group->setAlignment(al);
1128 texts_group.appendChild(group->toXml(document));
1129 group->blockAlignmentUpdate(
false);
1133 element.appendChild(dyn_text);
1135 element.appendChild(texts_group);
1151 deti->setParentItem(
this);
1173 deti->setParentItem(
nullptr);
1180 if(group->texts().contains(deti))
1184 deti->setParentItem(
nullptr);
1220 QString rename =
name;
1224 rename =
name+QString::number(i);
1246 group->setParentItem(
this);
1262 const QList <QGraphicsItem *> items_list = group->childItems();
1264 for(QGraphicsItem *qgi : items_list)
1276 group->setParentItem(
nullptr);
1288 if(group->name() ==
name)
1336 if(group->
texts().contains(text))
1357 QList <QPair <Terminal *, Terminal *> > list;
1363 Terminal *other_terminal = terminal -> alignedWithTerminal();
1365 list << qMakePair(terminal, other_terminal);
1424 if (elmt1->pos().x() == elmt2->pos().x())
1425 return elmt1->y() <= elmt2->pos().y();
1426 return elmt1->pos().x() <= elmt2->pos().x();
1438 t -> drawHelpLine(
true);
1451 t -> drawHelpLine(
false);
1468 setToolTip(
name() );
1496 Q_UNUSED(code_letter)
1555 if (this->
diagram()->freezeNewElements() || this->
diagram()->project()->isFreezeNewElements()) {
void removeTextGroup(ElementTextItemGroup *group)
Element::removeTextGroup Remove the text group from this element, and set the parent of group to 0...
bool attributeIsAnInteger(const QDomElement &, const QString &, int *=nullptr)
Item is currently building from a xml description (element)
QString baseName() const
ElementsLocation::baseName.
QList< QPair< Terminal *, Terminal * > > AlignedFreeTerminals() const
Element::AlignedFreeTerminals.
virtual void linkToElement(Element *)
QList< Conductor * > conductors() const
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
static QString formulaToLabel(QString formula, sequentialNumbers &seqStruct, Diagram *diagram, const Element *elmt=nullptr)
AssignVariables::formulaToLabel Return the with variable assigned (ready to be displayed) ...
Element(const ElementsLocation &location, QGraphicsItem *=nullptr, int *state=nullptr, Element::kind link_type=Element::Simple)
Element::Element.
The DynamicElementTextItem class This class provide a simple text field of element who can be added o...
static void loadSequential(const QDomElement &dom_element, const QString &seq, QStringList *list)
void hoverEnterEvent(QGraphicsSceneHoverEvent *) override
void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override
QetGraphicsItem::mouseMoveEvent handle mouse movement.
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.
void fromXml(const QDomElement &, const QHash< QString, QString > &=QHash< QString, QString >())
static ElementPictureFactory * instance()
instance
QUuid uuid() const
Element::uuid.
QPoint setHotspot(QPoint)
NumerotationContext next()
NumerotationContextCommands::next.
QString name(const QString &=QString()) const
void setAlignment(Qt::Alignment alignement)
ElementTextItemGroup::setAlignement Set the alignement of this group.
Diagram * diagram() const
QetGraphicsItem::diagram return the diagram of this item.
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override
QetGraphicsItem::mouseReleaseEvent handle mouse release click.
static QString xmlTaggName()
autonum::sequentialNumbers & rSequenceStruct()
void drawHighlight(QPainter *, const QStyleOptionGraphicsItem *)
virtual void setHighlighted(bool)
void setUpFormula(bool code_letter=true)
Element::setUpFormula Set up the formula used to create the label of this element.
void fromXml(QDomElement &dom_element)
ElementTextItemGroup::fromXml Import data of this group from xml.
const QPicture m_low_zoom_picture
void removeFromGroup(QGraphicsItem *item)
ElementTextItemGroup::removeFromGroup.
void addToGroup(QGraphicsItem *item)
ElementTextItemGroup::addToGroup.
Terminal * parseTerminal(const QDomElement &dom_element)
QString name() const override
Element::name.
QVariant value(const QString &key) const
QDomElement toXml(QDomDocument &document, const QString &tag_name=QString("sequentialNumbers")) const
sequentialNumbers::toXml export this sequential numbers into a QDomElement.
QList< Element * > fromUuids(QList< QUuid >) const
ElementProvider::fromUuids.
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.
void setSequential(const QString &label, sequentialNumbers &seqStruct, NumerotationContext &context, Diagram *diagram, const QString &hashKey)
setSequential Fill seqStruct
static bool valideXml(QDomElement &)
bool addValue(const QString &, const QVariant &, bool show=true)
ElementTextItemGroup * textGroup(const QString &name) const
DiagramContext m_element_informations
void getPictures(const ElementsLocation &location, QPicture &picture, QPicture &low_picture)
ElementPictureFactory::getPictures Set the picture of the element at location. Note, picture can be null.
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.
static void loadSequential(const QDomElement &dom_element, Element *element)
The PropertiesEditorDialog class Create a dialog to edit some properties of a thing. Only create a instance of this class and call exec, all is done for you in this class. The first argument (a template) must be a subclass of QWidget and provide the 3 methods bellow : QString::title() void::apply() void::reset() You can subclass the interface PropertiesEditorWidget who provide all this methods. This dialog take ownership of the editor, so the editor will be deleted by this dialog.
void setFrame(const bool frame)
virtual QDomElement toXml(QDomDocument &, QHash< Terminal *, int > &) const
QList< Terminal * > terminals() const
Element::terminals.
const QString version
QElectroTech version (as string, used to mark projects and elements XML documents) ...
QET::GraphicsItemState m_state
void textsGroupAboutToBeRemoved(ElementTextItemGroup *group)
QList< QString > keys(KeyOrder=None) const
bool contains(const QString &) const
void textAddedToGroup(DynamicElementTextItem *text, ElementTextItemGroup *group)
QET::GraphicsItemState state() const
QetGraphicsItem::state.
void setVerticalAdjustment(int v)
ElementTextItemGroup::setVerticalAdjustment Set the value of the vertical adjustment to ...
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...
void fromXml(const QDomElement &, const QString &="property")
void setRotation(qreal angle)
QList< ElementTextItemGroup * > m_texts_group
bool parseElement(const QDomElement &dom)
Element::parseElement Parse the element of the xml description of this element.
QString elementAutoNumCurrentFormula() const
QETProject::elementAutoNumCurrentFormula.
void setInfoName(const QString &info_name)
DynamicElementTextItem::setInfoName Set the information name of the parent 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.
QPointF dockConductor() const
bool removeTextFromGroup(DynamicElementTextItem *text, ElementTextItemGroup *group)
Element::removeTextFromGroup Remove the text from the group , en reparent to this element...
void editProperty() override
QList< DynamicElementTextItem * > texts() const
ElementTextItemGroup::texts.
QList< QDomElement > findInDomElement(const QDomElement &, const QString &)
QString elementPrefixForLocation(const ElementsLocation &location)
elementPrefixForLocation
virtual void setElementInformations(DiagramContext dc)
Element::setElementInformations Set new information for this element. If new information is different...
QList< Terminal * > m_terminals
QPixmap pixmap(const ElementsLocation &location)
ElementPictureFactory::pixmap.
ElementTextItemGroup * addTextGroup(const QString &name)
void textRemovedFromGroup(DynamicElementTextItem *text, ElementTextItemGroup *group)
QDomElement xml() const
ElementsLocation::xml.
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...
DiagramPosition convertPosition(const QPointF &)
bool attributeIsAReal(const QDomElement &, const QString &, qreal *=nullptr)
bool exist() const
ElementsLocation::exist.
Element * parentElement() const
ElementTextItemGroup::parentElement.
void toXml(QDomElement &, const QString &="property") const
void elementInfoChange(DiagramContext old_info, DiagramContext new_info)
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 ...
QString elementCurrentAutoNum() const
QETProject::elementCurrentAutoNum.
DiagramContext m_kind_informations
void setTextFrom(DynamicElementTextItem::TextFrom text_from)
DynamicElementTextItem::setTextFrom Set the final text is created from.
void drawSelection(QPainter *, const QStyleOptionGraphicsItem *)
void setPos(const QPointF &pos)
void setPrefix(QString)
Element::setPrefix set Element Prefix.
static bool valideXml(QDomElement &)
void setFont(const QFont &font)
void drawAxes(QPainter *, const QStyleOptionGraphicsItem *)
ElementsLocation m_location
QList< DynamicElementTextItem * > m_dynamic_text_list
static QString xmlTaggName()
bool keyMustShow(const QString &) const
DiagramContext::keyMustShow.
void setHoldToBottomPage(bool hold)
void textAdded(DynamicElementTextItem *deti)
void fromXml(const QDomElement &dom_elmt) override
DynamicElementTextItem::fromXml Import this text from xml.
void textRemoved(DynamicElementTextItem *deti)
void fromXml(const QDomElement &element)
sequentialNumbers::fromXml Import sequential values from a QDomElement
QStringList hundred_folio
Item is loading her properties from a xml description.
QString getPrefix() const
Element::getPrefix get Element Prefix.
void addElementAutoNum(const QString &key, const NumerotationContext &context)
QETProject::addElementAutoNum Add a new element numerotation context. If key already exist...
bool isElement() const
ElementsLocation::isElement.
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override
Element::mouseReleaseEvent.
void freezeLabel(bool freeze)
Element::freezeLabel Freeze this element label.
QHash< QString, NumerotationContext > elementAutoNum() const
QETProject::elementAutoNum.
QETProject * project() const
The ElementPictureFactory class This class is singleton factory, use to create and get the picture us...
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.
void setText(const QString &text)
DynamicElementTextItem::setText Set the text of this text.
QString path() const
ElementsLocation::path.
void setTextWidth(qreal width)
void drawHelpLine(bool draw=true)
Terminal::drawHelpLine.
QList< ElementTextItemGroup * > textGroups() const
Element::textGroups.
Orientation
Orientation (used for electrical elements and their terminals)