summaryrefslogtreecommitdiff
path: root/client/widgets/label.cc
diff options
context:
space:
mode:
Diffstat (limited to 'client/widgets/label.cc')
-rw-r--r--client/widgets/label.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/client/widgets/label.cc b/client/widgets/label.cc
index 377fd10..b30d1cb 100644
--- a/client/widgets/label.cc
+++ b/client/widgets/label.cc
@@ -27,15 +27,16 @@
#include "label.h"
#include <stdio.h>
-Label::Label(QWidget *parent, QString text, QString align) : QLabel(parent)
+Label::Label(QDomNode node) : QLabel(NULL)
{
- setText(text);
+ QDomElement elem = node.toElement();
+ setText(elem.attribute("caption"));
- if(align == "left") {
+ if(elem.attribute("align") == "left") {
setAlignment(Qt::AlignLeft);
- } else if (align == "center") {
+ } else if (elem.attribute("align") == "center") {
setAlignment(Qt::AlignHCenter);
- } else if (align == "right") {
+ } else if (elem.attribute("align") == "right") {
setAlignment(Qt::AlignRight);
}
}