summaryrefslogtreecommitdiff
path: root/lsmaterialeditor.cpp
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2012-09-06 00:31:19 +0200
committerTreeki <treeki@gmail.com>2012-09-06 00:31:19 +0200
commit2e52bea24a65cf70380c4e13c2f9f1238f023e91 (patch)
tree771d4c0b74db52ebecde1af722714905a072b149 /lsmaterialeditor.cpp
parentf928869357765e3a73501064408bb7bc0ee363ef (diff)
downloadLayoutStudio-2e52bea24a65cf70380c4e13c2f9f1238f023e91.tar.gz
LayoutStudio-2e52bea24a65cf70380c4e13c2f9f1238f023e91.zip
some black magic involving templates which doesn't even work, pushing so I can work on it at home
Diffstat (limited to 'lsmaterialeditor.cpp')
-rw-r--r--lsmaterialeditor.cpp23
1 files changed, 19 insertions, 4 deletions
diff --git a/lsmaterialeditor.cpp b/lsmaterialeditor.cpp
index f1c5736..5ff2825 100644
--- a/lsmaterialeditor.cpp
+++ b/lsmaterialeditor.cpp
@@ -5,11 +5,13 @@ LSMaterialEditor::LSMaterialEditor(QWidget *parent) :
QWidget(parent) {
QGridLayout *grid = new QGridLayout(this);
+ int gridRow = 0;
m_nameEntry = new QLineEdit(this);
- grid->addWidget(new QLabel("Name:", this), 0, 0, 1, 1);
- grid->addWidget(m_nameEntry, 0, 1, 1, 1);
+ grid->addWidget(new QLabel("Name:", this), gridRow, 0, 1, 1);
+ grid->addWidget(m_nameEntry, gridRow, 1, 1, 1);
+ gridRow++;
// TEV colour box
QGroupBox *tevCBox = new QGroupBox("TEV Colours", this);
@@ -24,10 +26,21 @@ LSMaterialEditor::LSMaterialEditor(QWidget *parent) :
tevCLayout->addWidget(m_colourPickers[i], isKonst?3:1, isKonst?(i-3):i, 1, 1);
}
- grid->addWidget(tevCBox, 1, 0, 1, 2);
+ grid->addWidget(tevCBox, gridRow, 0, 1, 2);
+ gridRow++;
+ // TEV stages
+ QGroupBox *stageBox = new QGroupBox("TEV Stages", this);
+ QVBoxLayout *stageLayout = new QVBoxLayout(stageBox);
- grid->setRowStretch(2, 1);
+ m_tevStageSetEditor = new LSSetEditor<LYTTevStage, LSTevStageEditor>(8, stageBox);
+ stageLayout->addWidget(m_tevStageSetEditor);
+
+ grid->addWidget(stageBox, gridRow, 0, 1, 2);
+ gridRow++;
+
+ // finish it all up
+ grid->setRowStretch(gridRow, 1);
m_currentlyLoadingMaterial = false;
@@ -45,6 +58,8 @@ void LSMaterialEditor::setMaterial(LYTMaterial *mat) {
for (int i = 0; i < 4; i++)
m_colourPickers[i+3]->setColor(mat->tevKColour[i]);
+ m_tevStageSetEditor->setData(&mat->tevStages);
+
m_currentlyLoadingMaterial = false;
}