mirror of
https://github.com/lucaspalomodevelop/meshlab.git
synced 2026-03-14 08:34:37 +00:00
EditPlugins
This commit is contained in:
parent
bd480b6b6e
commit
04ea401ea1
@ -32,12 +32,12 @@ void EditPluginContainer::clear()
|
||||
editPlugins.clear();
|
||||
}
|
||||
|
||||
void EditPluginContainer::pushEditPlugin(EditPluginInterfaceFactory* iEditFactory)
|
||||
void EditPluginContainer::pushEditPlugin(EditPluginFactory* iEditFactory)
|
||||
{
|
||||
editPlugins.push_back(iEditFactory);
|
||||
}
|
||||
|
||||
void EditPluginContainer::eraseEditPlugin(EditPluginInterfaceFactory* iEditFactory)
|
||||
void EditPluginContainer::eraseEditPlugin(EditPluginFactory* iEditFactory)
|
||||
{
|
||||
editPlugins.erase(std::find(editPlugins.begin(), editPlugins.end(), iEditFactory));
|
||||
}
|
||||
@ -47,14 +47,14 @@ EditPluginContainer::EditPluginFactoryRangeIterator EditPluginContainer::editPlu
|
||||
return EditPluginFactoryRangeIterator(this, iterateAlsoDisabledPlugins);
|
||||
}
|
||||
|
||||
ConstPluginIterator<EditPluginInterfaceFactory> EditPluginContainer::EditPluginFactoryRangeIterator::begin()
|
||||
ConstPluginIterator<EditPluginFactory> EditPluginContainer::EditPluginFactoryRangeIterator::begin()
|
||||
{
|
||||
return ConstPluginIterator<EditPluginInterfaceFactory>(pm->editPlugins, pm->editPlugins.begin(), b);
|
||||
return ConstPluginIterator<EditPluginFactory>(pm->editPlugins, pm->editPlugins.begin(), b);
|
||||
}
|
||||
|
||||
ConstPluginIterator<EditPluginInterfaceFactory> EditPluginContainer::EditPluginFactoryRangeIterator::end()
|
||||
ConstPluginIterator<EditPluginFactory> EditPluginContainer::EditPluginFactoryRangeIterator::end()
|
||||
{
|
||||
return ConstPluginIterator<EditPluginInterfaceFactory>(pm->editPlugins, pm->editPlugins.end(), b);
|
||||
return ConstPluginIterator<EditPluginFactory>(pm->editPlugins, pm->editPlugins.end(), b);
|
||||
}
|
||||
|
||||
EditPluginContainer::EditPluginFactoryRangeIterator::EditPluginFactoryRangeIterator(
|
||||
|
||||
@ -41,20 +41,20 @@ public:
|
||||
EditPluginContainer();
|
||||
|
||||
void clear();
|
||||
void pushEditPlugin(EditPluginInterfaceFactory* iEditFactory);
|
||||
void eraseEditPlugin(EditPluginInterfaceFactory* iEditFactory);
|
||||
void pushEditPlugin(EditPluginFactory* iEditFactory);
|
||||
void eraseEditPlugin(EditPluginFactory* iEditFactory);
|
||||
|
||||
EditPluginFactoryRangeIterator editPluginIterator(bool iterateAlsoDisabledPlugins = false) const;
|
||||
private:
|
||||
std::vector<EditPluginInterfaceFactory*> editPlugins;
|
||||
std::vector<EditPluginFactory*> editPlugins;
|
||||
};
|
||||
|
||||
class EditPluginContainer::EditPluginFactoryRangeIterator
|
||||
{
|
||||
friend class EditPluginContainer;
|
||||
public:
|
||||
ConstPluginIterator<EditPluginInterfaceFactory> begin();
|
||||
ConstPluginIterator<EditPluginInterfaceFactory> end();
|
||||
ConstPluginIterator<EditPluginFactory> begin();
|
||||
ConstPluginIterator<EditPluginFactory> end();
|
||||
private:
|
||||
EditPluginFactoryRangeIterator(const EditPluginContainer* pm, bool iterateAlsoDisabledPlugins = false);
|
||||
const EditPluginContainer* pm;
|
||||
|
||||
@ -21,8 +21,8 @@
|
||||
* *
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef MESHLAB_EDIT_PLUGIN_INTERFACE_H
|
||||
#define MESHLAB_EDIT_PLUGIN_INTERFACE_H
|
||||
#ifndef MESHLAB_EDIT_PLUGIN_H
|
||||
#define MESHLAB_EDIT_PLUGIN_H
|
||||
|
||||
#include <QTabletEvent>
|
||||
|
||||
@ -32,17 +32,17 @@
|
||||
|
||||
class GLArea;
|
||||
|
||||
/*
|
||||
EditPluginInterface
|
||||
Used to provide tools that needs some kind of interaction with the mesh.
|
||||
Editing tools are exclusive (only one at a time) and can grab the mouse events and customize the rendering process.
|
||||
*/
|
||||
/**
|
||||
* @brief The EditPlugin class is used to provide tools that needs some kind of
|
||||
* interaction with the mesh. Editing tools are exclusive (only one at a time)
|
||||
* and can grab the mouse events and customize the rendering process.
|
||||
**/
|
||||
|
||||
class EditPluginInterface : public MeshLabPlugin
|
||||
class EditPlugin : public MeshLabPlugin
|
||||
{
|
||||
public:
|
||||
EditPluginInterface() : MeshLabPlugin() {}
|
||||
virtual ~EditPluginInterface() {}
|
||||
EditPlugin() : MeshLabPlugin() {}
|
||||
virtual ~EditPlugin() {}
|
||||
|
||||
//should return a sentence describing what the editing tool does
|
||||
static const QString Info();
|
||||
@ -95,23 +95,26 @@ private:
|
||||
};
|
||||
|
||||
|
||||
/** MeshEditInterfaceFactory
|
||||
\short The MeshEditInterfaceFactory class is a <i>factory</i> is used to generate a object for each starting of an editing filter.
|
||||
|
||||
This is needed because editing filters have a internal state, so if you want to have an editing tool for two different documents you have to instance two objects.
|
||||
This class is used by the framework to generate an independent MeshEditInterface for each document.
|
||||
*/
|
||||
class EditPluginInterfaceFactory : public MeshLabPluginFile
|
||||
/**
|
||||
* @brief The EditPluginFactory class is used to generate an action for each
|
||||
* starting of an editing filter.
|
||||
*
|
||||
* This is needed because editing filters have a internal state, so if you want
|
||||
* to have an editing tool for two different documents you have to instance
|
||||
* two objects. This class is used by the framework to generate an independent
|
||||
* EditPlugin for each document.
|
||||
*/
|
||||
class EditPluginFactory : public MeshLabPluginFile
|
||||
{
|
||||
public:
|
||||
EditPluginInterfaceFactory() {}
|
||||
virtual ~EditPluginInterfaceFactory() {}
|
||||
EditPluginFactory() {}
|
||||
virtual ~EditPluginFactory() {}
|
||||
|
||||
//gets a list of actions available from this plugin
|
||||
virtual QList<QAction *> actions() const = 0;
|
||||
|
||||
//get the edit tool for the given action
|
||||
virtual EditPluginInterface* getMeshEditInterface(const QAction *) = 0;
|
||||
virtual EditPlugin* getMeshEditInterface(const QAction *) = 0;
|
||||
|
||||
//get the description for the given action
|
||||
virtual QString getEditToolDescription(const QAction *) = 0;
|
||||
@ -124,11 +127,11 @@ public:
|
||||
} \
|
||||
private:
|
||||
|
||||
#define EDIT_PLUGIN_INTERFACE_IID "vcg.meshlab.EditPluginInterface/1.0"
|
||||
#define EDIT_PLUGIN_INTERFACE_FACTORY_IID "vcg.meshlab.EditPluginInterfaceFactory/1.0"
|
||||
#define EDIT_PLUGIN_IID "vcg.meshlab.EditPlugin/1.0"
|
||||
#define EDIT_PLUGIN_FACTORY_IID "vcg.meshlab.EditPluginFactory/1.0"
|
||||
|
||||
Q_DECLARE_INTERFACE(EditPluginInterface, EDIT_PLUGIN_INTERFACE_IID)
|
||||
Q_DECLARE_INTERFACE(EditPluginInterfaceFactory, EDIT_PLUGIN_INTERFACE_FACTORY_IID)
|
||||
Q_DECLARE_INTERFACE(EditPlugin, EDIT_PLUGIN_IID)
|
||||
Q_DECLARE_INTERFACE(EditPluginFactory, EDIT_PLUGIN_FACTORY_IID)
|
||||
|
||||
|
||||
#endif // MESHLAB_EDIT_PLUGIN_INTERFACE_H
|
||||
#endif // MESHLAB_EDIT_PLUGIN_H
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
* @brief The MeshLabPluginFile class is the base of all MeshLab plugin classes,
|
||||
* and represents the library file of the plugin.
|
||||
* Each MeshLab plugin can then be a classic plugin (and inherit from the MeshLabPlugin class)
|
||||
* or a collection of Edit plugins (and inherit from the EditPluginInterfaceFactory class).
|
||||
* or a collection of Edit plugins (and inherit from the EditPluginFactory class).
|
||||
* Each Plugin (classic or edit) inherits from this class.
|
||||
*/
|
||||
class MeshLabPluginFile
|
||||
|
||||
@ -38,7 +38,7 @@ MeshLabPluginType::MeshLabPluginType(const MeshLabPluginFile* fpi) : type(0)
|
||||
type |= DECORATE;
|
||||
}
|
||||
//EditFactory
|
||||
const EditPluginInterfaceFactory* efp = dynamic_cast<const EditPluginInterfaceFactory *>(fpi);
|
||||
const EditPluginFactory* efp = dynamic_cast<const EditPluginFactory *>(fpi);
|
||||
if (efp) { //EditFactory Plugin
|
||||
type |= EDIT;
|
||||
}
|
||||
|
||||
@ -197,7 +197,7 @@ void PluginManager::loadPlugin(const QString& fileName)
|
||||
decoratePlugins.pushDecoratePlugin(qobject_cast<DecoratePlugin *>(plugin));
|
||||
}
|
||||
if (type.isEditPlugin()){
|
||||
editPlugins.pushEditPlugin(qobject_cast<EditPluginInterfaceFactory *>(plugin));
|
||||
editPlugins.pushEditPlugin(qobject_cast<EditPluginFactory *>(plugin));
|
||||
}
|
||||
if (type.isFilterPlugin()){
|
||||
filterPlugins.pushFilterPlugin(qobject_cast<FilterPluginInterface *>(plugin));
|
||||
@ -228,7 +228,7 @@ void PluginManager::unloadPlugin(MeshLabPluginFile* ifp)
|
||||
decoratePlugins.eraseDecoratePlugin(dynamic_cast<DecoratePlugin *>(ifp));
|
||||
}
|
||||
if (type.isEditPlugin()){
|
||||
editPlugins.eraseEditPlugin(dynamic_cast<EditPluginInterfaceFactory *>(ifp));
|
||||
editPlugins.eraseEditPlugin(dynamic_cast<EditPluginFactory *>(ifp));
|
||||
}
|
||||
if (type.isFilterPlugin()){
|
||||
filterPlugins.eraseFilterPlugin(dynamic_cast<FilterPluginInterface *>(ifp));
|
||||
|
||||
@ -157,7 +157,7 @@ void PluginInfoDialog::populateTreeWidget()
|
||||
tmplist.push_back(a->text());
|
||||
}
|
||||
if (type.isEditPlugin()){
|
||||
EditPluginInterfaceFactory* epi = dynamic_cast<EditPluginInterfaceFactory*>(fp);
|
||||
EditPluginFactory* epi = dynamic_cast<EditPluginFactory*>(fp);
|
||||
for(QAction *a: epi->actions())
|
||||
tmplist.push_back(a->text());
|
||||
}
|
||||
|
||||
@ -352,13 +352,13 @@ public:
|
||||
QAction * getCurrentEditAction() { return currentEditor; }
|
||||
|
||||
//get the currently active mesh editor
|
||||
EditPluginInterface * getCurrentMeshEditor() { return iEdit; }
|
||||
EditPlugin * getCurrentMeshEditor() { return iEdit; }
|
||||
|
||||
//see if this glAarea has a MESHEditInterface for this action
|
||||
bool editorExistsForAction(QAction *editAction){ return actionToMeshEditMap.contains(editAction); }
|
||||
|
||||
//add a MeshEditInterface for the given action
|
||||
void addMeshEditor(QAction *editAction, EditPluginInterface *editor){ actionToMeshEditMap.insert(editAction, editor); }
|
||||
void addMeshEditor(QAction *editAction, EditPlugin *editor){ actionToMeshEditMap.insert(editAction, editor); }
|
||||
bool readyToClose();
|
||||
float lastRenderingTime() { return lastTime;}
|
||||
void drawGradient();
|
||||
@ -453,10 +453,10 @@ private:
|
||||
QFont qFont; //font settings
|
||||
|
||||
// Editing support
|
||||
EditPluginInterface *iEdit;
|
||||
EditPlugin *iEdit;
|
||||
QAction *currentEditor;
|
||||
QAction *suspendedEditRef; // reference to last Editing Mode Used
|
||||
QMap<QAction*, EditPluginInterface*> actionToMeshEditMap;
|
||||
QMap<QAction*, EditPlugin*> actionToMeshEditMap;
|
||||
|
||||
//the last model that start edit was called with
|
||||
MeshModel *lastModelEdited;
|
||||
|
||||
@ -495,7 +495,7 @@ void MainWindow::createToolBars()
|
||||
|
||||
editToolBar = addToolBar(tr("Edit"));
|
||||
editToolBar->addAction(suspendEditModeAct);
|
||||
for(EditPluginInterfaceFactory *iEditFactory: PM.editPluginFactoryIterator()) {
|
||||
for(EditPluginFactory *iEditFactory: PM.editPluginFactoryIterator()) {
|
||||
for(QAction* editAction: iEditFactory->actions()){
|
||||
if (!editAction->icon().isNull()) {
|
||||
editToolBar->addAction(editAction);
|
||||
@ -869,7 +869,7 @@ void MainWindow::fillShadersMenu()
|
||||
void MainWindow::fillEditMenu()
|
||||
{
|
||||
clearMenu(editMenu);
|
||||
for(EditPluginInterfaceFactory *iEditFactory: PM.editPluginFactoryIterator())
|
||||
for(EditPluginFactory *iEditFactory: PM.editPluginFactoryIterator())
|
||||
{
|
||||
for(QAction* editAction: iEditFactory->actions())
|
||||
{
|
||||
@ -909,7 +909,7 @@ void MainWindow::updateAllPluginsActions()
|
||||
|
||||
editToolBar->clear();
|
||||
editToolBar->addAction(suspendEditModeAct);
|
||||
for(EditPluginInterfaceFactory *iEditFactory: PM.editPluginFactoryIterator()) {
|
||||
for(EditPluginFactory *iEditFactory: PM.editPluginFactoryIterator()) {
|
||||
for(QAction* editAction: iEditFactory->actions()){
|
||||
if (!editAction->icon().isNull()) {
|
||||
editToolBar->addAction(editAction);
|
||||
|
||||
@ -395,7 +395,7 @@ void MainWindow::updateMenus()
|
||||
// you exit from editing mode by pressing again the editing button
|
||||
// When you are in a editing mode all the other editing are disabled.
|
||||
|
||||
for (EditPluginInterfaceFactory* ep : PM.editPluginFactoryIterator())
|
||||
for (EditPluginFactory* ep : PM.editPluginFactoryIterator())
|
||||
for (QAction* a : ep->actions()) {
|
||||
a->setChecked(false);
|
||||
a->setEnabled(GLA()->getCurrentEditAction() == nullptr);
|
||||
@ -432,7 +432,7 @@ void MainWindow::updateMenus()
|
||||
} // if active
|
||||
else
|
||||
{
|
||||
for (EditPluginInterfaceFactory* ep : PM.editPluginFactoryIterator()) {
|
||||
for (EditPluginFactory* ep : PM.editPluginFactoryIterator()) {
|
||||
for (QAction* a : ep->actions()) {
|
||||
a->setEnabled(false);
|
||||
}
|
||||
@ -1394,8 +1394,8 @@ void MainWindow::applyEditMode()
|
||||
//if this GLArea does not have an instance of this action's MeshEdit tool then give it one
|
||||
if(!GLA()->editorExistsForAction(action))
|
||||
{
|
||||
EditPluginInterfaceFactory *iEditFactory = qobject_cast<EditPluginInterfaceFactory *>(action->parent());
|
||||
EditPluginInterface *iEdit = iEditFactory->getMeshEditInterface(action);
|
||||
EditPluginFactory *iEditFactory = qobject_cast<EditPluginFactory *>(action->parent());
|
||||
EditPlugin *iEdit = iEditFactory->getMeshEditInterface(action);
|
||||
GLA()->addMeshEditor(action, iEdit);
|
||||
}
|
||||
meshDoc()->meshDocStateData().create(*meshDoc());
|
||||
|
||||
@ -31,11 +31,11 @@
|
||||
#include <wrap/gui/trackball.h>
|
||||
#include "alignDialog.h"
|
||||
|
||||
class EditAlignPlugin : public QObject, public EditPluginInterface
|
||||
class EditAlignPlugin : public QObject, public EditPlugin
|
||||
{
|
||||
Q_OBJECT
|
||||
MESHLAB_EDIT_PLUGIN
|
||||
Q_INTERFACES(EditPluginInterface)
|
||||
Q_INTERFACES(EditPlugin)
|
||||
|
||||
enum
|
||||
{
|
||||
|
||||
@ -46,7 +46,7 @@ QList<QAction *> EditAlignFactory::actions() const
|
||||
}
|
||||
|
||||
//get the edit tool for the given action
|
||||
EditPluginInterface* EditAlignFactory::getMeshEditInterface(const QAction *action)
|
||||
EditPlugin* EditAlignFactory::getMeshEditInterface(const QAction *action)
|
||||
{
|
||||
assert(action == editAlign); (void) action;
|
||||
return new EditAlignPlugin();
|
||||
|
||||
@ -28,11 +28,11 @@
|
||||
#include <QObject>
|
||||
#include <common/plugins/interfaces/edit_plugin.h>
|
||||
|
||||
class EditAlignFactory : public QObject, public EditPluginInterfaceFactory
|
||||
class EditAlignFactory : public QObject, public EditPluginFactory
|
||||
{
|
||||
Q_OBJECT
|
||||
MESHLAB_PLUGIN_IID_EXPORTER(EDIT_PLUGIN_INTERFACE_FACTORY_IID)
|
||||
Q_INTERFACES(EditPluginInterfaceFactory)
|
||||
MESHLAB_PLUGIN_IID_EXPORTER(EDIT_PLUGIN_FACTORY_IID)
|
||||
Q_INTERFACES(EditPluginFactory)
|
||||
|
||||
public:
|
||||
EditAlignFactory();
|
||||
@ -44,7 +44,7 @@ public:
|
||||
virtual QList<QAction *> actions() const;
|
||||
|
||||
//get the edit tool for the given action
|
||||
virtual EditPluginInterface* getMeshEditInterface(const QAction*);
|
||||
virtual EditPlugin* getMeshEditInterface(const QAction*);
|
||||
|
||||
//get the description for the given action
|
||||
virtual QString getEditToolDescription(const QAction*);
|
||||
|
||||
@ -29,11 +29,11 @@
|
||||
|
||||
#include <common/plugins/interfaces/edit_plugin.h>
|
||||
|
||||
class EditManipulatorsPlugin : public QObject, public EditPluginInterface
|
||||
class EditManipulatorsPlugin : public QObject, public EditPlugin
|
||||
{
|
||||
Q_OBJECT
|
||||
MESHLAB_EDIT_PLUGIN
|
||||
Q_INTERFACES(EditPluginInterface)
|
||||
Q_INTERFACES(EditPlugin)
|
||||
|
||||
public:
|
||||
|
||||
|
||||
@ -46,7 +46,7 @@ QList<QAction *> EditManipulatorsFactory::actions() const
|
||||
}
|
||||
|
||||
//get the edit tool for the given action
|
||||
EditPluginInterface* EditManipulatorsFactory::getMeshEditInterface(const QAction *action)
|
||||
EditPlugin* EditManipulatorsFactory::getMeshEditInterface(const QAction *action)
|
||||
{
|
||||
if(action == editManipulators)
|
||||
{
|
||||
|
||||
@ -28,11 +28,11 @@
|
||||
#include <QObject>
|
||||
#include <common/plugins/interfaces/edit_plugin.h>
|
||||
|
||||
class EditManipulatorsFactory : public QObject, public EditPluginInterfaceFactory
|
||||
class EditManipulatorsFactory : public QObject, public EditPluginFactory
|
||||
{
|
||||
Q_OBJECT
|
||||
MESHLAB_PLUGIN_IID_EXPORTER(EDIT_PLUGIN_INTERFACE_FACTORY_IID)
|
||||
Q_INTERFACES(EditPluginInterfaceFactory)
|
||||
MESHLAB_PLUGIN_IID_EXPORTER(EDIT_PLUGIN_FACTORY_IID)
|
||||
Q_INTERFACES(EditPluginFactory)
|
||||
|
||||
public:
|
||||
EditManipulatorsFactory();
|
||||
@ -44,7 +44,7 @@ public:
|
||||
virtual QList<QAction *> actions() const;
|
||||
|
||||
//get the edit tool for the given action
|
||||
virtual EditPluginInterface* getMeshEditInterface(const QAction*);
|
||||
virtual EditPlugin* getMeshEditInterface(const QAction*);
|
||||
|
||||
//get the description for the given action
|
||||
virtual QString getEditToolDescription(const QAction*);
|
||||
|
||||
@ -47,11 +47,11 @@ public:
|
||||
//--------------------------------------
|
||||
|
||||
|
||||
class EditMeasurePlugin : public QObject, public EditPluginInterface
|
||||
class EditMeasurePlugin : public QObject, public EditPlugin
|
||||
{
|
||||
Q_OBJECT
|
||||
MESHLAB_EDIT_PLUGIN
|
||||
Q_INTERFACES(EditPluginInterface)
|
||||
Q_INTERFACES(EditPlugin)
|
||||
|
||||
public:
|
||||
EditMeasurePlugin();
|
||||
|
||||
@ -46,7 +46,7 @@ QList<QAction *> EditMeasureFactory::actions() const
|
||||
}
|
||||
|
||||
//get the edit tool for the given action
|
||||
EditPluginInterface* EditMeasureFactory::getMeshEditInterface(const QAction *action)
|
||||
EditPlugin* EditMeasureFactory::getMeshEditInterface(const QAction *action)
|
||||
{
|
||||
if(action == editMeasure)
|
||||
{
|
||||
|
||||
@ -28,11 +28,11 @@
|
||||
#include <QObject>
|
||||
#include <common/plugins/interfaces/edit_plugin.h>
|
||||
|
||||
class EditMeasureFactory : public QObject, public EditPluginInterfaceFactory
|
||||
class EditMeasureFactory : public QObject, public EditPluginFactory
|
||||
{
|
||||
Q_OBJECT
|
||||
MESHLAB_PLUGIN_IID_EXPORTER(EDIT_PLUGIN_INTERFACE_FACTORY_IID)
|
||||
Q_INTERFACES(EditPluginInterfaceFactory)
|
||||
MESHLAB_PLUGIN_IID_EXPORTER(EDIT_PLUGIN_FACTORY_IID)
|
||||
Q_INTERFACES(EditPluginFactory)
|
||||
|
||||
public:
|
||||
EditMeasureFactory();
|
||||
@ -44,7 +44,7 @@ public:
|
||||
virtual QList<QAction *> actions() const;
|
||||
|
||||
//get the edit tool for the given action
|
||||
virtual EditPluginInterface* getMeshEditInterface(const QAction*);
|
||||
virtual EditPlugin* getMeshEditInterface(const QAction*);
|
||||
|
||||
//get the description for the given action
|
||||
virtual QString getEditToolDescription(const QAction*);
|
||||
|
||||
@ -33,11 +33,11 @@
|
||||
#include <vcg/space/point_matching.h>
|
||||
|
||||
|
||||
class EditMutualCorrsPlugin : public QObject, public EditPluginInterface
|
||||
class EditMutualCorrsPlugin : public QObject, public EditPlugin
|
||||
{
|
||||
Q_OBJECT
|
||||
MESHLAB_EDIT_PLUGIN
|
||||
Q_INTERFACES(EditPluginInterface)
|
||||
Q_INTERFACES(EditPlugin)
|
||||
|
||||
public:
|
||||
EditMutualCorrsPlugin();
|
||||
|
||||
@ -46,7 +46,7 @@ QList<QAction *> EditMutualCorrsFactory::actions() const
|
||||
}
|
||||
|
||||
//get the edit tool for the given action
|
||||
EditPluginInterface* EditMutualCorrsFactory::getMeshEditInterface(const QAction *action)
|
||||
EditPlugin* EditMutualCorrsFactory::getMeshEditInterface(const QAction *action)
|
||||
{
|
||||
if(action == editMutualCorrs)
|
||||
{
|
||||
|
||||
@ -27,11 +27,11 @@
|
||||
#include <QObject>
|
||||
#include <common/plugins/interfaces/edit_plugin.h>
|
||||
|
||||
class EditMutualCorrsFactory : public QObject, public EditPluginInterfaceFactory
|
||||
class EditMutualCorrsFactory : public QObject, public EditPluginFactory
|
||||
{
|
||||
Q_OBJECT
|
||||
MESHLAB_PLUGIN_IID_EXPORTER(EDIT_PLUGIN_INTERFACE_FACTORY_IID)
|
||||
Q_INTERFACES(EditPluginInterfaceFactory)
|
||||
MESHLAB_PLUGIN_IID_EXPORTER(EDIT_PLUGIN_FACTORY_IID)
|
||||
Q_INTERFACES(EditPluginFactory)
|
||||
|
||||
public:
|
||||
EditMutualCorrsFactory();
|
||||
@ -43,7 +43,7 @@ public:
|
||||
virtual QList<QAction *> actions() const;
|
||||
|
||||
//get the edit tool for the given action
|
||||
virtual EditPluginInterface* getMeshEditInterface(const QAction*);
|
||||
virtual EditPlugin* getMeshEditInterface(const QAction*);
|
||||
|
||||
//get the description for the given action
|
||||
virtual QString getEditToolDescription(const QAction*);
|
||||
|
||||
@ -49,10 +49,10 @@ enum PaintOptions {
|
||||
/**
|
||||
* EditPaint plugin main class (MeshEditing plugin)
|
||||
*/
|
||||
class EditPaintPlugin : public QObject, public EditPluginInterface {
|
||||
class EditPaintPlugin : public QObject, public EditPlugin {
|
||||
Q_OBJECT
|
||||
MESHLAB_EDIT_PLUGIN
|
||||
Q_INTERFACES(EditPluginInterface)
|
||||
Q_INTERFACES(EditPlugin)
|
||||
|
||||
public:
|
||||
EditPaintPlugin();
|
||||
|
||||
@ -46,7 +46,7 @@ QList<QAction *> EditPaintFactory::actions() const
|
||||
}
|
||||
|
||||
//get the edit tool for the given action
|
||||
EditPluginInterface* EditPaintFactory::getMeshEditInterface(const QAction *action)
|
||||
EditPlugin* EditPaintFactory::getMeshEditInterface(const QAction *action)
|
||||
{
|
||||
if(action == editPaint)
|
||||
{
|
||||
|
||||
@ -28,11 +28,11 @@
|
||||
|
||||
#include <common/plugins/interfaces/edit_plugin.h>
|
||||
|
||||
class EditPaintFactory : public QObject, public EditPluginInterfaceFactory
|
||||
class EditPaintFactory : public QObject, public EditPluginFactory
|
||||
{
|
||||
Q_OBJECT
|
||||
MESHLAB_PLUGIN_IID_EXPORTER(EDIT_PLUGIN_INTERFACE_FACTORY_IID)
|
||||
Q_INTERFACES(EditPluginInterfaceFactory)
|
||||
MESHLAB_PLUGIN_IID_EXPORTER(EDIT_PLUGIN_FACTORY_IID)
|
||||
Q_INTERFACES(EditPluginFactory)
|
||||
|
||||
public:
|
||||
EditPaintFactory();
|
||||
@ -44,7 +44,7 @@ public:
|
||||
virtual QList<QAction *> actions() const;
|
||||
|
||||
//get the edit tool for the given action
|
||||
virtual EditPluginInterface* getMeshEditInterface(const QAction*);
|
||||
virtual EditPlugin* getMeshEditInterface(const QAction*);
|
||||
|
||||
//get the description for the given action
|
||||
virtual QString getEditToolDescription(const QAction*);
|
||||
|
||||
@ -46,7 +46,7 @@ QList<QAction *> EditPickPointsFactory::actions() const
|
||||
}
|
||||
|
||||
//get the edit tool for the given action
|
||||
EditPluginInterface* EditPickPointsFactory::getMeshEditInterface(const QAction *action)
|
||||
EditPlugin* EditPickPointsFactory::getMeshEditInterface(const QAction *action)
|
||||
{
|
||||
if(action == editPickPoints) {
|
||||
return new EditPickPointsPlugin();
|
||||
|
||||
@ -28,11 +28,11 @@
|
||||
#include <QObject>
|
||||
#include <common/plugins/interfaces/edit_plugin.h>
|
||||
|
||||
class EditPickPointsFactory : public QObject, public EditPluginInterfaceFactory
|
||||
class EditPickPointsFactory : public QObject, public EditPluginFactory
|
||||
{
|
||||
Q_OBJECT
|
||||
MESHLAB_PLUGIN_IID_EXPORTER(EDIT_PLUGIN_INTERFACE_FACTORY_IID)
|
||||
Q_INTERFACES(EditPluginInterfaceFactory)
|
||||
MESHLAB_PLUGIN_IID_EXPORTER(EDIT_PLUGIN_FACTORY_IID)
|
||||
Q_INTERFACES(EditPluginFactory)
|
||||
|
||||
public:
|
||||
EditPickPointsFactory();
|
||||
@ -44,7 +44,7 @@ public:
|
||||
virtual QList<QAction *> actions() const;
|
||||
|
||||
//get the edit tool for the given action
|
||||
virtual EditPluginInterface* getMeshEditInterface(const QAction*);
|
||||
virtual EditPlugin* getMeshEditInterface(const QAction*);
|
||||
|
||||
//get the description for the given action
|
||||
QString getEditToolDescription(const QAction*);
|
||||
|
||||
@ -33,11 +33,11 @@
|
||||
#include <common/plugins/interfaces/edit_plugin.h>
|
||||
#include "pickpointsDialog.h"
|
||||
|
||||
class EditPickPointsPlugin : public QObject, public EditPluginInterface
|
||||
class EditPickPointsPlugin : public QObject, public EditPlugin
|
||||
{
|
||||
Q_OBJECT
|
||||
MESHLAB_EDIT_PLUGIN
|
||||
Q_INTERFACES(EditPluginInterface)
|
||||
Q_INTERFACES(EditPlugin)
|
||||
|
||||
public:
|
||||
//constructor
|
||||
|
||||
@ -27,11 +27,11 @@
|
||||
#include <QObject>
|
||||
#include <common/plugins/interfaces/edit_plugin.h>
|
||||
|
||||
class EditPointPlugin : public QObject, public EditPluginInterface
|
||||
class EditPointPlugin : public QObject, public EditPlugin
|
||||
{
|
||||
Q_OBJECT
|
||||
MESHLAB_EDIT_PLUGIN
|
||||
Q_INTERFACES(EditPluginInterface)
|
||||
Q_INTERFACES(EditPlugin)
|
||||
|
||||
public:
|
||||
enum {SELECT_DEFAULT_MODE, SELECT_FITTING_PLANE_MODE};
|
||||
|
||||
@ -48,7 +48,7 @@ QList<QAction *> PointEditFactory::actions() const
|
||||
}
|
||||
|
||||
//get the edit tool for the given action
|
||||
EditPluginInterface* PointEditFactory::getMeshEditInterface(const QAction *action)
|
||||
EditPlugin* PointEditFactory::getMeshEditInterface(const QAction *action)
|
||||
{
|
||||
if(action == editPoint)
|
||||
return new EditPointPlugin(EditPointPlugin::SELECT_DEFAULT_MODE);
|
||||
|
||||
@ -28,11 +28,11 @@
|
||||
#include <QObject>
|
||||
#include <common/plugins/interfaces/edit_plugin.h>
|
||||
|
||||
class PointEditFactory : public QObject, public EditPluginInterfaceFactory
|
||||
class PointEditFactory : public QObject, public EditPluginFactory
|
||||
{
|
||||
Q_OBJECT
|
||||
MESHLAB_PLUGIN_IID_EXPORTER(EDIT_PLUGIN_INTERFACE_FACTORY_IID)
|
||||
Q_INTERFACES(EditPluginInterfaceFactory)
|
||||
MESHLAB_PLUGIN_IID_EXPORTER(EDIT_PLUGIN_FACTORY_IID)
|
||||
Q_INTERFACES(EditPluginFactory)
|
||||
|
||||
public:
|
||||
PointEditFactory();
|
||||
@ -44,7 +44,7 @@ public:
|
||||
virtual QList<QAction *> actions() const;
|
||||
|
||||
//get the edit tool for the given action
|
||||
virtual EditPluginInterface* getMeshEditInterface(const QAction*);
|
||||
virtual EditPlugin* getMeshEditInterface(const QAction*);
|
||||
|
||||
//get the description for the given action
|
||||
virtual QString getEditToolDescription(const QAction*);
|
||||
|
||||
@ -47,7 +47,7 @@ QList<QAction *> QualityMapperFactory::actions() const
|
||||
}
|
||||
|
||||
//get the edit tool for the given action
|
||||
EditPluginInterface* QualityMapperFactory::getMeshEditInterface(const QAction *action)
|
||||
EditPlugin* QualityMapperFactory::getMeshEditInterface(const QAction *action)
|
||||
{
|
||||
if(action == editQuality)
|
||||
{
|
||||
|
||||
@ -28,11 +28,11 @@
|
||||
#include <QObject>
|
||||
#include <common/plugins/interfaces/edit_plugin.h>
|
||||
|
||||
class QualityMapperFactory : public QObject, public EditPluginInterfaceFactory
|
||||
class QualityMapperFactory : public QObject, public EditPluginFactory
|
||||
{
|
||||
Q_OBJECT
|
||||
MESHLAB_PLUGIN_IID_EXPORTER(EDIT_PLUGIN_INTERFACE_FACTORY_IID)
|
||||
Q_INTERFACES(EditPluginInterfaceFactory)
|
||||
MESHLAB_PLUGIN_IID_EXPORTER(EDIT_PLUGIN_FACTORY_IID)
|
||||
Q_INTERFACES(EditPluginFactory)
|
||||
|
||||
public:
|
||||
QualityMapperFactory();
|
||||
@ -44,7 +44,7 @@ public:
|
||||
virtual QList<QAction *> actions() const;
|
||||
|
||||
//get the edit tool for the given action
|
||||
virtual EditPluginInterface* getMeshEditInterface(const QAction*);
|
||||
virtual EditPlugin* getMeshEditInterface(const QAction*);
|
||||
|
||||
//get the description for the given action
|
||||
virtual QString getEditToolDescription(const QAction*);
|
||||
|
||||
@ -38,11 +38,11 @@ FIRST RELEASE
|
||||
#include "qualitymapperdialog.h"
|
||||
|
||||
//This class defines the plugin interface
|
||||
class QualityMapperPlugin : public QObject, public EditPluginInterface
|
||||
class QualityMapperPlugin : public QObject, public EditPlugin
|
||||
{
|
||||
Q_OBJECT
|
||||
MESHLAB_EDIT_PLUGIN
|
||||
Q_INTERFACES(EditPluginInterface)
|
||||
Q_INTERFACES(EditPlugin)
|
||||
|
||||
private:
|
||||
QualityMapperDialog *_qualityMapperDialog;
|
||||
|
||||
@ -32,11 +32,11 @@
|
||||
#include <vcg/space/point_matching.h>
|
||||
|
||||
|
||||
class EditReferencingPlugin : public QObject, public EditPluginInterface
|
||||
class EditReferencingPlugin : public QObject, public EditPlugin
|
||||
{
|
||||
Q_OBJECT
|
||||
MESHLAB_EDIT_PLUGIN
|
||||
Q_INTERFACES(EditPluginInterface)
|
||||
Q_INTERFACES(EditPlugin)
|
||||
|
||||
public:
|
||||
|
||||
|
||||
@ -46,7 +46,7 @@ QList<QAction *> EditReferencingFactory::actions() const
|
||||
}
|
||||
|
||||
//get the edit tool for the given action
|
||||
EditPluginInterface* EditReferencingFactory::getMeshEditInterface(const QAction *action)
|
||||
EditPlugin* EditReferencingFactory::getMeshEditInterface(const QAction *action)
|
||||
{
|
||||
if(action == editReferencing)
|
||||
{
|
||||
|
||||
@ -27,11 +27,11 @@
|
||||
#include <QObject>
|
||||
#include <common/plugins/interfaces/edit_plugin.h>
|
||||
|
||||
class EditReferencingFactory : public QObject, public EditPluginInterfaceFactory
|
||||
class EditReferencingFactory : public QObject, public EditPluginFactory
|
||||
{
|
||||
Q_OBJECT
|
||||
MESHLAB_PLUGIN_IID_EXPORTER(EDIT_PLUGIN_INTERFACE_FACTORY_IID)
|
||||
Q_INTERFACES(EditPluginInterfaceFactory)
|
||||
MESHLAB_PLUGIN_IID_EXPORTER(EDIT_PLUGIN_FACTORY_IID)
|
||||
Q_INTERFACES(EditPluginFactory)
|
||||
|
||||
public:
|
||||
EditReferencingFactory();
|
||||
@ -43,7 +43,7 @@ public:
|
||||
virtual QList<QAction *> actions() const;
|
||||
|
||||
//get the edit tool for the given action
|
||||
virtual EditPluginInterface* getMeshEditInterface(const QAction*);
|
||||
virtual EditPlugin* getMeshEditInterface(const QAction*);
|
||||
|
||||
//get the description for the given action
|
||||
virtual QString getEditToolDescription(const QAction*);
|
||||
|
||||
@ -27,11 +27,11 @@
|
||||
#include <QObject>
|
||||
#include <common/plugins/interfaces/edit_plugin.h>
|
||||
|
||||
class SampleEditPlugin : public QObject, public EditPluginInterface
|
||||
class SampleEditPlugin : public QObject, public EditPlugin
|
||||
{
|
||||
Q_OBJECT
|
||||
MESHLAB_EDIT_PLUGIN
|
||||
Q_INTERFACES(EditPluginInterface)
|
||||
Q_INTERFACES(EditPlugin)
|
||||
|
||||
public:
|
||||
SampleEditPlugin();
|
||||
|
||||
@ -46,7 +46,7 @@ QList<QAction *> SampleEditFactory::actions() const
|
||||
}
|
||||
|
||||
//get the edit tool for the given action
|
||||
EditPluginInterface* SampleEditFactory::getMeshEditInterface(const QAction *action)
|
||||
EditPlugin* SampleEditFactory::getMeshEditInterface(const QAction *action)
|
||||
{
|
||||
if(action == editSample)
|
||||
{
|
||||
|
||||
@ -28,11 +28,11 @@
|
||||
#include <QObject>
|
||||
#include <common/plugins/interfaces/edit_plugin.h>
|
||||
|
||||
class SampleEditFactory : public QObject, public EditPluginInterfaceFactory
|
||||
class SampleEditFactory : public QObject, public EditPluginFactory
|
||||
{
|
||||
Q_OBJECT
|
||||
MESHLAB_PLUGIN_IID_EXPORTER(EDIT_PLUGIN_INTERFACE_FACTORY_IID)
|
||||
Q_INTERFACES(EditPluginInterfaceFactory)
|
||||
MESHLAB_PLUGIN_IID_EXPORTER(EDIT_PLUGIN_FACTORY_IID)
|
||||
Q_INTERFACES(EditPluginFactory)
|
||||
|
||||
public:
|
||||
SampleEditFactory();
|
||||
@ -45,7 +45,7 @@ public:
|
||||
virtual QList<QAction *> actions() const;
|
||||
|
||||
//get the edit tool for the given action
|
||||
virtual EditPluginInterface* getMeshEditInterface(const QAction*);
|
||||
virtual EditPlugin* getMeshEditInterface(const QAction*);
|
||||
|
||||
//get the description for the given action
|
||||
virtual QString getEditToolDescription(const QAction*);
|
||||
|
||||
@ -25,11 +25,11 @@
|
||||
|
||||
#include <common/plugins/interfaces/edit_plugin.h>
|
||||
|
||||
class EditSelectPlugin : public QObject, public EditPluginInterface
|
||||
class EditSelectPlugin : public QObject, public EditPlugin
|
||||
{
|
||||
Q_OBJECT
|
||||
MESHLAB_EDIT_PLUGIN
|
||||
Q_INTERFACES(EditPluginInterface)
|
||||
Q_INTERFACES(EditPlugin)
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -52,7 +52,7 @@ QList<QAction *> EditSelectFactory::actions() const
|
||||
}
|
||||
|
||||
//get the edit tool for the given action
|
||||
EditPluginInterface* EditSelectFactory::getMeshEditInterface(const QAction *action)
|
||||
EditPlugin* EditSelectFactory::getMeshEditInterface(const QAction *action)
|
||||
{
|
||||
if(action == editSelect)
|
||||
return new EditSelectPlugin(EditSelectPlugin::SELECT_FACE_MODE);
|
||||
|
||||
@ -27,11 +27,11 @@
|
||||
|
||||
#include <common/plugins/interfaces/edit_plugin.h>
|
||||
|
||||
class EditSelectFactory : public QObject, public EditPluginInterfaceFactory
|
||||
class EditSelectFactory : public QObject, public EditPluginFactory
|
||||
{
|
||||
Q_OBJECT
|
||||
MESHLAB_PLUGIN_IID_EXPORTER(EDIT_PLUGIN_INTERFACE_FACTORY_IID)
|
||||
Q_INTERFACES(EditPluginInterfaceFactory)
|
||||
MESHLAB_PLUGIN_IID_EXPORTER(EDIT_PLUGIN_FACTORY_IID)
|
||||
Q_INTERFACES(EditPluginFactory)
|
||||
|
||||
public:
|
||||
EditSelectFactory();
|
||||
@ -43,7 +43,7 @@ public:
|
||||
virtual QList<QAction *> actions() const;
|
||||
|
||||
//get the edit tool for the given action
|
||||
virtual EditPluginInterface* getMeshEditInterface(const QAction*);
|
||||
virtual EditPlugin* getMeshEditInterface(const QAction*);
|
||||
|
||||
//get the description for the given action
|
||||
virtual QString getEditToolDescription(const QAction*);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user