diff options
author | deva <deva> | 2008-07-14 09:32:45 +0000 |
---|---|---|
committer | deva <deva> | 2008-07-14 09:32:45 +0000 |
commit | 48f92d13fa3a42007a068baf1d63f418b22a2b3e (patch) | |
tree | d5a2f314b6da4162e5a45afcf5473529152da288 /editor/toolbox.cc | |
parent | 0ca2a008e3d6f2578246326ba4180cf21d8064ca (diff) |
Made the setValue actually set the values in the GUI. Fixed resize problem when labels got text filled into them. Added a simple toXml method to dunp xml from the contructed gui to stdout.
Diffstat (limited to 'editor/toolbox.cc')
-rw-r--r-- | editor/toolbox.cc | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/editor/toolbox.cc b/editor/toolbox.cc index 57c2ad1..e1983f1 100644 --- a/editor/toolbox.cc +++ b/editor/toolbox.cc @@ -28,12 +28,21 @@ #include <QVBoxLayout> #include "tool.h" +#include "widget.h" +#include <QPushButton> -Toolbox::Toolbox(QDomNode &node) +Toolbox::Toolbox(QDomNode &node, MacroWindow *macrowindow) : QDialog() { setLayout(new QVBoxLayout()); + this->macrowindow = macrowindow; + + QPushButton *btn_toxml = new QPushButton("save"); + connect(btn_toxml, SIGNAL(clicked()), this, SLOT(toXml())); + + layout()->addWidget(btn_toxml); + QDomNode n = node.firstChild(); while(!n.isNull()) { QDomElement e = n.toElement(); @@ -44,3 +53,9 @@ Toolbox::Toolbox(QDomNode &node) n = n.nextSibling(); } } + +void Toolbox::toXml() +{ + Widget *w = macrowindow; + printf("XML:\n%s\n", w->toXml("").toStdString().c_str()); +} |