diff -r 38ad83f1d4ce -r 654ad4b03c5a mainwindow.cpp --- a/mainwindow.cpp Wed Mar 01 14:39:05 2006 +0000 +++ b/mainwindow.cpp Tue Mar 07 11:32:00 2006 +0000 @@ -64,6 +64,7 @@ #include "aboutdialog.h" #include "exporthtmldialog.h" #include "exportoofiledialog.h" +#include "exports.h" #include "exportxhtmldialog.h" #include "file.h" #include "flagrowobj.h" @@ -627,14 +628,14 @@ actionListBranches.append(a); // Import at selection (adding to selection) - a = new QAction( tr( "Add map at selection" ),tr( "Import (add)" ), 0, this, "importAdd" ); + a = new QAction( tr( "Add map at selection" ),tr( "Add map (insert)" ), 0, this, "importAdd" ); connect( a, SIGNAL( activated() ), this, SLOT( editImportAdd() ) ); a->setEnabled (false); actionListBranches.append(a); actionEditImportAdd=a; // Import at selection (replacing selection) - a = new QAction( tr( "Replace selection with map" ),tr( "Import (replace)" ), 0, this, "importReplace" ); + a = new QAction( tr( "Replace selection with map" ),tr( "Add map (replace)" ), 0, this, "importReplace" ); connect( a, SIGNAL( activated() ), this, SLOT( editImportReplace() ) ); a->setEnabled (false); actionListBranches.append(a); @@ -1170,16 +1171,24 @@ floatimageContextMenu->insertSeparator(); actionFormatHideLinkUnselected->addTo( floatimageContextMenu ); + exportMenu->insertItem ( tr("Export as Image"),exportImageFormatMenu); + a = new QAction( tr( "Export in Open Document Format used e.g. in Open Office " ), QPixmap(), "Open Office"+QString("..."), 0, this, "exportOOPresentation" ); connect( a, SIGNAL( activated() ), this, SLOT( fileExportOOPresentation() ) ); a->addTo (exportMenu); - exportMenu->insertItem ( tr("Export as Image"),exportImageFormatMenu); + a = new QAction( tr( "Export as webpage (XHTML)" ), QPixmap(), "Webpage (XHTML)...", ALT + Key_X, this, "exportXHTML" ); + connect( a, SIGNAL( activated() ), this, SLOT( fileExportXHTML() ) ); + a->addTo( exportMenu ); - a = new QAction( tr( "Export as ASCII")+" "+tr("(still experimental)" ), QPixmap(), "ASCII...", 0, this, "exportASCII" ); + a = new QAction( tr( "Export as ASCII")+" "+tr("(still experimental)" ), QPixmap(), "Text (ASCII)...", 0, this, "exportASCII" ); connect( a, SIGNAL( activated() ), this, SLOT( fileExportASCII() ) ); a->addTo( exportMenu ); + a = new QAction( tr( "Export as Taskjuggler")+" "+tr("(still experimental)" ), QPixmap(), "Taskjuggler...", 0, this, "exportTJ" ); + connect( a, SIGNAL( activated() ), this, SLOT( fileExportTaskjuggler() ) ); + a->addTo( exportMenu ); + a = new QAction( tr( "Export as LaTeX")+" "+tr("(still experimental)" ), QPixmap(), "LaTeX...", 0, this, "exportLaTeX" ); connect( a, SIGNAL( activated() ), this, SLOT( fileExportLaTeX() ) ); a->addTo( exportMenu ); @@ -1195,10 +1204,6 @@ a->addTo( exportMenu ); } - a = new QAction( tr( "Export as XHTML" ), QPixmap(), "XHTML...", ALT + Key_X, this, "exportXHTML" ); - connect( a, SIGNAL( activated() ), this, SLOT( fileExportXHTML() ) ); - a->addTo( exportMenu ); - // Context menu for canvas canvasContextMenu =new QPopupMenu (this); @@ -1905,24 +1910,48 @@ void Main::fileExportASCII() { if (currentMapEditor()) - currentMapEditor()->exportASCII(); + { + ExportASCII ex; + ex.setMapCenter(currentMapEditor()->getMapCenter()); + ex.addFilter ("TXT (*.txt)"); + ex.setCaption(__VYM " -" +tr("Export as ASCII")+" "+tr("(still experimental)")); + if (ex.execDialog() ) ex.doExport(); + } } void Main::fileExportLaTeX() { if (currentMapEditor()) - currentMapEditor()->exportLaTeX(); + { + ExportLaTeX ex; + ex.setMapCenter(currentMapEditor()->getMapCenter()); + ex.addFilter ("Tex (*.tex)"); + ex.setCaption(__VYM " -" +tr("Export as LaTeX")+" "+tr("(still experimental)")); + if (ex.execDialog() ) ex.doExport(); + } +} + +void Main::fileExportTaskjuggler() +{ + ExportTaskjuggler ex; + if (currentMapEditor()) + { + ex.setMapCenter (currentMapEditor()->getMapCenter() ); + ex.setCaption ( __VYM " - "+tr("Export to")+" Taskjuggler"+tr("(still experimental)")); + ex.addFilter ("Taskjuggler (*.tj)"); + if (ex.execDialog()) ex.doExport(); + } } void Main::fileExportOOPresentation() { - ExportOOFileDialog *fd=new ExportOOFileDialog( this,__VYM " - "+tr("Export to Open Office")); + ExportOOFileDialog *fd=new ExportOOFileDialog( this,__VYM " - "+tr("Export to")+" Open Office"); // FIXME add extra info in dialog //ImagePreview *p =new ImagePreview (fd); //fd->setContentsPreviewEnabled( TRUE ); //fd->setContentsPreview( p, p ); //fd->setPreviewMode( QFileDialog::Contents ); - fd->setCaption(__VYM " - " +tr("Export to Open Office")); + fd->setCaption(__VYM " - " +tr("Export to")+" Open Office"); //fd->setDir (lastImageDir); fd->show();