Commit b1b443d7 authored by Jan Möbius's avatar Jan Möbius

Moved const UpdateType to reference

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@13344 383ad7c9-94d9-4d36-a494-682f7c89f535
parent ce645767
......@@ -134,7 +134,7 @@ class BaseInterface {
* @param _identifier id of the object or -1 if referring to all or deleted objects.
* @param _type the type states which part of the object (topology, selection, ..) has to be updated
*/
virtual void updatedObject(int _identifier, const UpdateType _type) {};
virtual void updatedObject(int _identifier, const UpdateType& _type) {};
/** \brief A scenegraph node has been shown or hidden
*
......@@ -170,7 +170,7 @@ class BaseInterface {
* @param _identifier Identifier of the updated/new object or -1 if one is deleted.
* @param _type the type states which part of the object (topology, selection, ..) had been updated
*/
virtual void slotObjectUpdated( int _identifier, const UpdateType _type ) {};
virtual void slotObjectUpdated( int _identifier, const UpdateType& _type ) {};
/** \brief Called if the whole scene is cleared
*
......@@ -340,14 +340,14 @@ this change. This functionality is provided by the signals and slots for \ref Ba
\image html updateObject.jpg
If you change data you have to emit one of BaseInterface::updatedObject(int) or BaseInterface::updatedObject(int,const UpdateType).
If you change data you have to emit one of BaseInterface::updatedObject(int) or BaseInterface::updatedObject(int,const UpdateType&).
\n
BaseInterface::updatedObject(int) forces an update of the whole object while BaseInterface::updatedObject(int,const UpdateType)
BaseInterface::updatedObject(int) forces an update of the whole object while BaseInterface::updatedObject(int,const UpdateType&)
can be restricted to a part of the object ( Geometry,Selection, ... ; see UpdateType ) and is therefore faster and should be preferred.
Both signals get the id of the object that has been updated or -1 if all should be updated( you should not use -1 if you know what object changed!).
If the signal is emitted, the core calls BaseInterface::slotObjectUpdated( int , const UpdateType ) of every plugin. You can
If the signal is emitted, the core calls BaseInterface::slotObjectUpdated( int , const UpdateType& ) of every plugin. You can
implement this slot if you need to react on object changes.
After all plugins have been informed, the scene will be redrawn.
......
......@@ -166,7 +166,7 @@ signals:
void signalObjectUpdated(int);
/// When this Signal is emitted all Plugins are informed that some type of update was performed on an object
void signalObjectUpdated(int, const UpdateType);
void signalObjectUpdated(int, const UpdateType&);
/// When this Signal is emitted when a Wheel Event occures
void PluginWheelEvent(QWheelEvent * , const std::string & );
......@@ -397,7 +397,7 @@ signals:
/** Called by the plugins if they changed something in the object list (deleted, added,...)
* @param _identifier Id of the object
*/
void slotObjectUpdated(int _identifier, const UpdateType _type = UPDATE_ALL);
void slotObjectUpdated(int _identifier, const UpdateType& _type = UPDATE_ALL);
/// Called when a plugin changes the visibility of an object
void slotVisibilityChanged(int _id);
......
......@@ -73,7 +73,7 @@
/** This function is called by a plugin if it changed something in the object list (source,target,...). The information is passed to all plugins.
* @param _identifier Id of the updated object
*/
void Core::slotObjectUpdated(int _identifier, UpdateType _type) {
void Core::slotObjectUpdated(int _identifier, const UpdateType& _type) {
if ( OpenFlipper::Options::doSlotDebugging() ) {
if ( sender() != 0 ) {
if ( sender()->metaObject() != 0 ) {
......
......@@ -840,10 +840,10 @@ void Core::loadPlugin(QString filename, bool silent, QString& _licenseErrors, QO
connect(plugin,SIGNAL(updateView()),this,SLOT(updateView()));
if ( checkSignal(plugin,"updatedObject(int)") && checkSignal(plugin,"updatedObject(int,const UpdateType)") ){
if ( checkSignal(plugin,"updatedObject(int)") && checkSignal(plugin,"updatedObject(int,const UpdateType&)") ){
log(LOGERR,tr("Plugin uses deprecated and(!) new updatedObject. Only new updatedObject will be active."));
connect(plugin,SIGNAL(updatedObject(int,const UpdateType)),this,SLOT(slotObjectUpdated(int,const UpdateType)), Qt::DirectConnection);
connect(plugin,SIGNAL(updatedObject(int,const UpdateType&)),this,SLOT(slotObjectUpdated(int,const UpdateType&)), Qt::DirectConnection);
} else {
......@@ -852,14 +852,14 @@ void Core::loadPlugin(QString filename, bool silent, QString& _licenseErrors, QO
connect(plugin,SIGNAL(updatedObject(int)),this,SLOT(slotObjectUpdated(int)), Qt::DirectConnection);
}
if ( checkSignal(plugin,"updatedObject(int,const UpdateType)") )
connect(plugin,SIGNAL(updatedObject(int,const UpdateType)),this,SLOT(slotObjectUpdated(int,const UpdateType)), Qt::DirectConnection);
if ( checkSignal(plugin,"updatedObject(int,const UpdateType&)") )
connect(plugin,SIGNAL(updatedObject(int,const UpdateType&)),this,SLOT(slotObjectUpdated(int,const UpdateType&)), Qt::DirectConnection);
}
if ( checkSlot( plugin , "slotObjectUpdated(int)" ) && checkSlot( plugin , "slotObjectUpdated(int,const UpdateType)" ) ){
if ( checkSlot( plugin , "slotObjectUpdated(int)" ) && checkSlot( plugin , "slotObjectUpdated(int,const UpdateType&)" ) ){
log(LOGERR,tr("Plugin uses deprecated and(!) new slotObjectUpdated. Only new slotObjectUpdated will be active."));
connect(this,SIGNAL(signalObjectUpdated(int,const UpdateType)),plugin,SLOT(slotObjectUpdated(int,const UpdateType)), Qt::DirectConnection);
connect(this,SIGNAL(signalObjectUpdated(int,const UpdateType&)),plugin,SLOT(slotObjectUpdated(int,const UpdateType&)), Qt::DirectConnection);
} else {
......@@ -868,8 +868,8 @@ void Core::loadPlugin(QString filename, bool silent, QString& _licenseErrors, QO
connect(this,SIGNAL(signalObjectUpdated(int)),plugin,SLOT(slotObjectUpdated(int)), Qt::DirectConnection);
}
if ( checkSlot( plugin , "slotObjectUpdated(int,const UpdateType)" ) )
connect(this,SIGNAL(signalObjectUpdated(int,const UpdateType)),plugin,SLOT(slotObjectUpdated(int,const UpdateType)), Qt::DirectConnection);
if ( checkSlot( plugin , "slotObjectUpdated(int,const UpdateType&)" ) )
connect(this,SIGNAL(signalObjectUpdated(int,const UpdateType&)),plugin,SLOT(slotObjectUpdated(int,const UpdateType&)), Qt::DirectConnection);
}
if ( checkSignal(plugin,"objectPropertiesChanged(int)")) {
......
......@@ -73,7 +73,7 @@ Q_INTERFACES(ContextMenuInterface)
signals:
// BaseInterface
void updateView();
void updatedObject(int _identifier, const UpdateType _type);
void updatedObject(int _identifier, const UpdateType& _type);
// LoggingInterface
void log(Logtype _type, QString _message);
......
......@@ -347,7 +347,7 @@ void DataControlPlugin::slotObjectPropertiesChanged( int _identifier ){
*
* @param _identifier id of an object
*/
void DataControlPlugin::slotObjectUpdated( int /*_identifier*/ , const UpdateType /*_type*/ ){
void DataControlPlugin::slotObjectUpdated( int /*_identifier*/ , const UpdateType& /*_type*/ ){
}
......
......@@ -80,7 +80,7 @@ class DataControlPlugin : public QObject, BaseInterface, ToolboxInterface, KeyIn
signals:
// BaseInterface
void updateView();
void updatedObject(int _it, const UpdateType _type);
void updatedObject(int _it, const UpdateType& _type);
void setSlotDescription(QString _slotName, QString _slotDescription,
QStringList _parameters, QStringList _descriptions);
......@@ -105,7 +105,7 @@ class DataControlPlugin : public QObject, BaseInterface, ToolboxInterface, KeyIn
// BaseInterface
void initializePlugin();
void pluginsInitialized();
void slotObjectUpdated ( int _identifier , const UpdateType _type);
void slotObjectUpdated ( int _identifier , const UpdateType& _type);
void slotVisibilityChanged ( int _identifier );
void slotObjectSelectionChanged ( int _identifier );
void slotObjectPropertiesChanged( int _identifier );
......
......@@ -674,7 +674,7 @@ void DecimaterPlugin::slotObjectSelectionChanged(int /*_identifier*/)
//-----------------------------------------------------------------------------
void DecimaterPlugin::slotObjectUpdated(int /*_identifier*/ , const UpdateType _type )
void DecimaterPlugin::slotObjectUpdated(int /*_identifier*/ , const UpdateType& _type )
{
if ( _type.contains(UPDATE_TOPOLOGY) ) {
slotUpdateNumVertices ();
......
......@@ -95,7 +95,7 @@ signals:
// BaseInterface
void updateView();
void updatedObject(int _id, const UpdateType _type);
void updatedObject(int _id, const UpdateType& _type);
void setSlotDescription(QString _slotName, QString _slotDescription,
QStringList _parameters, QStringList _descriptions);
......@@ -121,7 +121,7 @@ private slots:
void initializePlugin();
void pluginsInitialized();
void slotObjectUpdated( int _identifier , const UpdateType _type ); // BaseInterface
void slotObjectUpdated( int _identifier , const UpdateType& _type ); // BaseInterface
void slotObjectSelectionChanged( int _identifier ); // BaseInterface
public :
......
......@@ -70,7 +70,7 @@ class FileLightPlugin : public QObject, BaseInterface, FileInterface, LoadSaveIn
void log(Logtype _type, QString _message);
void log(QString _message);
void updatedObject(int _id, const UpdateType _type);
void updatedObject(int _id, const UpdateType& _type);
private slots:
......
......@@ -90,7 +90,7 @@ signals:
// -- LoadSave Interface --
void addEmptyObject( DataType _type, int &_id );
void updatedObject( int _identifier, const UpdateType _type);
void updatedObject( int _identifier, const UpdateType& _type);
//-- Logging Interface --
void log( Logtype _type, QString _message );
......
......@@ -70,7 +70,7 @@ class FileSPHPlugin : public QObject, BaseInterface, FileInterface, LoadSaveInte
void log(Logtype _type, QString _message);
void log(QString _message);
void updatedObject(int _id, const UpdateType _type);
void updatedObject(int _id, const UpdateType& _type);
private slots:
......
......@@ -718,7 +718,7 @@ bool InfoMeshObjectPlugin::getEdgeLengths(int _id, double &min, double &max, dou
//------------------------------------------------------------------------------
void InfoMeshObjectPlugin::slotObjectUpdated( int /*_identifier*/ , const UpdateType _type){
void InfoMeshObjectPlugin::slotObjectUpdated( int /*_identifier*/ , const UpdateType& _type){
if ( (PluginFunctions::objectCount() == 1) || (PluginFunctions::targetCount() == 1) ){
......
......@@ -98,7 +98,7 @@ class InfoMeshObjectPlugin : public QObject, BaseInterface, InformationInterface
// BaseInterface
void initializePlugin();
void pluginsInitialized();
void slotObjectUpdated( int _identifier, const UpdateType _type );
void slotObjectUpdated( int _identifier, const UpdateType& _type );
void slotObjectSelectionChanged( int _identifier );
void slotAllCleared();
......
......@@ -77,7 +77,7 @@ signals:
//BaseInterface
void updateView();
void updatedObject(int _id, const UpdateType _type);
void updatedObject(int _id, const UpdateType& _type);
void setSlotDescription(QString _slotName, QString _slotDescription,
QStringList _parameters, QStringList _descriptions);
......
......@@ -73,7 +73,7 @@ signals:
void updateView();
// Base Interface
void updatedObject(int _identifier, const UpdateType _type);
void updatedObject(int _identifier, const UpdateType& _type);
void setSlotDescription(QString _slotName, QString _slotDescription,
QStringList _parameters, QStringList _descriptions);
......
......@@ -63,7 +63,7 @@ class PrimitivesGeneratorPlugin: public QObject, BaseInterface, LoggingInterface
//BaseInterface
void updateView();
void updatedObject(int _id, const UpdateType _type);
void updatedObject(int _id, const UpdateType& _type);
void setSlotDescription(QString _slotName, QString _slotDescription,
QStringList _parameters, QStringList _descriptions);
......
......@@ -75,7 +75,7 @@ signals:
//BaseInterface
void updateView();
void updatedObject(int _id, const UpdateType _type);
void updatedObject(int _id, const UpdateType& _type);
void setSlotDescription(QString _slotName, QString _slotDescription,
QStringList _parameters, QStringList _descriptions);
......
......@@ -88,7 +88,7 @@ signals:
// BaseInterface
void updateView();
void updatedObject(int, const UpdateType);
void updatedObject(int, const UpdateType&);
void nodeVisibilityChanged(int _identifier);
void setSlotDescription(QString _slotName, QString _slotDescription,
QStringList _parameters, QStringList _descriptions);
......
......@@ -88,7 +88,7 @@ signals:
// BaseInterface
void updateView();
void updatedObject(int, const UpdateType);
void updatedObject(int, const UpdateType&);
void nodeVisibilityChanged(int _identifier);
void setSlotDescription(QString _slotName, QString _slotDescription,
QStringList _parameters, QStringList _descriptions);
......
......@@ -91,7 +91,7 @@ signals:
// BaseInterface
void updateView();
void updatedObject(int, const UpdateType);
void updatedObject(int, const UpdateType&);
void nodeVisibilityChanged(int _identifier);
void setSlotDescription(QString _slotName, QString _slotDescription,
QStringList _parameters, QStringList _descriptions);
......
......@@ -87,7 +87,7 @@ signals:
// BaseInterface
void updateView();
void updatedObject(int, const UpdateType);
void updatedObject(int, const UpdateType&);
void nodeVisibilityChanged(int _identifier);
void setSlotDescription(QString _slotName, QString _slotDescription,
QStringList _parameters, QStringList _descriptions);
......
......@@ -65,7 +65,7 @@ class SmootherPlugin : public QObject, BaseInterface, ToolboxInterface, LoggingI
signals:
//BaseInterface
void updateView();
void updatedObject(int _id, const UpdateType _type);
void updatedObject(int _id, const UpdateType& _type);
void setSlotDescription(QString _slotName, QString _slotDescription,
QStringList _parameters, QStringList _descriptions);
......
......@@ -392,7 +392,7 @@ void SkeletalAnimationPlugin::UpdateSkins(BaseObjectData *_skeletonObject, Anima
/**
* @brief Check activePose if a skeleton was updated
*/
void SkeletalAnimationPlugin::slotObjectUpdated( int _id, const UpdateType /*_type*/ )
void SkeletalAnimationPlugin::slotObjectUpdated( int _id, const UpdateType& /*_type*/ )
{
// do nothing during animation
if ( animationTimer_.isActive() )
......
......@@ -82,7 +82,7 @@ signals:
void log(Logtype _type, QString _message);
void log(QString _message);
void addEmptyObject(DataType _type, int& _id);
void updatedObject(int _id, const UpdateType _type);
void updatedObject(int _id, const UpdateType& _type);
void pluginExists(QString _pluginName, bool &_exists);
void functionExists(QString _pluginName, QString _functionName, bool &_exists);
......@@ -93,7 +93,7 @@ signals:
public slots:
// BaseInterface
void slotAllCleared();
void slotObjectUpdated( int _id, const UpdateType _type);
void slotObjectUpdated( int _id, const UpdateType& _type);
void slotObjectSelectionChanged(int _id);
// LoadSaveInterface
void fileOpened(int _id);
......
......@@ -177,7 +177,7 @@ void SkeletonEditingPlugin::pluginsInitialized() {
//------------------------------------------------------------------------------
void SkeletonEditingPlugin::slotObjectUpdated( int _id, const UpdateType _type){
void SkeletonEditingPlugin::slotObjectUpdated( int _id, const UpdateType& _type){
if ( !_type.contains(UPDATE_GEOMETRY) )
return;
......
......@@ -42,7 +42,7 @@ class SkeletonEditingPlugin : public QObject, BaseInterface, MouseInterface, Key
signals:
// BaseInterface
void updateView();
void updatedObject(int, const UpdateType _type);
void updatedObject(int, const UpdateType& _type);
void nodeVisibilityChanged(int);
void setRenderer(unsigned int _viewer, QString _rendererName);
......@@ -88,7 +88,7 @@ class SkeletonEditingPlugin : public QObject, BaseInterface, MouseInterface, Key
// BaseInterface
void initializePlugin();
void pluginsInitialized();
void slotObjectUpdated( int _id, const UpdateType _type);
void slotObjectUpdated( int _id, const UpdateType& _type);
// MouseInterface
void slotMouseWheelEvent(QWheelEvent * _event, const std::string & _mode);
......
......@@ -89,7 +89,7 @@ signals:
// BaseInterface
void updateView();
void updatedObject(int, const UpdateType);
void updatedObject(int, const UpdateType&);
void setSlotDescription(QString _slotName, QString _slotDescription,
QStringList _parameters, QStringList _descriptions);
......
......@@ -85,7 +85,7 @@ class SplatCloudRenderingControlPlugin : public QObject, BaseInterface, ToolboxI
signals:
//-- Base Interface --
void updatedObject( int _identifier, const UpdateType _type);
void updatedObject( int _identifier, const UpdateType& _type);
//-- Toolbox Interface --
void addToolbox( QString _name, QWidget *_widget, QIcon *_icon );
......
......@@ -71,7 +71,7 @@ class SubdividerPlugin : public QObject, BaseInterface , ToolboxInterface, Loggi
signals:
void updateView();
void updatedObject(int _id, const UpdateType _type);
void updatedObject(int _id, const UpdateType& _type);
void addPickMode( const std::string _mode );
......
......@@ -55,7 +55,7 @@ class TestPlugin: public QObject, BaseInterface, LoggingInterface {
signals:
//BaseInterface
void updateView();
void updatedObject(int _id, const UpdateType _type);
void updatedObject(int _id, const UpdateType& _type);
//LoggingInterface
void log(Logtype _type, QString _message);
......
......@@ -191,7 +191,7 @@ void TypeSplatCloudPlugin::slotViewChanged()
//----------------------------------------------------------------
void TypeSplatCloudPlugin::slotObjectUpdated( int _objectId, const UpdateType _type )
void TypeSplatCloudPlugin::slotObjectUpdated( int _objectId, const UpdateType& _type )
{
if( _objectId == -1 )
return;
......
......@@ -91,7 +91,7 @@ private slots:
// -- Base Inferface --
void noguiSupported() { }
void slotViewChanged();
void slotObjectUpdated( int _objectId, const UpdateType _type );
void slotObjectUpdated( int _objectId, const UpdateType& _type );
public:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment