aboutsummaryrefslogtreecommitdiff
path: root/tools/ArtistTools/source/BlastPlugin/Window/FractureGeneralPanel.h
blob: 1ab9f242aa19a78dfd9731d17000ec8d4655c84e (plain) (blame)
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#ifndef FRACTUREGENERALPANEL_H
#define FRACTUREGENERALPANEL_H

#include <QtWidgets/QWidget>
#include "ProjectParams.h"

namespace Ui {
class FractureGeneralPanel;
}

class FractureVoronoiSettingsPanel;
class FractureSliceSettingsPanel;
class FractureVisualizersPanel;
class ExpandablePanel;

class FractureGeneralPanel : public QWidget
{
    Q_OBJECT

public:
	static FractureGeneralPanel* ins();

    explicit FractureGeneralPanel(QWidget *parent = 0);
    ~FractureGeneralPanel();
	void updateValues();
	void setFracturePanels(FractureVoronoiSettingsPanel* voronoiPanel, FractureSliceSettingsPanel* slicePanel, FractureVisualizersPanel* visulizersPanel);
	void setFractureExpandablePanels(ExpandablePanel* voronoiPanel, ExpandablePanel* slicePanel);

	FracturePreset* getCurrentFracturePreset();

private slots:
    void on_comboBoxFracturePreset_currentIndexChanged(int index);

	void on_btnAddPreset_clicked();

	void on_btnModifyPreset_clicked();

	void on_btnSavePreset_clicked();

    void on_comboBoxFractureType_currentIndexChanged(int index);

    void on_comboBoxApplyMaterial_currentIndexChanged(int index);
	
	void on_checkBoxAutoSelectNewChunks_stateChanged(int arg1);

private:
	FracturePreset* _getFracturePreset(const char* name);
	void _updateFractureUIs();
	void _showFracturePanel(const QString& fractireType);

private:
    Ui::FractureGeneralPanel		*ui;
	bool							m_bValid;
	bool							_updateData;
	FractureVoronoiSettingsPanel*	_voronoiPanel;
	FractureSliceSettingsPanel*		_slicePanel;
	FractureVisualizersPanel*		_visualizersPanel;
	ExpandablePanel*				_fractureVoronoiSettingsExpandlePanel;
	ExpandablePanel*				_fractureSliceSettingsExpandlePanel;
};

#endif // FRACTUREGENERALPANEL_H