]> Shamusworld >> Repos - architektonas/blobdiff - src/layerwidget.cpp
Initial addition of Layer and Block widgets.
[architektonas] / src / layerwidget.cpp
index 227225374b30f0e24cb31af833009be4af9293a4..ba907917acc627fef20f1199c8c25932c75345d6 100644 (file)
 //
 
 #include "layerwidget.h"
+
+
+#if 0
+OK, what it seems like we should do here, is instead of deriving from QDockWidget,
+we should derive from QWidget (or QScrollArea or somesuch). Then, when creating
+the dockwidget in the main window, we add the LayerWidget as the QDockWidget's
+main widget.
+#endif
+
+LayerWidget::LayerWidget(void): QWidget()
+{
+
+       // Make a QScrollArea, put in a QVBoxLayout.
+       // Use line widget (two checkboxes, one label), use setIcon() on the
+       // checkboxes to change their look (eye open/closed for visibility,
+       // lock open/closed for layer lock).
+
+       QIcon visibleChecked(":/res/eye-open.png");
+//     QIcon visibleUnchecked(":/res/eye-closed.png");
+       visibleChecked.addFile(":/res/eye-closed.png", QSize(16, 16), QIcon::Normal, QIcon::On);
+
+       QVBoxLayout * mainLayout = new QVBoxLayout;
+       QCheckBox * box1 = new QCheckBox("bleah");
+       box1->setIcon(visibleChecked);
+       mainLayout->addWidget(box1);
+       QPushButton * button1 = new QPushButton;//(visibleChecked);
+       button1->setFlat(true);
+       button1->setIcon(visibleChecked);
+       button1->setCheckable(true);
+       mainLayout->addWidget(button1);
+//printf("LayerWidget: About to set layout...\n");
+       setLayout(mainLayout);
+}
+
+
+LayerWidget::~LayerWidget()
+{
+}
+