summaryrefslogtreecommitdiffstats
path: root/src/tools/uic/ui4.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/uic/ui4.cpp')
-rw-r--r--src/tools/uic/ui4.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/tools/uic/ui4.cpp b/src/tools/uic/ui4.cpp
index 1988696..e094eaf 100644
--- a/src/tools/uic/ui4.cpp
+++ b/src/tools/uic/ui4.cpp
@@ -3673,6 +3673,7 @@ void DomLayoutItem::clear(bool clear_all)
m_attr_rowSpan = 0;
m_has_attr_colSpan = false;
m_attr_colSpan = 0;
+ m_has_attr_alignment = false;
}
m_kind = Unknown;
@@ -3694,6 +3695,7 @@ DomLayoutItem::DomLayoutItem()
m_attr_rowSpan = 0;
m_has_attr_colSpan = false;
m_attr_colSpan = 0;
+ m_has_attr_alignment = false;
m_widget = 0;
m_layout = 0;
m_spacer = 0;
@@ -3727,6 +3729,10 @@ void DomLayoutItem::read(QXmlStreamReader &reader)
setAttributeColSpan(attribute.value().toString().toInt());
continue;
}
+ if (name == QLatin1String("alignment")) {
+ setAttributeAlignment(attribute.value().toString());
+ continue;
+ }
reader.raiseError(QLatin1String("Unexpected attribute ") + name.toString());
}
@@ -3779,6 +3785,8 @@ void DomLayoutItem::read(const QDomElement &node)
setAttributeRowSpan(node.attribute(QLatin1String("rowspan")).toInt());
if (node.hasAttribute(QLatin1String("colspan")))
setAttributeColSpan(node.attribute(QLatin1String("colspan")).toInt());
+ if (node.hasAttribute(QLatin1String("alignment")))
+ setAttributeAlignment(node.attribute(QLatin1String("alignment")));
for (QDomNode n = node.firstChild(); !n.isNull(); n = n.nextSibling()) {
if (!n.isElement())
@@ -3828,6 +3836,9 @@ void DomLayoutItem::write(QXmlStreamWriter &writer, const QString &tagName) cons
if (hasAttributeColSpan())
writer.writeAttribute(QLatin1String("colspan"), QString::number(attributeColSpan()));
+ if (hasAttributeAlignment())
+ writer.writeAttribute(QLatin1String("alignment"), attributeAlignment());
+
switch (kind()) {
case Widget: {
DomWidget* v = elementWidget();