Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ set(SOURCES
plugins/containers/render_plugin_container.cpp
plugins/interfaces/meshlab_plugin_logger.cpp
plugins/interfaces/decorate_plugin.cpp
plugins/interfaces/edit_plugin.cpp
plugins/interfaces/filter_plugin.cpp
plugins/interfaces/io_plugin.cpp
plugins/action_searcher.cpp
Expand Down
5 changes: 5 additions & 0 deletions src/common/plugins/interfaces/edit_plugin.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#include "edit_plugin.h"

void EditPlugin::initGlobalParameterList(RichParameterList& globalparam)
{
}
8 changes: 8 additions & 0 deletions src/common/plugins/interfaces/edit_plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ class EditPlugin : public MeshLabPlugin
EditPlugin() {}
virtual ~EditPlugin() {}

virtual void initGlobalParameterList(RichParameterList& defaultGlobalParamSet);

//gets a list of actions available from this plugin
virtual std::list<QAction *> actions() const {return actionList;};

Expand All @@ -117,8 +119,14 @@ class EditPlugin : public MeshLabPlugin
//get the description for the given action
virtual QString getEditToolDescription(const QAction *) = 0;

void setCurrentGlobalParamSet(RichParameterList* cgp)
{
currentGlobalParamSet = cgp;
}

protected:
std::list<QAction*> actionList;
RichParameterList* currentGlobalParamSet;
};

#define EDIT_PLUGIN_IID "vcg.meshlab.EditPlugin/1.0"
Expand Down
4 changes: 4 additions & 0 deletions src/meshlab/mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ class MainWindow : public QMainWindow
static bool QCallBack(const int pos, const char * str);
//const QString appName() const {return tr("MeshLab v")+appVer(); }
//const QString appVer() const {return tr("1.3.2"); }
RichParameterList& getCurrentParameterList();
MainWindowSetting mwsettings;
public slots:
// callback function to execute a filter
Expand Down Expand Up @@ -531,6 +532,9 @@ private slots:
static QString getDecoratedFileName(const QString& name);

MultiViewer_Container* _currviewcontainer;

Q_SIGNALS:
void customSettingsChanged(const RichParameterList &rpl);
};

/// Event filter that is installed to intercept the open events sent directly by the Operative System
Expand Down
6 changes: 6 additions & 0 deletions src/meshlab/mainwindow_Init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -922,6 +922,12 @@ void MainWindow::loadDefaultSettingsFromPlugins()
}
}

//edit settings
for (EditPlugin* ep : PM.editPluginFactoryIterator()) {
ep->initGlobalParameterList(defaultGlobalParams);
ep->setCurrentGlobalParamSet(&currentGlobalParams);
}

