summaryrefslogtreecommitdiff
path: root/lsmaterialeditor.h
blob: ba1876249a73c19bcb4b3b9015db00d452877d5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef LSMATERIALEDITOR_H
#define LSMATERIALEDITOR_H

#include <QWidget>
#include <QGridLayout>
#include <QLabel>
#include <QLineEdit>
#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