diff -r 36eb4b8f409e -r 1ad892c1a709 vymmodel.cpp --- a/vymmodel.cpp Thu Feb 25 11:03:52 2010 +0000 +++ b/vymmodel.cpp Tue Mar 02 13:59:19 2010 +0000 @@ -4258,14 +4258,21 @@ } } -void VymModel::exportHTML (const QString &dir, bool askForName) //FIXME-2 own dialogue missing and also option to save settings in map -{ - ExportHTMLDialog dia(NULL); +void VymModel::exportHTML (const QString &dir, bool useDialog) +{ + ExportHTML ex (this); + ex.setDir (dir); + ex.doExport(useDialog); +} + +void VymModel::exportXHTML (const QString &dir, bool askForName) +{ + ExportXHTMLDialog dia(NULL); dia.setFilePath (filePath ); dia.setMapName (mapName ); dia.readSettings(); if (dir!="") dia.setDir (dir); - QDir d; + bool ok=true; if (askForName) @@ -4274,7 +4281,7 @@ ok=false; else { - d=dia.getDir(); + QDir d (dia.getDir()); // Check, if warnings should be used before overwriting // the output directory if (d.exists() && d.count()>0) @@ -4285,75 +4292,21 @@ "The directory %1 is not empty.\n" "Do you risk to overwrite some of its contents?").arg(d.path() )); warn.setCaption("Warning: Directory not empty"); - warn.setShowAgainName("mainwindow/export-XML-overwrite-dir"); + warn.setShowAgainName("mainwindow/overwrite-dir-xhtml"); if (warn.exec()!=QDialog::Accepted) ok=false; } } } + if (ok) { - // Hide stuff during export, if settings want this - setExportMode (true); - - ExportHTML ex (this); - ex.setFile (d.path()+"/"+mapName+".html"); - //qDebug()<< "VM::exportHTML writing "<0) - { - WarningDialog warn; - warn.showCancelButton (true); - warn.setText(QString( - "The directory %1 is not empty.\n" - "Do you risk to overwrite some of its contents?").arg(d.path() )); - warn.setCaption("Warning: Directory not empty"); - warn.setShowAgainName("mainwindow/overwrite-dir-xhtml"); - - if (warn.exec()!=QDialog::Accepted) ok=false; - } - } - } - - if (ok) - { - exportXML (dia.getDir(),false ); - dia.doExport(mapName ); - //if (dia.hasChanged()) setChanged(); - } -} - void VymModel::exportOOPresentation(const QString &fn, const QString &cf) { ExportOO ex; @@ -4695,7 +4648,7 @@ } -void VymModel::animate() //FIXME-2 animation causes flicker after cut/undo cut ?!? +void VymModel::animate() { animationTimer->stop(); BranchObj *bo; @@ -4724,7 +4677,6 @@ void VymModel::startAnimation(BranchObj *bo, const QPointF &start, const QPointF &dest) { - qDebug()<<"Start animation for "<getTreeItem()<getTreeItem()->depth()>0) {