differentialProperties.cpp 977 Bytes
Newer Older
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
#include "differentialProperties.h"

#include "mapHandler.h"

#include "Algo/Geometry/normal.h"

bool DifferentialPropertiesPlugin::enable()
{
	m_computeNormalsDialog = new ComputeNormalsDialog();

	computeNormalsAction = new QAction("import", this);
	addMenuAction("Surface;DifferentialProperties;Compute Normals", computeNormalsAction);
	connect(computeNormalsAction, SIGNAL(triggered()), this, SLOT(cb_computeNormals()));
	return true;
}

void DifferentialPropertiesPlugin::cb_computeNormals()
{
	m_computeNormalsDialog->mapList->clear();
	m_computeNormalsDialog->attributeName->setText("normal");
	const QList<MapHandlerGen*>& maps = m_window->getMapsList();
	foreach(MapHandlerGen* map, maps)
		m_computeNormalsDialog->mapList->addItem(map->getName());

	m_computeNormalsDialog->show();
}

#ifndef DEBUG
Q_EXPORT_PLUGIN2(DifferentialPropertiesPlugin, DifferentialPropertiesPlugin)
#else
Q_EXPORT_PLUGIN2(DifferentialPropertiesPluginD, DifferentialPropertiesPlugin)
#endif