]> Shamusworld >> Repos - architektonas/blobdiff - src/blockwidget.cpp
Initial work on BlockWidget.
[architektonas] / src / blockwidget.cpp
index 3e1e4d88a399670190469b1efe9c82f6d7a4dec0..cd08070570717f6b8542f55eb2ced6ffdcbd1c25 100644 (file)
@@ -8,7 +8,61 @@
 //
 // 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);
+
+       QPushButton * pb1 = new QPushButton("+");
+       QPushButton * pb2 = new QPushButton("-");
+       QPushButton * pb3 = new QPushButton("Edit");
+       QPushButton * pb4 = new QPushButton("Import");
+//     QPushButton * pb5 = new QPushButton("v");
+
+       QHBoxLayout * hbox1 = new QHBoxLayout;
+       hbox1->addWidget(pb1);
+       hbox1->addWidget(pb2);
+       hbox1->addWidget(pb3);
+       hbox1->addWidget(pb4);
+//     hbox1->addWidget(pb5);
+       hbox1->addStretch();
+
+       QVBoxLayout * mainLayout = new QVBoxLayout;
+       mainLayout->addWidget(qlw);
+       mainLayout->addLayout(hbox1);
+
+       setLayout(mainLayout);
+}
+
+
+BlockWidget::~BlockWidget()
+{
+}
+