1.1 --- a/exports.cpp Wed May 30 15:23:07 2007 +0000
1.2 +++ b/exports.cpp Tue Jun 19 14:20:29 2007 +0000
1.3 @@ -18,6 +18,7 @@
1.4 if (!tmpDir.exists() || !ok)
1.5 QMessageBox::critical( 0, QObject::tr( "Error" ),
1.6 QObject::tr("Couldn't access temporary directory\n"));
1.7 + cancelFlag=false;
1.8 }
1.9
1.10 ExportBase::~ExportBase()
1.11 @@ -36,6 +37,11 @@
1.12 outputFile=p;
1.13 }
1.14
1.15 +QString ExportBase::getFile ()
1.16 +{
1.17 + return outputFile;
1.18 +}
1.19 +
1.20 void ExportBase::setMapCenter(MapCenterObj *mc)
1.21 {
1.22 mapCenter=mc;
1.23 @@ -81,18 +87,24 @@
1.24 // save
1.25 break;;
1.26 case QMessageBox::Cancel:
1.27 - // return, do nothing
1.28 + cancelFlag=true;
1.29 return false;
1.30 break;
1.31 }
1.32 }
1.33 outputFile=fd->selectedFile();
1.34 + cancelFlag=false;
1.35 return true;
1.36 }
1.37 }
1.38 return false;
1.39 }
1.40
1.41 +bool ExportBase::canceled()
1.42 +{
1.43 + return cancelFlag;
1.44 +}
1.45 +
1.46 QString ExportBase::getSectionString(BranchObj *bostart)
1.47 {
1.48 // Make prefix like "2.5.3" for "bo:2,bo:5,bo:3"
1.49 @@ -112,6 +124,12 @@
1.50 }
1.51
1.52 ////////////////////////////////////////////////////////////////////////
1.53 +ExportASCII::ExportASCII()
1.54 +{
1.55 + filter="TXT (*.txt)";
1.56 + caption=vymName+ " -" +QObject::tr("Export as ASCII")+" "+QObject::tr("(still experimental)");
1.57 +}
1.58 +
1.59 void ExportASCII::doExport()
1.60 {
1.61 QFile file (outputFile);
1.62 @@ -178,7 +196,7 @@
1.63 // Main loop over all branches
1.64 QString s;
1.65 QString actIndent("");
1.66 - int i,j;
1.67 + int i;
1.68 BranchObj *bo;
1.69 bo=mapCenter->first();
1.70 while (bo)