summaryrefslogtreecommitdiff
path: root/editor/toolbox.cc
diff options
context:
space:
mode:
authordeva <deva>2008-07-11 12:54:42 +0000
committerdeva <deva>2008-07-11 12:54:42 +0000
commit5a19d9218a5f3ed7d02b7fabd8f025922e9f7a13 (patch)
tree49ee6645bf55e620db824d0c95508a65d4d596e7 /editor/toolbox.cc
parent12bd3e7ff088b097bf4e280161aee646fbbb50dc (diff)
Now we have a nice little editor.
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();
+ }
}