1 #include <QVBoxLayout> |
1 #include <QVBoxLayout> |
2 #include <QFormLayout> |
2 #include <QFormLayout> |
3 #include <QPushButton> |
3 #include <QPushButton> |
4 #include <QLabel> |
4 #include <QLabel> |
5 #include <QSpinBox> |
5 #include <QSpinBox> |
|
6 #include <QSplitter> |
6 #include "objecteditor.h" |
7 #include "objecteditor.h" |
7 #include "document.h" |
8 #include "document.h" |
8 #include "modeleditor.h" |
9 #include "modeleditor.h" |
9 #include "widgets/colorbutton.h" |
10 #include "widgets/colorbutton.h" |
10 #include "widgets/colorindexinput.h" |
11 #include "widgets/colorindexinput.h" |
|
12 #include "widgets/vec3editor.h" |
11 |
13 |
12 template<ldraw::Property property> |
14 template<ldraw::Property property> |
13 static void makeColorEditor() |
15 static void makeColorEditor() |
14 { |
16 { |
15 QString propertyName = ldraw::PropertyTraits<property>::name; |
17 QString propertyName = ldraw::PropertyTraits<property>::name; |
26 QWidget* objectTitleLayoutContainer = new QWidget{this}; |
28 QWidget* objectTitleLayoutContainer = new QWidget{this}; |
27 QLayout* objectTitleLayout = new QHBoxLayout{objectTitleLayoutContainer}; |
29 QLayout* objectTitleLayout = new QHBoxLayout{objectTitleLayoutContainer}; |
28 objectTitleLayoutContainer->setLayout(objectTitleLayout); |
30 objectTitleLayoutContainer->setLayout(objectTitleLayout); |
29 objectTitleLayout->addWidget(this->objectTypeIconLabel); |
31 objectTitleLayout->addWidget(this->objectTypeIconLabel); |
30 objectTitleLayout->addWidget(this->objectTypeNameLabel); |
32 objectTitleLayout->addWidget(this->objectTypeNameLabel); |
31 objectTitleLayout->addWidget(new QSplitter{Qt::Horizontal, this}); |
|
32 this->layout()->addWidget(objectTitleLayoutContainer); |
33 this->layout()->addWidget(objectTitleLayoutContainer); |
33 this->layout()->addWidget(formContainer); |
34 this->layout()->addWidget(formContainer); |
34 this->setObjectId(id); |
35 this->setObjectId(id); |
35 |
36 |
36 QWidget* const parent = this->formContainer; |
37 QWidget* const parent = this->formContainer; |