From b6f36ab434acbf89f0af6ecbea990fbd75035be6 Mon Sep 17 00:00:00 2001 From: Treeki Date: Wed, 5 Sep 2012 00:41:39 +0200 Subject: really should have got more done than this here :| oh well --- lsmaterialeditor.cpp | 25 +++++++++++++++++++++++++ lsmaterialeditor.h | 27 ++++++++++++++++++++++++--- 2 files changed, 49 insertions(+), 3 deletions(-) diff --git a/lsmaterialeditor.cpp b/lsmaterialeditor.cpp index 1b32635..20f36f5 100644 --- a/lsmaterialeditor.cpp +++ b/lsmaterialeditor.cpp @@ -3,4 +3,29 @@ LSMaterialEditor::LSMaterialEditor(QWidget *parent) : QWidget(parent) { + QGridLayout *grid = new QGridLayout(this); + + m_nameEntry = new QLineEdit(this); + + grid->addWidget(new QLabel("Name:", this), 0, 0, 1, 1); + grid->addWidget(m_nameEntry, 0, 1, 1, 1); + + m_currentlyLoadingMaterial = false; + m_material = 0; +} + +void LSMaterialEditor::setMaterial(LYTMaterial *mat) { + m_currentlyLoadingMaterial = true; + m_material = mat; + + m_currentlyLoadingMaterial = false; +} + + +void LSMaterialEditor::handleNameChanged(QString value) { + +} + +void LSMaterialEditor::handleSaveChangedName() { + } diff --git a/lsmaterialeditor.h b/lsmaterialeditor.h index e594acc..ba18762 100644 --- a/lsmaterialeditor.h +++ b/lsmaterialeditor.h @@ -2,16 +2,37 @@ #define LSMATERIALEDITOR_H #include +#include +#include +#include +#include "lyt/materials/materialcontainer.h" +#include "lscolorpicker.h" class LSMaterialEditor : public QWidget { Q_OBJECT public: explicit LSMaterialEditor(QWidget *parent = 0); - + +private: + QLineEdit *m_nameEntry; + + LSColorPicker *m_colourPickers[7]; + + bool m_currentlyLoadingMaterial; + LYTMaterial *m_material; + +private slots: + void handleNameChanged(QString value); + void handleSaveChangedName(); + + void handleColourPicked(QColor value); + signals: - + void mustRedrawLayout(); + public slots: - + void setMaterial(LYTMaterial *mat); + }; #endif // LSMATERIALEDITOR_H -- cgit v1.2.3