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

Moved openedFile signal from LoadSaveInterface to FileInterface



git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@11010 383ad7c9-94d9-4d36-a494-682f7c89f535
parent b473b5cf
......@@ -62,6 +62,7 @@ class FileInterface {
/** @name Widgets
* @{ */
//===========================================================================
public:
/// Destructor
......@@ -120,6 +121,13 @@ public:
* @{ */
//===========================================================================
signals:
/** \brief file has been opened
* @param _id Id of the opened object
*/
virtual void openedFile( int /*_id*/ ) {};
public slots:
/** \brief Create an empty object
......
......@@ -66,7 +66,14 @@ class LoadSaveInterface {
virtual ~LoadSaveInterface() {};
signals :
/** Tries to load the file as a given type
/** \brief Save object to a file
*
* @param _id Object to Save
* @param _filename Filename to save it to (Leave as "" to automatically determine filename)
*/
virtual void save(int /*_id*/ , QString /*_filename*/ ) {}
/** \brief Load object from file with a specific DataType
*
* @param _filename Filename of the File to load
* @param _type Type to be loaded
......@@ -74,6 +81,7 @@ class LoadSaveInterface {
*/
virtual void load(QString /*_filename*/, DataType /*_type*/, int& /*_id*/) {};
/** Add an empty object of the given type
*
* @param _type Type to be created
......@@ -88,17 +96,6 @@ class LoadSaveInterface {
*/
virtual void copyObject( int /*_oldId*/, int& /*_newId*/) {};
/**
*
* @param _id Object to Save
* @param _filename Filename to save it to (Leave as "" to automatically determine filename)
*/
virtual void save(int /*_id*/ , QString /*_filename*/ ) {};
/** \brief file has been opened
* @param _id Id of the opened object
*/
virtual void openedFile( int /*_id*/ ) {};
/** \brief Emit this signal if an empty object has been created
* @param _id Id of the added object
......
......@@ -1318,10 +1318,6 @@ void Core::loadPlugin(QString filename, bool silent, QString& _licenseErrors, QO
connect(this , SIGNAL( openedFile( int) ) ,
plugin , SLOT( fileOpened( int ) ),Qt::DirectConnection);
if ( checkSignal(plugin,"openedFile(int)" ) )
connect(plugin , SIGNAL( openedFile( int ) ) ,
this , SLOT( slotObjectOpened ( int ) ),Qt::DirectConnection);
if ( checkSignal(plugin,"addEmptyObject(DataType,int&)" ) )
connect(plugin , SIGNAL( addEmptyObject( DataType, int& )) ,
this , SLOT( slotAddEmptyObject( DataType, int&) ),Qt::DirectConnection);
......@@ -1572,6 +1568,11 @@ void Core::loadPlugin(QString filename, bool silent, QString& _licenseErrors, QO
ft.saveMultipleObjects = checkSlot(plugin,"saveObjects(IdList,QString)");
supportedTypes_.push_back(ft);
if ( checkSignal(plugin,"openedFile(int)" ) )
connect(plugin , SIGNAL( openedFile( int ) ) ,
this , SLOT( slotObjectOpened ( int ) ),Qt::DirectConnection);
}
//Check if it's a typePlugin
......
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