surface_render_dockTab.h 1.33 KB
Newer Older
Pierre Kraemer's avatar
Pierre Kraemer committed
1 2 3 4 5
#ifndef _SURFACE_RENDER_DOCK_TAB_H_
#define _SURFACE_RENDER_DOCK_TAB_H_

#include "ui_surface_render.h"
#include "Utils/vbo.h"
6
#include <QColorDialog>
Pierre Kraemer's avatar
Pierre Kraemer committed
7 8 9 10 11 12 13 14

namespace CGoGN
{

namespace SCHNApps
{

class SCHNApps;
Pierre Kraemer's avatar
Pierre Kraemer committed
15
class Surface_Render_Plugin;
Pierre Kraemer's avatar
Pierre Kraemer committed
16 17
struct MapParameters;

Pierre Kraemer's avatar
Pierre Kraemer committed
18
class Surface_Render_DockTab : public QWidget, public Ui::Surface_Render_TabWidget
Pierre Kraemer's avatar
Pierre Kraemer committed
19 20 21
{
	Q_OBJECT

Pierre Kraemer's avatar
Pierre Kraemer committed
22
	friend class Surface_Render_Plugin;
Pierre Kraemer's avatar
Pierre Kraemer committed
23 24

public:
Pierre Kraemer's avatar
Pierre Kraemer committed
25
	Surface_Render_DockTab(SCHNApps* s, Surface_Render_Plugin* p);
Pierre Kraemer's avatar
Pierre Kraemer committed
26 27 28

private:
	SCHNApps* m_schnapps;
Pierre Kraemer's avatar
Pierre Kraemer committed
29
	Surface_Render_Plugin* m_plugin;
Pierre Kraemer's avatar
Pierre Kraemer committed
30
	bool b_updatingUI;
31 32 33 34 35
	QColorDialog* m_colorDial;
	QColor m_diffuseColor;
	QColor m_simpleColor;
	QColor m_vertexColor;
	int m_currentColorDial;
Pierre Kraemer's avatar
Pierre Kraemer committed
36 37 38 39 40 41 42 43 44

private slots:
	void positionVBOChanged(int index);
	void normalVBOChanged(int index);
	void renderVerticesChanged(bool b);
	void verticesScaleFactorChanged(int i);
	void renderEdgesChanged(bool b);
	void renderFacesChanged(bool b);
	void faceStyleChanged(QAbstractButton* b);
45
	void renderBoundaryChanged(bool b);
Pierre Kraemer's avatar
Pierre Kraemer committed
46

47 48 49 50 51 52 53
	void diffuseColorClicked();
	void simpleColorClicked();
	void vertexColorClicked();
	void colorSelected(const QColor& col);



Pierre Kraemer's avatar
Pierre Kraemer committed
54 55 56 57 58 59 60 61 62 63 64 65 66 67
private:
	void addPositionVBO(QString name);
	void removePositionVBO(QString name);
	void addNormalVBO(QString name);
	void removeNormalVBO(QString name);

	void updateMapParameters();
};

} // namespace SCHNApps

} // namespace CGoGN

#endif