Commit 8f58bde6 authored by Dirk Wilden's avatar Dirk Wilden

changes needed for backups and selections

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@11275 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 7014b4bc
......@@ -62,60 +62,19 @@
// === Backup Communication ============================
//========================================================================================
void Core::slotBackupGroup(QString _name, int& _groupId ) {
if ( sender() != 0 ) {
if ( sender()->metaObject() != 0 ) {
_name = QString(sender()->metaObject()->className()) + ": " + _name;
if ( OpenFlipper::Options::doSlotDebugging() )
emit log(LOGINFO,"slotBackupGroup( " + _name + " ) called by " + QString( sender()->metaObject()->className() ) );
}
}
/// Slot for generating type specific backups
void Core::slotGenerateBackup( int _id, QString _name, UpdateType _type ) {
_groupId = nextBackupGroupId_;
emit createBackupGroup( _name , nextBackupGroupId_);
++nextBackupGroupId_;
}
/// Called if a backup is requested by the plugins
void Core::slotBackup( int _objectId, QString _name, int& _internalId, int _groupId ) {
if ( sender() != 0 ) {
if ( sender()->metaObject() != 0 ) {
_name = QString(sender()->metaObject()->className()) + ": " + _name;
if ( OpenFlipper::Options::doSlotDebugging() )
emit log(LOGINFO,"slotBackup( " + QString::number(_objectId) + ", " + _name + "," + QString::number(_internalId) + (" ) called by ") + QString( sender()->metaObject()->className() ) );
}
}
BaseObjectData* obj = 0;
PluginFunctions::getObject(_id, obj);
_internalId = nextBackupId_;
emit createBackup( _objectId , _name , nextBackupId_, _groupId);
++nextBackupId_;
}
/// Called if a backup is requested by the plugins (convenience function without getting id of the object)
void Core::slotBackup( int _objectId, QString _name ) {
if ( sender() != 0 ) {
if ( sender()->metaObject() != 0 ) {
_name = QString(sender()->metaObject()->className()) + ": " + _name;
if ( OpenFlipper::Options::doSlotDebugging() )
emit log(LOGINFO,"slotBackup( " + QString::number(_objectId) + ", " + _name + tr(" ) called by ") + QString( sender()->metaObject()->className() ) );
}
}
if (obj == 0)
return;
emit createBackup( _objectId , _name , nextBackupId_);
++nextBackupId_;
}
void Core::slotRestoreGroup( int _groupId) {
emit restoreGroup(_groupId);
}
void Core::slotRestore( int _objectId, int _internalId ) {
emit restoreObject(_objectId,_internalId);
// Type plugins
for (int i=0; i < (int)supportedDataTypes_.size(); i++)
if ( supportedDataTypes_[i].type & obj->dataType() )
supportedDataTypes_[i].plugin->generateBackup(_id, _name, _type);
}
//=============================================================================
......@@ -285,7 +285,7 @@ signals:
void showFloodFillSelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes);
/// SelectionInterface: This signal is emitted when standard toggle selection has been performed
void toggleSelection(QPoint _position, SelectionInterface::PrimitiveType _currentType, bool _deselect);
void toggleSelection(QMouseEvent* _event, SelectionInterface::PrimitiveType _currentType, bool _deselect);
/// SelectionInterface: This signal is emitted when standard lasso selection has been performed
void lassoSelection(QMouseEvent* _event, SelectionInterface::PrimitiveType _currentType, bool _deselect);
......@@ -297,13 +297,13 @@ signals:
void surfaceLassoSelection(QMouseEvent* _event, SelectionInterface::PrimitiveType _currentType, bool _deselect);
/// SelectionInterface: This signal is emitted when standard sphere selection has been performed
void sphereSelection(QPoint _position, double _radius, SelectionInterface::PrimitiveType _currentType, bool _deselect);
void sphereSelection(QMouseEvent* _event, double _radius, SelectionInterface::PrimitiveType _currentType, bool _deselect);
/// SelectionInterface: This signal is emitted when standard closest boundary selection has been performed
void closestBoundarySelection(QPoint _position, SelectionInterface::PrimitiveType _currentType, bool _deselect);
void closestBoundarySelection(QMouseEvent* _event, SelectionInterface::PrimitiveType _currentType, bool _deselect);
/// SelectionInterface: This signal is emitted when standard flood fill selection has been performed
void floodFillSelection(QPoint _position, double _maxAngle, SelectionInterface::PrimitiveType _currentType, bool _deselect);
void floodFillSelection(QMouseEvent* _event, double _maxAngle, SelectionInterface::PrimitiveType _currentType, bool _deselect);
/// SelectionInterface: This signal is emitted when a custom selection operation has been performed
void customSelection(QMouseEvent* _event, SelectionInterface::PrimitiveType _currentType, QString _customIdentifier, bool _deselect);
......@@ -347,33 +347,25 @@ signals:
/// This signal is emitted before the core deletes its data and exits
void saveOnExit( INIFile& _ini );
/// Tell plugins to create a backup group
void createBackupGroup( QString _name , int _groupId);
/// Tell plugins to create a backup
void createBackup( int _objectId , QString _name , int _internalId, int groupId = -1);
/// Tell Plugins to make a backup persistent
void makeBackupPersistent(int _objectid, int _internalId);
/// Tell Backup Plugin to restore a group with the given group id
void restoreGroup( int _groupId);
/// Tell Backup Plugin to restore an object with the given backup id
void restoreObject( int _objectId, int _internalId);
/** \brief Backup Plugin tells other Plugins that a restore will happen
*/
void aboutToRestore(int _objectId , int _internalId);
/// Tell backup-plugin to create a backup
void createBackup( int _objectid, QString _name, UpdateType _type = UPDATE_ALL);
void createBackup( IdList _objectids, QString _name, std::vector<UpdateType> _types);
/// Tell backup-plugin to undo/redo
void undo(int _objectid);
void redo(int _objectid);
void undo();
void redo();
/// Backup Plugin tells other Plugins that a restore will happen
void aboutToRestore(int _objectId, UpdateType _type);
/** \brief Backup Plugin tells other Plugins that they should restore their own data
*/
void restore(int _objectId , int _internalId);
/// Backup Plugin tells other Plugins that they should restore their own data
void restore(int _objectId, UpdateType _type);
/** \brief Backup Plugin tells other Plugins that a restore has happened
*/
void restored( int _objectId , int _internalId);
/// Backup Plugin tells other Plugins that a restore has happened
void restored( int _objectId, UpdateType _type);
/// Tell the plugins that a file has been opened ( -> Database)
void openedFile( int _id );
......@@ -481,21 +473,6 @@ signals:
///Called by plugins if a multi-texture's sub textures should be fetched
void slotGetSubTextures( int _id, QString _multiTextureName, QStringList& _subTextures );
/// Called if a backup group is requested by the plugins
void slotBackupGroup(QString _name, int& _groupId );
/// Called if a backup is requested by the plugins
void slotBackup( int _objectId, QString _name, int& _internalId, int _groupId = -1 );
/// Called if a backup is requested by the plugins
void slotBackup( int _objectId, QString _name );
/// Called if a group restore is requested by the plugins
void slotRestoreGroup( int _groupId);
/// Called if a backup is requested by the plugins
void slotRestore( int _objectId, int _internalId = -1 );
/// A plugin wants to load a given file
void slotLoad(QString _filename, DataType _type, int& _id);
......@@ -549,7 +526,7 @@ signals:
void slotShowFloodFillSelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes);
/// SelectionInterface: Called when toggle selection operation has been performed
void slotToggleSelection(QPoint _position, SelectionInterface::PrimitiveType _currentType, bool _deselect);
void slotToggleSelection(QMouseEvent* _event, SelectionInterface::PrimitiveType _currentType, bool _deselect);
/// SelectionInterface: Called when lasso selection operation has been performed
void slotLassoSelection(QMouseEvent* _event, SelectionInterface::PrimitiveType _currentType, bool _deselect);
......@@ -561,13 +538,13 @@ signals:
void slotSurfaceLassoSelection(QMouseEvent* _event, SelectionInterface::PrimitiveType _currentType, bool _deselect);
/// SelectionInterface: Called when sphere selection operation has been performed
void slotSphereSelection(QPoint _position, double _radius, SelectionInterface::PrimitiveType _currentType, bool _deselect);
void slotSphereSelection(QMouseEvent* _event, double _radius, SelectionInterface::PrimitiveType _currentType, bool _deselect);
/// SelectionInterface: Called when closest boundary selection operation has been performed
void slotClosestBoundarySelection(QPoint _position, SelectionInterface::PrimitiveType _currentType, bool _deselect);
void slotClosestBoundarySelection(QMouseEvent* _event, SelectionInterface::PrimitiveType _currentType, bool _deselect);
/// SelectionInterface: Called when flood fill selection operation has been performed
void slotFloodFillSelection(QPoint _position, double _maxAngle, SelectionInterface::PrimitiveType _currentType, bool _deselect);
void slotFloodFillSelection(QMouseEvent* _event, double _maxAngle, SelectionInterface::PrimitiveType _currentType, bool _deselect);
/// SelectionInterface: Called when custom selection operation has been performed
void slotCustomSelection(QMouseEvent* _event, SelectionInterface::PrimitiveType _currentType, QString _customIdentifier, bool _deselect);
......@@ -933,6 +910,9 @@ private slots:
/// Open Recent file
void slotRecentOpen(QAction* _action);
/// Slot for generating type specific backups
void slotGenerateBackup( int _id, QString _name, UpdateType _type );
public slots:
/// Add a Toolbox from a plugin or from scripting
......
......@@ -1126,13 +1126,13 @@ void Core::loadPlugin(QString filename, bool silent, QString& _licenseErrors, QO
connect(this , SIGNAL(showFloodFillSelectionMode(QString,bool,SelectionInterface::PrimitiveType)),
plugin , SLOT(slotShowFloodFillSelectionMode(QString,bool,SelectionInterface::PrimitiveType)),Qt::DirectConnection);
if ( checkSignal(plugin,"toggleSelection(QPoint,SelectionInterface::PrimitiveType,bool)") )
connect(plugin , SIGNAL(toggleSelection(QPoint,SelectionInterface::PrimitiveType,bool)),
this , SLOT(slotToggleSelection(QPoint,SelectionInterface::PrimitiveType,bool)),Qt::DirectConnection);
if ( checkSignal(plugin,"toggleSelection(QMouseEvent*,SelectionInterface::PrimitiveType,bool)") )
connect(plugin , SIGNAL(toggleSelection(QMouseEvent*,SelectionInterface::PrimitiveType,bool)),
this , SLOT(slotToggleSelection(QMouseEvent*,SelectionInterface::PrimitiveType,bool)),Qt::DirectConnection);
if ( checkSlot( plugin , "slotToggleSelection(QPoint,SelectionInterface::PrimitiveType,bool)" ) )
connect(this , SIGNAL(toggleSelection(QPoint,SelectionInterface::PrimitiveType,bool)),
plugin , SLOT(slotToggleSelection(QPoint,SelectionInterface::PrimitiveType,bool)),Qt::DirectConnection);
if ( checkSlot( plugin , "slotToggleSelection(QMouseEvent*,SelectionInterface::PrimitiveType,bool)" ) )
connect(this , SIGNAL(toggleSelection(QMouseEvent*,SelectionInterface::PrimitiveType,bool)),
plugin , SLOT(slotToggleSelection(QMouseEvent*,SelectionInterface::PrimitiveType,bool)),Qt::DirectConnection);
if ( checkSignal(plugin,"lassoSelection(QMouseEvent*,SelectionInterface::PrimitiveType,bool)") )
connect(plugin , SIGNAL(lassoSelection(QMouseEvent*,SelectionInterface::PrimitiveType,bool)),
......@@ -1158,29 +1158,29 @@ void Core::loadPlugin(QString filename, bool silent, QString& _licenseErrors, QO
connect(this , SIGNAL(surfaceLassoSelection(QMouseEvent*,SelectionInterface::PrimitiveType,bool)),
plugin , SLOT(slotSurfaceLassoSelection(QMouseEvent*,SelectionInterface::PrimitiveType,bool)),Qt::DirectConnection);
if ( checkSignal(plugin,"sphereSelection(QPoint,double,SelectionInterface::PrimitiveType,bool)") )
connect(plugin , SIGNAL(sphereSelection(QPoint,double,SelectionInterface::PrimitiveType,bool)),
this , SLOT(slotSphereSelection(QPoint,double,SelectionInterface::PrimitiveType,bool)),Qt::DirectConnection);
if ( checkSignal(plugin,"sphereSelection(QMouseEvent*,double,SelectionInterface::PrimitiveType,bool)") )
connect(plugin , SIGNAL(sphereSelection(QMouseEvent*,double,SelectionInterface::PrimitiveType,bool)),
this , SLOT(slotSphereSelection(QMouseEvent*,double,SelectionInterface::PrimitiveType,bool)),Qt::DirectConnection);
if ( checkSlot( plugin , "slotSphereSelection(QPoint,double,SelectionInterface::PrimitiveType,bool)" ) )
connect(this , SIGNAL(sphereSelection(QPoint,double,SelectionInterface::PrimitiveType,bool)),
plugin , SLOT(slotSphereSelection(QPoint,double,SelectionInterface::PrimitiveType,bool)),Qt::DirectConnection);
if ( checkSlot( plugin , "slotSphereSelection(QMouseEvent*,double,SelectionInterface::PrimitiveType,bool)" ) )
connect(this , SIGNAL(sphereSelection(QMouseEvent*,double,SelectionInterface::PrimitiveType,bool)),
plugin , SLOT(slotSphereSelection(QMouseEvent*,double,SelectionInterface::PrimitiveType,bool)),Qt::DirectConnection);
if ( checkSignal(plugin,"closestBoundarySelection(QPoint,SelectionInterface::PrimitiveType,bool)") )
connect(plugin , SIGNAL(closestBoundarySelection(QPoint,SelectionInterface::PrimitiveType,bool)),
this , SLOT(slotClosestBoundarySelection(QPoint,SelectionInterface::PrimitiveType,bool)),Qt::DirectConnection);
if ( checkSignal(plugin,"closestBoundarySelection(QMouseEvent*,SelectionInterface::PrimitiveType,bool)") )
connect(plugin , SIGNAL(closestBoundarySelection(QMouseEvent*,SelectionInterface::PrimitiveType,bool)),
this , SLOT(slotClosestBoundarySelection(QMouseEvent*,SelectionInterface::PrimitiveType,bool)),Qt::DirectConnection);
if ( checkSlot( plugin , "slotClosestBoundarySelection(QPoint,SelectionInterface::PrimitiveType,bool)" ) )
connect(this , SIGNAL(closestBoundarySelection(QPoint,SelectionInterface::PrimitiveType,bool)),
plugin , SLOT(slotClosestBoundarySelection(QPoint,SelectionInterface::PrimitiveType,bool)),Qt::DirectConnection);
if ( checkSlot( plugin , "slotClosestBoundarySelection(QMouseEvent*,SelectionInterface::PrimitiveType,bool)" ) )
connect(this , SIGNAL(closestBoundarySelection(QMouseEvent*,SelectionInterface::PrimitiveType,bool)),
plugin , SLOT(slotClosestBoundarySelection(QMouseEvent*,SelectionInterface::PrimitiveType,bool)),Qt::DirectConnection);
if ( checkSignal(plugin,"floodFillSelection(QPoint,double,SelectionInterface::PrimitiveType,bool)") )
connect(plugin , SIGNAL(floodFillSelection(QPoint,double,SelectionInterface::PrimitiveType,bool)),
this , SLOT(slotFloodFillSelection(QPoint,double,SelectionInterface::PrimitiveType,bool)),Qt::DirectConnection);
if ( checkSignal(plugin,"floodFillSelection(QMouseEvent*,double,SelectionInterface::PrimitiveType,bool)") )
connect(plugin , SIGNAL(floodFillSelection(QMouseEvent*,double,SelectionInterface::PrimitiveType,bool)),
this , SLOT(slotFloodFillSelection(QMouseEvent*,double,SelectionInterface::PrimitiveType,bool)),Qt::DirectConnection);
if ( checkSlot( plugin , "slotFloodFillSelection(QPoint,double,SelectionInterface::PrimitiveType,bool)" ) )
connect(this , SIGNAL(floodFillSelection(QPoint,double,SelectionInterface::PrimitiveType,bool)),
plugin , SLOT(slotFloodFillSelection(QPoint,double,SelectionInterface::PrimitiveType,bool)),Qt::DirectConnection);
if ( checkSlot( plugin , "slotFloodFillSelection(QMouseEvent*,double,SelectionInterface::PrimitiveType,bool)" ) )
connect(this , SIGNAL(floodFillSelection(QMouseEvent*,double,SelectionInterface::PrimitiveType,bool)),
plugin , SLOT(slotFloodFillSelection(QMouseEvent*,double,SelectionInterface::PrimitiveType,bool)),Qt::DirectConnection);
if ( checkSignal(plugin,"customSelection(QMouseEvent*,SelectionInterface::PrimitiveType,QString,bool)") )
connect(plugin , SIGNAL(customSelection(QMouseEvent*,SelectionInterface::PrimitiveType,QString,bool)),
......@@ -1420,72 +1420,75 @@ void Core::loadPlugin(QString filename, bool silent, QString& _licenseErrors, QO
if ( backupPlugin ) {
supported = supported + "Backups ";
// Incoming Signal that a backup group should be created
// send to local slot generating group id and delivers to all other plugins
if ( checkSignal( plugin , "createBackupGroup(QString,int&)" ) ) {
connect(plugin , SIGNAL(createBackupGroup(QString , int&)) ,
this , SLOT(slotBackupGroup(QString , int&)),Qt::DirectConnection );
// Incoming Signal that a backup should be created
if ( checkSignal( plugin , "createBackup(int,QString,UpdateType)" ) ) {
connect(plugin , SIGNAL(createBackup(int,QString,UpdateType)) ,
this , SIGNAL(createBackup(int,QString,UpdateType)),Qt::DirectConnection );
}
// Signal send from core to plugins that they should create a backup group
if ( checkSlot( plugin , "slotBackupGroup(QString,int)" ) ) {
connect(this , SIGNAL(createBackupGroup(QString,int)) ,
plugin , SLOT( slotBackupGroup(QString,int) ),Qt::DirectConnection);
// Signal send from core to plugins that they should create a backup
if ( checkSlot( plugin , "slotCreateBackup(int,QString,UpdateType)" ) ) {
connect(this , SIGNAL(createBackup(int,QString,UpdateType)),
plugin , SLOT( slotCreateBackup(int,QString,UpdateType) ),Qt::DirectConnection);
}
// Incoming Signal that a backup should be created
// send to local slot generating backup id and delivers to all other plugins
if ( checkSignal( plugin , "createBackup(int,QString,int&,int)" ) ) {
connect(plugin , SIGNAL(createBackup( int , QString , int&, int)) ,
this , SLOT(slotBackup( int , QString , int&, int)),Qt::DirectConnection );
if ( checkSignal( plugin , "createBackup(IdList,QString,std::vector<UpdateType>)" ) ) {
connect(plugin , SIGNAL(createBackup(IdList,QString,std::vector<UpdateType>)) ,
this , SIGNAL(createBackup(IdList,QString,std::vector<UpdateType>)),Qt::DirectConnection );
}
// send to local slot generating backup id and delivers to all other plugins
if ( checkSignal( plugin , "createBackup(int,QString)" ) ) {
connect(plugin , SIGNAL(createBackup( int , QString)) ,
this , SLOT(slotBackup( int , QString)),Qt::DirectConnection );
}
// Signal send from core to plugins that they should create a backup
if ( checkSlot( plugin , "slotBackup(int,QString,int,int)" ) ) {
connect(this , SIGNAL(createBackup(int,QString,int,int)) ,
plugin , SLOT( slotBackup(int,QString,int,int) ),Qt::DirectConnection);
if ( checkSlot( plugin , "slotCreateBackup(IdList,QString,std::vector<UpdateType>)" ) ) {
connect(this , SIGNAL(createBackup(IdList,QString,std::vector<UpdateType>)),
plugin , SLOT( slotCreateBackup(IdList,QString,std::vector<UpdateType>) ),Qt::DirectConnection);
}
// Signal send from plugin to core that a backup should be made persistent
if ( checkSignal( plugin , "makeBackupPersistent(int,int)" ) ) {
connect(plugin , SIGNAL(makeBackupPersistent(int,int)) ,
this , SIGNAL( makeBackupPersistent(int,int)) ,Qt::DirectConnection);
// Signal from plugin to restore an object with the given id
if ( checkSignal( plugin , "undo(int)" ) ) {
connect(plugin , SIGNAL(undo(int)) ,
this , SIGNAL(undo(int)),Qt::DirectConnection );
}
// Signal send from core to Backup plugin that the given backup should be persistent
if ( checkSlot( plugin , "slotMakeBackupPersistent(int,int)" ) ) {
connect(this , SIGNAL(makeBackupPersistent(int,int)) ,
plugin , SLOT( slotMakeBackupPersistent(int,int) ),Qt::DirectConnection);
// Signal send from core to backup plugin that it should restore the given object
if ( checkSlot( plugin , "slotUndo(int)" ) ) {
connect(this , SIGNAL(undo(int)),
plugin , SLOT( slotUndo(int) ),Qt::DirectConnection);
}
// Signal from plugin to restore an object with the given id
if ( checkSignal( plugin , "restoreObject(int,int)" ) ) {
connect(plugin , SIGNAL(restoreObject(int,int)) ,
this , SLOT(slotRestore( int , int)),Qt::DirectConnection );
if ( checkSignal( plugin , "redo(int)" ) ) {
connect(plugin , SIGNAL(redo(int)) ,
this , SIGNAL(redo(int)),Qt::DirectConnection );
}
// Signal send from core to backup plugin that it should restore the given object
if ( checkSlot( plugin , "slotRestoreObject(int,int)" ) ) {
connect(this , SIGNAL(restoreObject(int,int)) ,
plugin , SLOT( slotRestoreObject(int,int) ),Qt::DirectConnection);
if ( checkSlot( plugin , "slotRedo(int)" ) ) {
connect(this , SIGNAL(redo(int)),
plugin , SLOT( slotRedo(int) ),Qt::DirectConnection);
}
// Signal from plugin to restore an object with the given id
if ( checkSignal( plugin , "undo()" ) ) {
connect(plugin , SIGNAL(undo()) ,
this , SIGNAL(undo()),Qt::DirectConnection );
}
// Signal send from core to backup plugin that it should restore the given object
if ( checkSlot( plugin , "slotUndo()" ) ) {
connect(this , SIGNAL(undo()),
plugin , SLOT( slotUndo() ),Qt::DirectConnection);
}
// Signal from plugin to restore a group with the given id
if ( checkSignal( plugin , "restoreGroup(int)" ) ) {
connect(plugin , SIGNAL(restoreGroup(int)) ,
this , SLOT(slotRestoreGroup(int)),Qt::DirectConnection );
// Signal from plugin to restore an object with the given id
if ( checkSignal( plugin , "redo()" ) ) {
connect(plugin , SIGNAL(redo()) ,
this , SIGNAL(redo()),Qt::DirectConnection );
}
// Signal send from core to backup plugin that it should restore the given group
if ( checkSlot( plugin , "slotRestoreGroup(int)" ) ) {
connect(this , SIGNAL(restoreGroup(int)) ,
plugin , SLOT( slotRestoreGroup(int) ),Qt::DirectConnection);
// Signal send from core to backup plugin that it should restore the given object
if ( checkSlot( plugin , "slotRedo()" ) ) {
connect(this , SIGNAL(redo()),
plugin , SLOT( slotRedo() ),Qt::DirectConnection);
}
//====================================================================================
......@@ -1493,21 +1496,21 @@ void Core::loadPlugin(QString filename, bool silent, QString& _licenseErrors, QO
//====================================================================================
// Stage one : restore will happen soon
if ( checkSignal( plugin , "aboutToRestore(int,int)" ) ) {
connect(plugin , SIGNAL( aboutToRestore(int,int)) ,
this , SIGNAL( aboutToRestore(int,int) ),Qt::DirectConnection);
if ( checkSignal( plugin , "aboutToRestore(int,UpdateType)" ) ) {
connect(plugin , SIGNAL( aboutToRestore(int,UpdateType)) ,
this , SIGNAL( aboutToRestore(int,UpdateType) ),Qt::DirectConnection);
}
// Stage two: Core restore done, plugins should restore
if ( checkSignal( plugin , "restore(int,int)" ) ) {
connect(plugin , SIGNAL(restore(int,int)) ,
this , SIGNAL( restore(int,int) ),Qt::DirectConnection);
if ( checkSignal( plugin , "restore(int,UpdateType)" ) ) {
connect(plugin , SIGNAL(restore(int,UpdateType)) ,
this , SIGNAL( restore(int,UpdateType) ),Qt::DirectConnection);
}
// Stage three: Restore complete
if ( checkSignal( plugin , "restored(int,int)" ) ) {
connect(plugin , SIGNAL(restored(int,int)) ,
this , SIGNAL( restored(int,int) ),Qt::DirectConnection);
if ( checkSignal( plugin , "restored(int,UpdateType)" ) ) {
connect(plugin , SIGNAL(restored(int,UpdateType)) ,
this , SIGNAL( restored(int,UpdateType) ),Qt::DirectConnection);
}
//====================================================================================
......@@ -1515,23 +1518,28 @@ void Core::loadPlugin(QString filename, bool silent, QString& _licenseErrors, QO
//====================================================================================
// Stage one : restore will happen soon
if ( checkSlot( plugin , "slotAboutToRestore(int,int)" ) ) {
connect(this , SIGNAL( aboutToRestore(int,int)) ,
plugin , SLOT( slotAboutToRestore(int,int) ),Qt::DirectConnection);
if ( checkSlot( plugin , "slotAboutToRestore(int,UpdateType)" ) ) {
connect(this , SIGNAL( aboutToRestore(int,UpdateType)) ,
plugin , SLOT( slotAboutToRestore(int,UpdateType) ),Qt::DirectConnection);
}
// Stage one : restore will happen soon
if ( checkSlot( plugin , "slotRestore(int,int)" ) ) {
connect(this , SIGNAL( restore(int,int)) ,
plugin , SLOT( slotRestore(int,int) ),Qt::DirectConnection);
if ( checkSlot( plugin , "slotRestore(int,UpdateType)" ) ) {
connect(this , SIGNAL( restore(int,UpdateType)) ,
plugin , SLOT( slotRestore(int,UpdateType) ),Qt::DirectConnection);
}
// Stage one : restore will happen soon
if ( checkSlot( plugin , "slotRestored(int,int)" ) ) {
connect(this , SIGNAL( restored(int,int)) ,
plugin , SLOT( slotRestored(int,int) ),Qt::DirectConnection);
if ( checkSlot( plugin , "slotRestored(int,UpdateType)" ) ) {
connect(this , SIGNAL( restored(int,UpdateType)) ,
plugin , SLOT( slotRestored(int,UpdateType) ),Qt::DirectConnection);
}
// Signal from plugin to restore a group with the given id
if ( checkSignal( plugin , "generateBackup(int,QString,UpdateType)" ) ) {
connect(plugin , SIGNAL(generateBackup(int,QString,UpdateType)) ,
this , SLOT(slotGenerateBackup(int,QString,UpdateType)),Qt::DirectConnection );
}
}
//Check if the plugin supports LoadSave-Interface
......
......@@ -110,8 +110,8 @@ void Core::slotShowFloodFillSelectionMode(QString _handleName, bool _show, Selec
emit showFloodFillSelectionMode(_handleName, _show, _associatedTypes);
}
void Core::slotToggleSelection(QPoint _position, SelectionInterface::PrimitiveType _currentType, bool _deselect) {
emit toggleSelection(_position, _currentType, _deselect);
void Core::slotToggleSelection(QMouseEvent* _event, SelectionInterface::PrimitiveType _currentType, bool _deselect) {
emit toggleSelection(_event, _currentType, _deselect);
}
void Core::slotLassoSelection(QMouseEvent* _event, SelectionInterface::PrimitiveType _currentType, bool _deselect) {
......@@ -126,16 +126,16 @@ void Core::slotSurfaceLassoSelection(QMouseEvent* _event, SelectionInterface::Pr
emit surfaceLassoSelection(_event, _currentType, _deselect);
}
void Core::slotSphereSelection(QPoint _position, double _radius, SelectionInterface::PrimitiveType _currentType, bool _deselect) {
emit sphereSelection(_position, _radius, _currentType, _deselect);
void Core::slotSphereSelection(QMouseEvent* _event, double _radius, SelectionInterface::PrimitiveType _currentType, bool _deselect) {
emit sphereSelection(_event, _radius, _currentType, _deselect);
}
void Core::slotClosestBoundarySelection(QPoint _position, SelectionInterface::PrimitiveType _currentType, bool _deselect) {
emit closestBoundarySelection(_position, _currentType, _deselect);
void Core::slotClosestBoundarySelection(QMouseEvent* _event, SelectionInterface::PrimitiveType _currentType, bool _deselect) {
emit closestBoundarySelection(_event, _currentType, _deselect);
}
void Core::slotFloodFillSelection(QPoint _position, double _maxAngle, SelectionInterface::PrimitiveType _currentType, bool _deselect) {
emit floodFillSelection(_position, _maxAngle, _currentType, _deselect);
void Core::slotFloodFillSelection(QMouseEvent* _event, double _maxAngle, SelectionInterface::PrimitiveType _currentType, bool _deselect) {
emit floodFillSelection(_event, _maxAngle, _currentType, _deselect);
}
void Core::slotCustomSelection(QMouseEvent* _event, SelectionInterface::PrimitiveType _currentType, QString _customIdentifier, bool _deselect) {
......
......@@ -530,8 +530,7 @@ void Core::slotFileOpened ( int _id ) {
// ================================================================================
// Create initial backup
// ================================================================================
int backupId = 0;
slotBackup(_id,"Original Object",backupId);
emit createBackup(_id,"Original Object");
// ================================================================================
// Add the file to the recent files menu
......
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