diff options
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()); +} |