mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-01-02 01:40:52 +01:00
Add a new property to automatically detect HTML markup and display rich text in a text field .
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@2066 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -51,7 +51,7 @@ IndependentTextItem::~IndependentTextItem() {
|
||||
*/
|
||||
void IndependentTextItem::fromXml(const QDomElement &e) {
|
||||
setPos(e.attribute("x").toDouble(), e.attribute("y").toDouble());
|
||||
setPlainText(e.attribute("text"));
|
||||
setHtml(e.attribute("text"));
|
||||
setRotationAngle(e.attribute("rotation").toDouble());
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ QDomElement IndependentTextItem::toXml(QDomDocument &document) const {
|
||||
QDomElement result = document.createElement("input");
|
||||
result.setAttribute("x", QString("%1").arg(pos().x()));
|
||||
result.setAttribute("y", QString("%1").arg(pos().y()));
|
||||
result.setAttribute("text", toPlainText());
|
||||
result.setAttribute("text", toHtml());
|
||||
if (rotationAngle()) {
|
||||
result.setAttribute("rotation", QString("%1").arg(rotationAngle()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user