1.1 --- a/mainwindow.cpp Wed Mar 01 14:39:05 2006 +0000
1.2 +++ b/mainwindow.cpp Wed Mar 08 12:59:08 2006 +0000
1.3 @@ -64,6 +64,7 @@
1.4 #include "aboutdialog.h"
1.5 #include "exporthtmldialog.h"
1.6 #include "exportoofiledialog.h"
1.7 +#include "exports.h"
1.8 #include "exportxhtmldialog.h"
1.9 #include "file.h"
1.10 #include "flagrowobj.h"
1.11 @@ -627,14 +628,14 @@
1.12 actionListBranches.append(a);
1.13
1.14 // Import at selection (adding to selection)
1.15 - a = new QAction( tr( "Add map at selection" ),tr( "Import (add)" ), 0, this, "importAdd" );
1.16 + a = new QAction( tr( "Add map at selection" ),tr( "Add map (insert)" ), 0, this, "importAdd" );
1.17 connect( a, SIGNAL( activated() ), this, SLOT( editImportAdd() ) );
1.18 a->setEnabled (false);
1.19 actionListBranches.append(a);
1.20 actionEditImportAdd=a;
1.21
1.22 // Import at selection (replacing selection)
1.23 - a = new QAction( tr( "Replace selection with map" ),tr( "Import (replace)" ), 0, this, "importReplace" );
1.24 + a = new QAction( tr( "Replace selection with map" ),tr( "Add map (replace)" ), 0, this, "importReplace" );
1.25 connect( a, SIGNAL( activated() ), this, SLOT( editImportReplace() ) );
1.26 a->setEnabled (false);
1.27 actionListBranches.append(a);
1.28 @@ -1170,16 +1171,24 @@
1.29 floatimageContextMenu->insertSeparator();
1.30 actionFormatHideLinkUnselected->addTo( floatimageContextMenu );
1.31
1.32 + exportMenu->insertItem ( tr("Export as Image"),exportImageFormatMenu);
1.33 +
1.34 a = new QAction( tr( "Export in Open Document Format used e.g. in Open Office " ), QPixmap(), "Open Office"+QString("..."), 0, this, "exportOOPresentation" );
1.35 connect( a, SIGNAL( activated() ), this, SLOT( fileExportOOPresentation() ) );
1.36 a->addTo (exportMenu);
1.37
1.38 - exportMenu->insertItem ( tr("Export as Image"),exportImageFormatMenu);
1.39 + a = new QAction( tr( "Export as webpage (XHTML)" ), QPixmap(), "Webpage (XHTML)...", ALT + Key_X, this, "exportXHTML" );
1.40 + connect( a, SIGNAL( activated() ), this, SLOT( fileExportXHTML() ) );
1.41 + a->addTo( exportMenu );
1.42
1.43 - a = new QAction( tr( "Export as ASCII")+" "+tr("(still experimental)" ), QPixmap(), "ASCII...", 0, this, "exportASCII" );
1.44 + a = new QAction( tr( "Export as ASCII")+" "+tr("(still experimental)" ), QPixmap(), "Text (ASCII)...", 0, this, "exportASCII" );
1.45 connect( a, SIGNAL( activated() ), this, SLOT( fileExportASCII() ) );
1.46 a->addTo( exportMenu );
1.47
1.48 + a = new QAction( tr( "Export as Taskjuggler")+" "+tr("(still experimental)" ), QPixmap(), "Taskjuggler...", 0, this, "exportTJ" );
1.49 + connect( a, SIGNAL( activated() ), this, SLOT( fileExportTaskjuggler() ) );
1.50 + a->addTo( exportMenu );
1.51 +
1.52 a = new QAction( tr( "Export as LaTeX")+" "+tr("(still experimental)" ), QPixmap(), "LaTeX...", 0, this, "exportLaTeX" );
1.53 connect( a, SIGNAL( activated() ), this, SLOT( fileExportLaTeX() ) );
1.54 a->addTo( exportMenu );
1.55 @@ -1195,10 +1204,6 @@
1.56 a->addTo( exportMenu );
1.57 }
1.58
1.59 - a = new QAction( tr( "Export as XHTML" ), QPixmap(), "XHTML...", ALT + Key_X, this, "exportXHTML" );
1.60 - connect( a, SIGNAL( activated() ), this, SLOT( fileExportXHTML() ) );
1.61 - a->addTo( exportMenu );
1.62 -
1.63
1.64 // Context menu for canvas
1.65 canvasContextMenu =new QPopupMenu (this);
1.66 @@ -1905,24 +1910,48 @@
1.67 void Main::fileExportASCII()
1.68 {
1.69 if (currentMapEditor())
1.70 - currentMapEditor()->exportASCII();
1.71 + {
1.72 + ExportASCII ex;
1.73 + ex.setMapCenter(currentMapEditor()->getMapCenter());
1.74 + ex.addFilter ("TXT (*.txt)");
1.75 + ex.setCaption(__VYM " -" +tr("Export as ASCII")+" "+tr("(still experimental)"));
1.76 + if (ex.execDialog() ) ex.doExport();
1.77 + }
1.78 }
1.79
1.80 void Main::fileExportLaTeX()
1.81 {
1.82 if (currentMapEditor())
1.83 - currentMapEditor()->exportLaTeX();
1.84 + {
1.85 + ExportLaTeX ex;
1.86 + ex.setMapCenter(currentMapEditor()->getMapCenter());
1.87 + ex.addFilter ("Tex (*.tex)");
1.88 + ex.setCaption(__VYM " -" +tr("Export as LaTeX")+" "+tr("(still experimental)"));
1.89 + if (ex.execDialog() ) ex.doExport();
1.90 + }
1.91 +}
1.92 +
1.93 +void Main::fileExportTaskjuggler()
1.94 +{
1.95 + ExportTaskjuggler ex;
1.96 + if (currentMapEditor())
1.97 + {
1.98 + ex.setMapCenter (currentMapEditor()->getMapCenter() );
1.99 + ex.setCaption ( __VYM " - "+tr("Export to")+" Taskjuggler"+tr("(still experimental)"));
1.100 + ex.addFilter ("Taskjuggler (*.tj)");
1.101 + if (ex.execDialog()) ex.doExport();
1.102 + }
1.103 }
1.104
1.105 void Main::fileExportOOPresentation()
1.106 {
1.107 - ExportOOFileDialog *fd=new ExportOOFileDialog( this,__VYM " - "+tr("Export to Open Office"));
1.108 + ExportOOFileDialog *fd=new ExportOOFileDialog( this,__VYM " - "+tr("Export to")+" Open Office");
1.109 // FIXME add extra info in dialog
1.110 //ImagePreview *p =new ImagePreview (fd);
1.111 //fd->setContentsPreviewEnabled( TRUE );
1.112 //fd->setContentsPreview( p, p );
1.113 //fd->setPreviewMode( QFileDialog::Contents );
1.114 - fd->setCaption(__VYM " - " +tr("Export to Open Office"));
1.115 + fd->setCaption(__VYM " - " +tr("Export to")+" Open Office");
1.116 //fd->setDir (lastImageDir);
1.117 fd->show();
1.118