Commit 1a319b86 authored by Jan Möbius's avatar Jan Möbius

Documentation

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@7645 383ad7c9-94d9-4d36-a494-682f7c89f535
parent ad03bdca
...@@ -450,7 +450,13 @@ private: ...@@ -450,7 +450,13 @@ private:
public : public :
/// Load an object from the commandline on application start /** \brief Load an object from the commandline on application start
*
* This function is called before the event queue is executed. The filename and parameters
* are stored. After the event queue is started, all files in this list will be opened.
* This is necessary as the event queue has to run to schedule the events emitted
* during open operations.
*/
void commandLineOpen(const char* _filename, bool asPolyMesh ); void commandLineOpen(const char* _filename, bool asPolyMesh );
/// Execute a script from the command Line /// Execute a script from the command Line
......
...@@ -84,6 +84,7 @@ void Core::resetScenegraph( bool _resetTrackBall ) { ...@@ -84,6 +84,7 @@ void Core::resetScenegraph( bool _resetTrackBall ) {
void Core::slotGetAllFilters ( QStringList& _list){ void Core::slotGetAllFilters ( QStringList& _list){
// Iterate over all types
for (int i=0; i < (int)supportedTypes_.size(); i++){ for (int i=0; i < (int)supportedTypes_.size(); i++){
QString f = supportedTypes_[i].plugin->getLoadFilters(); QString f = supportedTypes_[i].plugin->getLoadFilters();
f = f.section(")",0,0).section("(",1,1).trimmed(); f = f.section(")",0,0).section("(",1,1).trimmed();
...@@ -93,16 +94,17 @@ void Core::slotGetAllFilters ( QStringList& _list){ ...@@ -93,16 +94,17 @@ void Core::slotGetAllFilters ( QStringList& _list){
void Core::commandLineOpen(const char* _filename, bool asPolyMesh ){ void Core::commandLineOpen(const char* _filename, bool asPolyMesh ){
QString file(_filename); QString file(_filename);
if ( !file.startsWith("/") && !file.contains(":") ) { // Modify filename to containe full paths
if ( !file.startsWith("/") && !file.contains(":") ) {
file = QDir::currentPath(); file = QDir::currentPath();
file += OpenFlipper::Options::dirSeparator(); file += OpenFlipper::Options::dirSeparator();
file += _filename; file += _filename;
} }
commandLineFileNames_.push_back(std::pair< std::string , bool >(file.toStdString(), asPolyMesh)); // Add to the open list
commandLineFileNames_.push_back(std::pair< std::string , bool >(file.toStdString(), asPolyMesh));
} }
void Core::commandLineScript(const char* _filename ) { void Core::commandLineScript(const char* _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