Commit 814542ee authored by Jan Möbius's avatar Jan Möbius

Added copyObject to LoadSaveInterface ( just a skeleton)


git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@5840 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 478e4c5a
......@@ -74,6 +74,13 @@ class LoadSaveInterface {
*/
virtual void addEmptyObject( DataType /*_type*/, int& /*_id*/) {};
/** Create a copy of an existing object
*
* @param _oldId id of the object to copy
* @param _newId id of the new object created
*/
virtual void copyObject( int /*_oldId*/, int& /*_newId*/) {};
/**
*
* @param _id Object to Save
......
......@@ -487,9 +487,12 @@ private:
/// Slot adding empty object from Menu
void slotAddEmptyObjectMenu();
/// Slot adding empty object from Menu of a given type
/// Slot adding empty object of a given type
void slotAddEmptyObject( DataType _type , int& _id );
/// Slot copying an object
void slotCopyObject( int _oldId , int& _newId );
/// Exit Application
void slotExit();
......
......@@ -895,6 +895,10 @@ void Core::loadPlugin(QString filename, bool silent){
connect(plugin , SIGNAL( addEmptyObject( DataType, int& )) ,
this , SLOT( slotAddEmptyObject( DataType, int&) ),Qt::DirectConnection);
if ( checkSignal(plugin,"copyObject(int,int&)" ) )
connect(plugin , SIGNAL( copyObject( int, int& )) ,
this , SLOT( slotCopyObject( int, int&) ),Qt::DirectConnection);
if ( checkSignal(plugin,"emptyObjectAdded(int)" ) )
connect(plugin , SIGNAL( emptyObjectAdded( int ) ) ,
this , SLOT( slotEmptyObjectAdded ( int ) ),Qt::DirectConnection);
......
......@@ -181,6 +181,14 @@ void Core::slotAddEmptyObject( DataType _type , int& _id ) {
_id = addEmptyObject( _type );
}
/// Slot creating a copy of an existing object
void slotCopyObject( int _oldId , int& _newId ) {
std::cerr << "slotCopyObject" << std::endl;
_newId = 99;
}
/// Slot for loading a given file
void Core::slotLoad(QString _filename, DataType _type, int& _id) {
_id = loadObject(_type,_filename);
......
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