summaryrefslogtreecommitdiff
path: root/editor/toolbox.cc
diff options
context:
space:
mode:
Diffstat (limited to 'editor/toolbox.cc')
-rw-r--r--editor/toolbox.cc29
1 files changed, 10 insertions, 19 deletions
diff --git a/editor/toolbox.cc b/editor/toolbox.cc
index 9e75e66..57c2ad1 100644
--- a/editor/toolbox.cc
+++ b/editor/toolbox.cc
@@ -29,27 +29,18 @@
#include <QVBoxLayout>
#include "tool.h"
-Toolbox::Toolbox()
+Toolbox::Toolbox(QDomNode &node)
: QDialog()
{
setLayout(new QVBoxLayout());
- QPixmap pixmap("drag.png");
-
- Tool *tool1 = new Tool(pixmap, "Tool1");
- layout()->addWidget(tool1);
-
- Tool *tool2 = new Tool(pixmap, "Tool2");
- layout()->addWidget(tool2);
-
- Tool *tool3 = new Tool(pixmap, "Tool3");
- layout()->addWidget(tool3);
-
- Tool *tool4 = new Tool(pixmap, "vertical");
- layout()->addWidget(tool4);
-
- Tool *tool5 = new Tool(pixmap, "horizontal");
- layout()->addWidget(tool5);
-
- show();
+ QDomNode n = node.firstChild();
+ while(!n.isNull()) {
+ QDomElement e = n.toElement();
+ if(!e.isNull()) {
+ Tool *tool = new Tool(e);
+ layout()->addWidget(tool);
+ }
+ n = n.nextSibling();
+ }
}