From: <tim...@us...> - 2005-12-07 17:32:02
|
Update of /cvsroot/qgis/plugins/openmodeller In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17546 Modified Files: omguimain.cpp Log Message: Load project files works Index: omguimain.cpp =================================================================== RCS file: /cvsroot/qgis/plugins/openmodeller/omguimain.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** omguimain.cpp 7 Dec 2005 17:18:43 -0000 1.13 --- omguimain.cpp 7 Dec 2005 17:31:48 -0000 1.14 *************** *** 352,354 **** --- 352,379 ---- myQSettings.writeEntry("/openmodeller/lastSavedProject",myFileName); + QFile myFile( myFileName ); + if ( myFile.open( IO_ReadOnly ) ) + { + mModelVector.clear(); + QTextStream myStream( &myFile ); + while ( !myStream.atEnd() ) + { + QString myText = myStream.readLine(); // line of text excluding '\n' + //see if we are at the start of the record + if (myText.compare(QString("---"))==0) + { + QString myImageFileName = myStream.readLine(); + QString myLogFileName = myStream.readLine(); + QString myTaxonName = myStream.readLine(); + ModelResult myModelResult; + myModelResult.imageFileName=myImageFileName; + myModelResult.logFileName=myLogFileName; + myModelResult.taxonName=myTaxonName; + mModelVector.push_back(myModelResult); + + } + } + myFile.close(); + } + btnFirst_clicked(); } |