surface_import.h 1.16 KB
Newer Older
1 2
#ifndef _SURFACE_IMPORT_PLUGIN_H_
#define _SURFACE_IMPORT_PLUGIN_H_
Pierre Kraemer's avatar
Pierre Kraemer committed
3 4 5 6 7 8 9 10 11

#include "plugin_processing.h"

namespace CGoGN
{

namespace SCHNApps
{

12
class Surface_Import_Plugin : public PluginProcessing
Pierre Kraemer's avatar
Pierre Kraemer committed
13 14 15
{
	Q_OBJECT
	Q_INTERFACES(CGoGN::SCHNApps::Plugin)
Sylvain Thery's avatar
Sylvain Thery committed
16 17 18
#if CGOGN_QT_DESIRED_VERSION == 5
	Q_PLUGIN_METADATA(IID "CGoGN.SCHNapps.Plugin")
#endif
Pierre Kraemer's avatar
Pierre Kraemer committed
19 20

public:
21
	Surface_Import_Plugin()
22
	{}
Pierre Kraemer's avatar
Pierre Kraemer committed
23

24
	~Surface_Import_Plugin()
Pierre Kraemer's avatar
Pierre Kraemer committed
25 26 27 28 29 30 31
	{}

private:
	virtual bool enable();
	virtual void disable() {}

public slots:
Sylvain Thery's avatar
Sylvain Thery committed
32 33 34 35 36
	/**
	 * @brief import a mesh from a file
	 * @param fileName file name of mesh file
	 * @return the new maphandler that handle the mesh
	 */
Pierre Kraemer's avatar
Pierre Kraemer committed
37
	MapHandlerGen* importMeshFromFile(const QString& fileName);
Sylvain Thery's avatar
Sylvain Thery committed
38 39 40 41

	/**
	 * @brief import a mesh by opening a FileDialog
	 */
Pierre Kraemer's avatar
Pierre Kraemer committed
42 43
	void importMeshFromFileDialog();

Sylvain Thery's avatar
Sylvain Thery committed
44 45 46 47 48
	/**
	 * @brief import an image into a mesh from a file
	 * @param fileName file name of mesh file
	 * @return
	 */
Pierre Kraemer's avatar
Pierre Kraemer committed
49
	MapHandlerGen* importImageFromFile(const QString& fileName);
Sylvain Thery's avatar
Sylvain Thery committed
50 51 52 53

	/**
	 * @brief import image into a mesh by opening a FileDialog
	 */
Pierre Kraemer's avatar
Pierre Kraemer committed
54
	void importImageFromFileDialog();
Pierre Kraemer's avatar
Pierre Kraemer committed
55 56

private:
Pierre Kraemer's avatar
Pierre Kraemer committed
57 58
	QAction* importMeshAction;
	QAction* importImageAction;
Pierre Kraemer's avatar
Pierre Kraemer committed
59 60 61 62 63 64 65
};

} // namespace SCHNApps

} // namespace CGoGN

#endif