diff -r 8fb5b3956b3e -r 10bd509b235c exports.cpp --- a/exports.cpp Wed Oct 24 12:21:24 2007 +0000 +++ b/exports.cpp Wed Jan 16 15:45:19 2008 +0000 @@ -42,9 +42,9 @@ return outputFile; } -void ExportBase::setMapCenter(MapCenterObj *mc) +void ExportBase::setModel(VymModel *m) { - mapCenter=mc; + model=m; } void ExportBase::setCaption (const QString &s) @@ -59,9 +59,10 @@ bool ExportBase::execDialog() { - if (mapCenter && mapCenter->getMapEditor()) + //MapEditor *me=model.getMapEditor(); FIXME needed? + // if (model->mapCenters.count() && me) { - QFileDialog *fd=new QFileDialog( mapCenter->getMapEditor(), caption); + QFileDialog *fd=new QFileDialog( 0, caption); fd->setFilter (filter); fd->setCaption(caption); fd->setMode( QFileDialog::AnyFile ); @@ -145,7 +146,7 @@ QString curIndent; int i; BranchObj *bo; - bo=mapCenter->first(); + bo=model->first(); while (bo) { // Make indentstring @@ -189,7 +190,7 @@ ts << QString (s+"\n"); } } - bo=bo->next(); + bo=model->next(bo); } file.close(); } @@ -221,7 +222,7 @@ QString curIndent(""); int i; BranchObj *bo; - bo=mapCenter->first(); + bo=model->first(); while (bo) { if (!bo->hasHiddenExportParent() ) @@ -242,7 +243,7 @@ ts << curIndent << "\"" << bo->getHeading()<<"\""<next(); + bo=model->next(bo); curIndent=""; } file.close(); @@ -251,8 +252,7 @@ //////////////////////////////////////////////////////////////////////// void ExportKDEBookmarks::doExport() { - MapEditor *me=NULL; - if (mapCenter) me=mapCenter->getMapEditor(); + MapEditor *me=model->getMapEditor(); if (me) { WarningDialog dia; @@ -287,8 +287,7 @@ //////////////////////////////////////////////////////////////////////// void ExportFirefoxBookmarks::doExport() { - MapEditor *me=NULL; - if (mapCenter) me=mapCenter->getMapEditor(); + MapEditor *me=model->getMapEditor(); if (me) { WarningDialog dia; @@ -327,8 +326,7 @@ //////////////////////////////////////////////////////////////////////// void ExportTaskjuggler::doExport() { - MapEditor *me=NULL; - if (mapCenter) me=mapCenter->getMapEditor(); + MapEditor *me=model->getMapEditor(); if (me) { me->exportXML(tmpDir.path(),false); @@ -364,7 +362,7 @@ // QString curIndent(""); // int i; BranchObj *bo; - bo=mapCenter->first(); + bo=model->first(); while (bo) { if (!bo->hasHiddenExportParent() ) { @@ -391,7 +389,7 @@ ts << ("\n"); } } - bo=bo->next(); + bo=model->next(bo); } file.close(); } @@ -443,6 +441,7 @@ { QString allPages; +/* FIXME not adapted to multiple mapCenters yet // Insert new content content.replace ("",quotemeta(mapCenter->getHeading())); content.replace ("",quotemeta(mapCenter->getAuthor())); @@ -506,6 +505,7 @@ // zip tmpdir to destination zipDir (tmpDir,outputFile); +*/ } bool ExportOO::setConfigFile (const QString &cf)