diff options
author | Treeki <treeki@gmail.com> | 2012-09-04 16:25:47 +0200 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2012-09-04 16:25:47 +0200 |
commit | 07e0eeb5ad9f81a62032aa37c0cfef84a9f6ed5c (patch) | |
tree | f0d7d2558b552a8d25f1a78202979fc70629b5f4 /lslayoutwindow.cpp | |
parent | 01654a40da349d461b1bc09e7a0cd248cd98e1d5 (diff) | |
download | LayoutStudio-07e0eeb5ad9f81a62032aa37c0cfef84a9f6ed5c.tar.gz LayoutStudio-07e0eeb5ad9f81a62032aa37c0cfef84a9f6ed5c.zip |
the complete beginnings of a material editor, pushing so I can work from my netbook ..
Diffstat (limited to '')
-rw-r--r-- | lslayoutwindow.cpp | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/lslayoutwindow.cpp b/lslayoutwindow.cpp index 867b6c8..38e0417 100644 --- a/lslayoutwindow.cpp +++ b/lslayoutwindow.cpp @@ -1,6 +1,7 @@ #include "lslayoutwindow.h" #include "lsscenemodel.h" #include "lspaneeditor.h" +#include "lsmaterialeditor.h" #include "layoutgl/widget.h" #include <QGridLayout> #include <QFormLayout> @@ -39,11 +40,9 @@ LSLayoutWindow::LSLayoutWindow(LYTPackageBase *pkg, const QString &layoutName, Q connect(m_heightBox, SIGNAL(valueChanged(double)), SLOT(handleHeightChanged(double))); - QGroupBox *matGroup = new QGroupBox("Materials", this); QGroupBox *grpGroup = new QGroupBox("Groups", this); - sgrid->addWidget(matGroup, 1, 0, 1, 1); - sgrid->addWidget(grpGroup, 1, 1, 1, 1); + sgrid->addWidget(grpGroup, 1, 0, 1, 2); sgrid->setRowStretch(1, 1); m_tabWidget->addTab(w, "Layout"); @@ -85,6 +84,29 @@ LSLayoutWindow::LSLayoutWindow(LYTPackageBase *pkg, const QString &layoutName, Q m_tabWidget->addTab(m_sceneSplitter, "Scene Graph"); + // prepare the materials tab + m_materialSplitter = new QSplitter(this); + + w = new QWidget(this); + QGridLayout *mgrid = new QGridLayout(w); + + m_addMaterialButton = new QPushButton("Add", w); + m_removeMaterialButton = new QPushButton("Remove", w); + m_materialList = new QListView(w); + + mgrid->addWidget(m_materialList, 0, 0, 1, 2); + mgrid->addWidget(m_addMaterialButton, 1, 0, 1, 1); + mgrid->addWidget(m_removeMaterialButton, 1, 1, 1, 1); + + m_materialEditor = new LSMaterialEditor(m_materialSplitter); + + m_materialSplitter->addWidget(w); + m_materialSplitter->addWidget(m_materialEditor); + m_materialSplitter->setCollapsible(1, false); + + m_tabWidget->addTab(m_materialSplitter, "Materials"); + + // get the resource m_layout = new LYTLayout(*m_package, m_layoutName); @@ -138,6 +160,10 @@ void LSLayoutWindow::selectedPaneChanged(const QModelIndex ¤t, const QMode m_paneEditorSwitcher->setCurrentIndex(1); } +void LSLayoutWindow::selectedMaterialChanged(const QModelIndex ¤t, const QModelIndex &previous) { + +} + void LSLayoutWindow::handleWidthChanged(double v) { m_layout->width = v; |