Commit 6c1035c3 authored by Jan Möbius's avatar Jan Möbius
Browse files


git-svn-id: 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 0e3c778a
......@@ -436,7 +436,11 @@ public slots:
* @{ */
/** Load a new Object ( this may also be an ini file )
/** \brief Load a new Object ( this may also be an ini or ofs file )
* This function tries to get the type of data to be loaded from the filename
* and then load the file.
* @param _filename Filename of the data
* @return id of object otherwise -1
......@@ -499,7 +503,11 @@ private:
int addEmptyObject( DataType _type );
/** Load object of the given Type with given filename
/** \brief Load object of the given Type with given filename
* This function should not be used anymore. \n
* The extension is now used to check for the plugin handling the given types.
* @return id of the new object or -1 if unsupported
int loadObject( DataType _type, QString _filename);
......@@ -177,9 +177,14 @@ void Core::slotExecuteAfterStartup() {
/// Load object by guessing DataType depending on the files extension
int Core::loadObject ( QString _filename ) {
int Core::loadObject ( QString _filename ) {
/** \todo Check if this function is ok. It should check all plugins for the given files and do not depend
on Triangle meshes only!
Rewrite function to get the plugin only and then open the file. So iterate over all plugins and find the
matching ones. open it with this plugin.
if (_filename.endsWith(".ini")) {
// Load all information from the given ini file
......@@ -201,6 +206,9 @@ int Core::loadObject ( QString _filename ) {
/// Function for loading a given file
int Core::loadObject( DataType _type, QString _filename) {
/** \todo this function has to be checked. test for the plugin which can handle
the given file and then use it.
if (_type == DATA_UNKNOWN)
return loadObject(_filename);
Supports Markdown
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