//
// WHO WHEN WHAT
// --- ---------- ------------------------------------------------------------
-// JLH 07/11/2013 Created this file
+// JLH 07/15/2013 Created this file
//
#include "blockwidget.h"
+#include "blockitemwidget.h"
+
+
+BlockWidget::BlockWidget(void): QWidget()
+{
+ BlockItemWidget * biw1 = new BlockItemWidget("2x4");
+ BlockItemWidget * biw2 = new BlockItemWidget("2x6");
+ BlockItemWidget * biw3 = new BlockItemWidget("36\" door RHS");
+ BlockItemWidget * biw4 = new BlockItemWidget("36\" door LHS");
+ BlockItemWidget * biw5 = new BlockItemWidget("Person");
+
+ QListWidget * qlw = new QListWidget;
+ QListWidgetItem * qli1 = new QListWidgetItem(qlw);
+ QListWidgetItem * qli2 = new QListWidgetItem(qlw);
+ QListWidgetItem * qli3 = new QListWidgetItem(qlw);
+ QListWidgetItem * qli4 = new QListWidgetItem(qlw);
+ QListWidgetItem * qli5 = new QListWidgetItem(qlw);
+ qli1->setSizeHint(biw1->sizeHint());
+ qli2->setSizeHint(biw2->sizeHint());
+ qli3->setSizeHint(biw3->sizeHint());
+ qli4->setSizeHint(biw4->sizeHint());
+ qli5->setSizeHint(biw5->sizeHint());
+ qlw->setItemWidget(qli1, biw1);
+ qlw->setItemWidget(qli2, biw2);
+ qlw->setItemWidget(qli3, biw3);
+ qlw->setItemWidget(qli4, biw4);
+ qlw->setItemWidget(qli5, biw5);
+
+#if 0
+ QPushButton * pb1 = new QPushButton("+");
+ QPushButton * pb2 = new QPushButton("-");
+ QPushButton * pb3 = new QPushButton("Edit");
+ QPushButton * pb4 = new QPushButton("Import");
+#else
+ QToolButton * pb1 = new QToolButton;
+ QToolButton * pb2 = new QToolButton;
+ QToolButton * pb3 = new QToolButton;
+ QToolButton * pb4 = new QToolButton;
+
+ pb1->setIcon(QIcon(":/res/layer-add.png"));
+ pb2->setIcon(QIcon(":/res/layer-delete.png"));
+ pb3->setIcon(QIcon(":/res/layer-edit.png"));
+ pb4->setIcon(QIcon(":/res/block-import.png"));
+
+ pb1->setToolTip(tr("Add block"));
+ pb2->setToolTip(tr("Remove block"));
+ pb3->setToolTip(tr("Edit block"));
+ pb4->setToolTip(tr("Import block"));
+#endif
+
+ QHBoxLayout * hbox1 = new QHBoxLayout;
+ hbox1->addWidget(pb1);
+ hbox1->addWidget(pb2);
+ hbox1->addWidget(pb3);
+ hbox1->addWidget(pb4);
+ hbox1->addStretch();
+
+ QVBoxLayout * mainLayout = new QVBoxLayout;
+ mainLayout->addWidget(qlw);
+ mainLayout->addLayout(hbox1);
+
+ setLayout(mainLayout);
+}
+
+
+BlockWidget::~BlockWidget()
+{
+}
+