Dynamic element text item : Add a new option "width" for define the width of the text.

If the text is wider than the defined width, the text is broken into multiple line.


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5220 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2018-01-26 18:49:38 +00:00
parent 3e48da73b0
commit 31fcec10ff
6 changed files with 96 additions and 14 deletions

View File

@@ -665,6 +665,7 @@ bool Element::fromXml(QDomElement &e, QHash<int, Terminal *> &table_id_adr, bool
comment_text->setInfoName("comment");
comment_text->setFontSize(6);
comment_text->setFrame(true);
comment_text->setTextWidth(70);
comment_text->setPos(deti->x(), deti->y()+10); //+10 is arbitrary, comment_text must be below deti
addDynamicTextItem(comment_text);
}
@@ -676,6 +677,7 @@ bool Element::fromXml(QDomElement &e, QHash<int, Terminal *> &table_id_adr, bool
location_text->setTextFrom(DynamicElementTextItem::ElementInfo);
location_text->setInfoName("location");
location_text->setFontSize(6);
location_text->setTextWidth(70);
location_text->setPos(deti->x(), deti->y()+20); //+20 is arbitrary, location_text must be below deti and comment
addDynamicTextItem(location_text);
}