]> Shamusworld >> Repos - architektonas/blob - src/layerwidget.cpp
Initial addition of Layer and Block widgets.
[architektonas] / src / layerwidget.cpp
1 // layerwidget.cpp: Layer add/remove/use widget
2 //
3 // Part of the Architektonas Project
4 // (C) 2011 Underground Software
5 // See the README and GPLv3 files for licensing and warranty information
6 //
7 // JLH = James Hammons <jlhamm@acm.org>
8 //
9 // WHO  WHEN        WHAT
10 // ---  ----------  ------------------------------------------------------------
11 // JLH  07/11/2013  Created this file
12 //
13
14 #include "layerwidget.h"
15
16
17 #if 0
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
21 main widget.
22 #endif
23
24 LayerWidget::LayerWidget(void): QWidget()
25 {
26
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).
31
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);
35
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);
47 }
48
49
50 LayerWidget::~LayerWidget()
51 {
52 }
53