diff -r 2cf3413b6ac9 -r 30b22f7bd009 mainwindow.cpp --- a/mainwindow.cpp Tue Sep 06 15:04:50 2005 +0000 +++ b/mainwindow.cpp Mon Sep 12 19:52:51 2005 +0000 @@ -27,7 +27,7 @@ #include "icons/filesave.xpm" #include "icons/fileprint.xpm" #include "icons/editundo.xpm" -//#include "icons/editredo.xpm" // TODO +#include "icons/editredo.xpm" #include "icons/editcopy.xpm" #include "icons/editcut.xpm" #include "icons/editpaste.xpm" @@ -69,6 +69,7 @@ extern QAction* actionFileSave; extern QAction* actionFilePrint; extern QAction* actionEditUndo; +extern QAction* actionEditRedo; extern QAction *actionEditCopy; extern QAction *actionEditCut; extern QAction *actionEditPaste; @@ -387,12 +388,15 @@ a->addTo( tb ); a->addTo( menu ); actionEditUndo=a; - /* - a = new QAction( tr( "Redo" ), QPixmap( editredo_xpm ), tr( "&Redo" ), CTRL + Key_Y, this, "editRedo" ); - connect( a, SIGNAL( activated() ), this, SLOT( editRedo() ) ); - a->addTo( tb ); - a->addTo( menu ); - */ + + if (settings.readBoolEntry( "/vym/mainwindow/showTestMenu",false)) + { + a = new QAction( tr( "Redo" ), QPixmap( editredo_xpm ), tr( "&Redo" ), CTRL + Key_Y, this, "editRedo" ); + connect( a, SIGNAL( activated() ), this, SLOT( editRedo() ) ); + a->addTo( tb ); + a->addTo( menu ); + } + menu->insertSeparator(); a = new QAction( tr( "Copy" ), QPixmap( editcopy_xpm ), tr( "&Copy" ), CTRL + Key_C, this, "editCopy" ); connect( a, SIGNAL( activated() ), this, SLOT( editCopy() ) ); @@ -972,13 +976,24 @@ connect( a, SIGNAL( activated() ), this, SLOT( fileExportASCII() ) ); a->addTo( exportMenu ); - a = new QAction( tr( "Export XML" ), QPixmap(), tr( "Export XML" ), 0, this, "exportXML"+QString("...") ); + a = new QAction( tr( "Export as LaTeX (still experimental)" ), QPixmap(), tr( "Export (LaTeX)" +QString("...")), 0, this, "exportLaTeX" ); + connect( a, SIGNAL( activated() ), this, SLOT( fileExportLaTeX() ) ); + a->addTo( exportMenu ); + + if (settings.readBoolEntry( "/vym/mainwindow/showTestMenu",false)) + { + a = new QAction( tr( "Export as Open Office 1.3.x Presentation (still experimental)" ), QPixmap(), tr( "Export (OO Presentation)" +QString("...")), 0, this, "exportOOPresentation" ); + connect( a, SIGNAL( activated() ), this, SLOT( fileExportOOPresentation() ) ); + a->addTo( exportMenu ); + } + + a = new QAction( tr( "Export (XML)" ), QPixmap(), tr( "Export (XML)" )+QString("..."), 0, this, "exportXML" ); connect( a, SIGNAL( activated() ), this, SLOT( fileExportXML() ) ); a->addTo( exportMenu ); if (settings.readBoolEntry( "/vym/mainwindow/showTestMenu",false)) { - a = new QAction( tr( "Export HTML" ), QPixmap(), tr( "Export HTML" ), 0, this, "exportHTML"+QString("...") ); + a = new QAction( tr( "Export HTML" ), QPixmap(), tr( "Export (HTML)" )+QString("..."), 0, this, "exportHTML"); connect( a, SIGNAL( activated() ), this, SLOT( fileExportHTML() ) ); a->addTo( exportMenu ); } @@ -1723,6 +1738,18 @@ currentMapEditor()->exportASCII(); } +void Main::fileExportLaTeX() +{ + if (currentMapEditor()) + currentMapEditor()->exportLaTeX(); +} + +void Main::fileExportOOPresentation() +{ + if (currentMapEditor()) + currentMapEditor()->exportOOPresentation(); +} + void Main::fileCloseMap() { if (currentMapEditor()) @@ -1817,8 +1844,10 @@ currentMapEditor()->undo(); } -void Main::editRedo() // TODO +void Main::editRedo() { + if (currentMapEditor()) + currentMapEditor()->redo(); } void Main::editCopy()