//io settings
for (IOPlugin* iop : PM.ioPluginIterator()){
for (const FileFormat& ff : iop->importFormats()) {
Expand Down
22 changes: 22 additions & 0 deletions src/meshlab/mainwindow_RunTime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,11 @@ void MainWindow::updateCustomSettings()
{
mwsettings.updateGlobalParameterList(currentGlobalParams);
emit dispatchCustomSettings(currentGlobalParams);

}
RichParameterList& MainWindow::getCurrentParameterList()
{
return currentGlobalParams;
}

void MainWindow::updateWindowMenu()
Expand Down Expand Up @@ -2196,6 +2201,15 @@ void MainWindow::reloadAllMesh()
{
// Discards changes and reloads current file
// save current file name
QMessageBox::StandardButton reply;
reply = QMessageBox::question(
this,
tr("You are reloading all mesh!"),
tr("Are You sure to Reload?"),
QMessageBox::Yes | QMessageBox::No);
if (reply == QMessageBox::No) {
return;
}
qb->show();
QElapsedTimer t;
t.start();
Expand Down Expand Up @@ -2244,6 +2258,14 @@ void MainWindow::reload()
return;
// Discards changes and reloads current file
// save current file name
QMessageBox::StandardButton reply;
reply = QMessageBox::question(this,
tr("You are reloading the current mesh"),
tr("Are you sure to reload?"),
QMessageBox::Yes | QMessageBox::No);
if (reply == QMessageBox::No) {
return;
}
qb->show();

QString fileName = meshDoc()->mm()->fullName();
Expand Down
5 changes: 5 additions & 0 deletions src/meshlabplugins/edit_align/edit_align_factory.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ class EditAlignFactory : public QObject, public EditPlugin
EditAlignFactory();
virtual ~EditAlignFactory() { delete editAlign; }

void initGlobalParameterList(RichParameterList& /*paramList*/)
{
// No global parameters needed for this plugin
}

virtual QString pluginName() const;

//get the edit tool for the given action
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ class EditManipulatorsFactory : public QObject, public EditPlugin
EditManipulatorsFactory();
virtual ~EditManipulatorsFactory() { delete editManipulators; }

void initGlobalParameterList(RichParameterList& /*paramList*/)
{
// No global parameters needed for this plugin
}

virtual QString pluginName() const;

//get the edit tool for the given action
Expand Down
5 changes: 5 additions & 0 deletions src/meshlabplugins/edit_measure/edit_measure_factory.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ class EditMeasureFactory : public QObject, public EditPlugin
EditMeasureFactory();
virtual ~EditMeasureFactory() { delete editMeasure; }

void initGlobalParameterList(RichParameterList& /*paramList*/)
{
// No global parameters needed for this plugin
}

virtual QString pluginName() const;

//get the edit tool for the given action
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ class EditMutualCorrsFactory : public QObject, public EditPlugin
EditMutualCorrsFactory();
virtual ~EditMutualCorrsFactory() { delete editMutualCorrs; }

void initGlobalParameterList(RichParameterList& /*paramList*/)
{
// No global parameters needed for this plugin
}

virtual QString pluginName() const;

//get the edit tool for the given action
Expand Down
5 changes: 5 additions & 0 deletions src/meshlabplugins/edit_paint/edit_paint_factory.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ class EditPaintFactory : public QObject, public EditPlugin
EditPaintFactory();
virtual ~EditPaintFactory() { delete editPaint; }

void initGlobalParameterList(RichParameterList& /*paramList*/)
{
// No global parameters needed for this plugin
}

virtual QString pluginName() const;

//get the edit tool for the given action
Expand Down
5 changes: 5 additions & 0 deletions src/meshlabplugins/edit_pickpoints/edit_pickpoints_factory.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ class EditPickPointsFactory : public QObject, public EditPlugin
EditPickPointsFactory();
virtual ~EditPickPointsFactory() { delete editPickPoints; }

void initGlobalParameterList(RichParameterList& /*paramList*/)
{
// No global parameters needed for this plugin
}

virtual QString pluginName() const;

//get the edit tool for the given action
Expand Down
5 changes: 5 additions & 0 deletions src/meshlabplugins/edit_point/edit_point_factory.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ class PointEditFactory : public QObject, public EditPlugin
PointEditFactory();
virtual ~PointEditFactory() { delete editPoint; }

void initGlobalParameterList(RichParameterList& /*paramList*/)
{
// No global parameters needed for this plugin
}

virtual QString pluginName() const;

//get the edit tool for the given action
Expand Down
5 changes: 5 additions & 0 deletions src/meshlabplugins/edit_quality/edit_quality_factory.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ class QualityMapperFactory : public QObject, public EditPlugin
QualityMapperFactory();
virtual ~QualityMapperFactory() { delete editQuality; }

void initGlobalParameterList(RichParameterList& /*paramList*/)
{
// No global parameters needed for this plugin
}

virtual QString pluginName() const;

//get the edit tool for the given action
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ class EditReferencingFactory : public QObject, public EditPlugin
EditReferencingFactory();
virtual ~EditReferencingFactory() { delete editReferencing; }

void initGlobalParameterList(RichParameterList& /*paramList*/)
{
// No global parameters needed for this plugin
}

virtual QString pluginName() const;

//get the edit tool for the given action
Expand Down
5 changes: 5 additions & 0 deletions src/meshlabplugins/edit_sample/edit_sample_factory.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ class SampleEditFactory : public QObject, public EditPlugin
SampleEditFactory();
virtual ~SampleEditFactory() { delete editSample; }

void initGlobalParameterList(RichParameterList& /*paramList*/)
{
// No global parameters needed for this plugin
}

//returns the name of the plugin
virtual QString pluginName() const;

Expand Down
Loading
Loading