summaryrefslogtreecommitdiff
path: root/lsmaterialeditor.h
blob: 95c21f4eb7fa9894b8971393993fb8b2a9cc2e05 (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
39
40
41
42
43
44
45
46
47
48
#ifndef LSMATERIALEDITOR_H
#define LSMATERIALEDITOR_H

#include <QWidget>
#include <QGridLayout>
#include <QLabel>
#include <QLineEdit>
#include "lyt/materials/materialcontainer.h"
#include "lscolorpicker.h"
#include "lsseteditor.h"

class LSTexMapEditor;
class LSTexSRTEditor;
class LSTexCoordGenEditor;
class LSIndTexSRTEditor;
class LSIndTexStageEditor;
class LSTevStageEditor;

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;

	LSSetEditor<LYTTevStage, LSTevStageEditor> *m_tevStageSetEditor;

private slots:
	void handleNameChanged(QString value);
	void handleSaveChangedName();

	void handleColourPicked(QColor value);

signals:
	void mustRedrawLayout();

public slots:
	void setMaterial(LYTMaterial *mat);

};

#endif // LSMATERIALEDITOR_H