surface_distance.h 1.45 KB
Newer Older
1 2 3
#ifndef _SURFACE_DISTANCE_PLUGIN_H_
#define _SURFACE_DISTANCE_PLUGIN_H_

4
#include "dll.h"
5 6 7 8 9 10 11 12 13 14
#include "plugin_processing.h"

#include "dialog_computeDistance.h"

namespace CGoGN
{

namespace SCHNApps
{

15
class SURFACE_DISTANCE_API Surface_Distance_Plugin : public PluginProcessing
16 17 18
{
	Q_OBJECT
	Q_INTERFACES(CGoGN::SCHNApps::Plugin)
Sylvain Thery's avatar
Sylvain Thery committed
19 20 21
#if CGOGN_QT_DESIRED_VERSION == 5
	Q_PLUGIN_METADATA(IID "CGoGN.SCHNapps.Plugin")
#endif
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36

public:
	Surface_Distance_Plugin()
	{}

	~Surface_Distance_Plugin()
	{}

	virtual bool enable();
	virtual void disable();

private slots:
	void openComputeDistanceDialog();
	void computeDistanceFromDialog();

37
	void schnappsClosing();
38 39

public slots:
Sylvain Thery's avatar
Sylvain Thery committed
40 41 42 43 44 45 46 47 48
	/**
	 * @brief compute distance between 2 maps
	 * @param mapName1 name of first map
	 * @param positionAttributeName1 name of first map position attribute
	 * @param distanceAttributeName1 name of first map distance attribute
	 * @param mapName2 name of second map
	 * @param positionAttributeName2 name of second map position attribute
	 * @param distanceAttributeName2 name of second map distance attribute
	 */
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
	void computeDistance(
		const QString& mapName1,
		const QString& positionAttributeName1,
		const QString& distanceAttributeName1,
		const QString& mapName2,
		const QString& positionAttributeName2,
		const QString& distanceAttributeName2
	);

private:
	Dialog_ComputeDistance* m_computeDistanceDialog;
	QAction* m_computeDistanceAction;
};

} // namespace SCHNApps

} // namespace CGoGN

#endif