1 // layerwidget.cpp: Layer add/remove/use widget
3 // Part of the Architektonas Project
4 // (C) 2011 Underground Software
5 // See the README and GPLv3 files for licensing and warranty information
7 // JLH = James Hammons <jlhamm@acm.org>
10 // --- ---------- ------------------------------------------------------------
11 // JLH 07/11/2013 Created this file
14 #include "layerwidget.h"
18 OK, what it seems like we should do here, is instead of deriving from QDockWidget,
19 we should derive from QWidget (or QScrollArea or somesuch). Then, when creating
20 the dockwidget in the main window, we add the LayerWidget as the QDockWidget's
24 LayerWidget::LayerWidget(void): QWidget()
27 // Make a QScrollArea, put in a QVBoxLayout.
28 // Use line widget (two checkboxes, one label), use setIcon() on the
29 // checkboxes to change their look (eye open/closed for visibility,
30 // lock open/closed for layer lock).
32 QIcon visibleChecked(":/res/eye-open.png");
33 // QIcon visibleUnchecked(":/res/eye-closed.png");
34 visibleChecked.addFile(":/res/eye-closed.png", QSize(16, 16), QIcon::Normal, QIcon::On);
36 QVBoxLayout * mainLayout = new QVBoxLayout;
37 QCheckBox * box1 = new QCheckBox("bleah");
38 box1->setIcon(visibleChecked);
39 mainLayout->addWidget(box1);
40 QPushButton * button1 = new QPushButton;//(visibleChecked);
41 button1->setFlat(true);
42 button1->setIcon(visibleChecked);
43 button1->setCheckable(true);
44 mainLayout->addWidget(button1);
45 //printf("LayerWidget: About to set layout...\n");
46 setLayout(mainLayout);
50 LayerWidget::~LayerWidget()