mainwindow.cpp
changeset 163 30b22f7bd009
parent 160 72cc3873306a
child 164 d442a66e9121
     1.1 --- a/mainwindow.cpp	Tue Sep 06 15:04:50 2005 +0000
     1.2 +++ b/mainwindow.cpp	Mon Sep 12 19:52:51 2005 +0000
     1.3 @@ -27,7 +27,7 @@
     1.4  #include "icons/filesave.xpm"
     1.5  #include "icons/fileprint.xpm"
     1.6  #include "icons/editundo.xpm"
     1.7 -//#include "icons/editredo.xpm"	// TODO
     1.8 +#include "icons/editredo.xpm"	
     1.9  #include "icons/editcopy.xpm"
    1.10  #include "icons/editcut.xpm"
    1.11  #include "icons/editpaste.xpm"
    1.12 @@ -69,6 +69,7 @@
    1.13  extern QAction* actionFileSave;
    1.14  extern QAction* actionFilePrint;
    1.15  extern QAction* actionEditUndo;
    1.16 +extern QAction* actionEditRedo;
    1.17  extern QAction *actionEditCopy;
    1.18  extern QAction *actionEditCut;
    1.19  extern QAction *actionEditPaste;
    1.20 @@ -387,12 +388,15 @@
    1.21      a->addTo( tb );
    1.22      a->addTo( menu );
    1.23  	actionEditUndo=a;
    1.24 -    /*
    1.25 -    a = new QAction( tr( "Redo" ), QPixmap( editredo_xpm ), tr( "&Redo" ), CTRL + Key_Y, this, "editRedo" ); 
    1.26 -    connect( a, SIGNAL( activated() ), this, SLOT( editRedo() ) );
    1.27 -    a->addTo( tb );
    1.28 -    a->addTo( menu );
    1.29 -    */
    1.30 +    
    1.31 +    if (settings.readBoolEntry( "/vym/mainwindow/showTestMenu",false)) 
    1.32 +	{
    1.33 +		a = new QAction( tr( "Redo" ), QPixmap( editredo_xpm ), tr( "&Redo" ), CTRL + Key_Y, this, "editRedo" ); 
    1.34 +		connect( a, SIGNAL( activated() ), this, SLOT( editRedo() ) );
    1.35 +		a->addTo( tb );
    1.36 +		a->addTo( menu );
    1.37 +	}
    1.38 +   
    1.39      menu->insertSeparator();
    1.40      a = new QAction( tr( "Copy" ), QPixmap( editcopy_xpm ), tr( "&Copy" ), CTRL + Key_C, this, "editCopy" );
    1.41      connect( a, SIGNAL( activated() ), this, SLOT( editCopy() ) );
    1.42 @@ -972,13 +976,24 @@
    1.43      connect( a, SIGNAL( activated() ), this, SLOT( fileExportASCII() ) );
    1.44  	a->addTo( exportMenu );
    1.45  
    1.46 -	a = new QAction( tr( "Export XML" ), QPixmap(), tr( "Export XML" ),  0, this, "exportXML"+QString("...") );
    1.47 +    a = new QAction( tr( "Export as LaTeX (still experimental)" ), QPixmap(), tr( "Export (LaTeX)" +QString("...")), 0, this, "exportLaTeX" );
    1.48 +    connect( a, SIGNAL( activated() ), this, SLOT( fileExportLaTeX() ) );
    1.49 +	a->addTo( exportMenu );
    1.50 +
    1.51 +    if (settings.readBoolEntry( "/vym/mainwindow/showTestMenu",false)) 
    1.52 +	{
    1.53 +		a = new QAction( tr( "Export as Open Office 1.3.x Presentation (still experimental)" ), QPixmap(), tr( "Export (OO Presentation)" +QString("...")), 0, this, "exportOOPresentation" );
    1.54 +		connect( a, SIGNAL( activated() ), this, SLOT( fileExportOOPresentation() ) );
    1.55 +		a->addTo( exportMenu );
    1.56 +	}
    1.57 +
    1.58 +	a = new QAction( tr( "Export (XML)" ), QPixmap(), tr( "Export (XML)" )+QString("..."),  0, this, "exportXML" );
    1.59      connect( a, SIGNAL( activated() ), this, SLOT( fileExportXML() ) );
    1.60      a->addTo( exportMenu );
    1.61  	
    1.62      if (settings.readBoolEntry( "/vym/mainwindow/showTestMenu",false)) 
    1.63  	{
    1.64 -		a = new QAction( tr( "Export HTML" ), QPixmap(), tr( "Export HTML" ), 0, this, "exportHTML"+QString("...") );
    1.65 +		a = new QAction( tr( "Export HTML" ), QPixmap(), tr( "Export (HTML)" )+QString("..."), 0, this, "exportHTML");
    1.66  		connect( a, SIGNAL( activated() ), this, SLOT( fileExportHTML() ) );
    1.67  		a->addTo( exportMenu );
    1.68  	}
    1.69 @@ -1723,6 +1738,18 @@
    1.70  		currentMapEditor()->exportASCII();	
    1.71  }
    1.72  
    1.73 +void Main::fileExportLaTeX()
    1.74 +{
    1.75 +	if (currentMapEditor())
    1.76 +		currentMapEditor()->exportLaTeX();	
    1.77 +}
    1.78 +
    1.79 +void Main::fileExportOOPresentation()
    1.80 +{
    1.81 +	if (currentMapEditor())
    1.82 +		currentMapEditor()->exportOOPresentation();	
    1.83 +}
    1.84 +
    1.85  void Main::fileCloseMap()
    1.86  {
    1.87  	if (currentMapEditor())
    1.88 @@ -1817,8 +1844,10 @@
    1.89  		currentMapEditor()->undo();
    1.90  }
    1.91  
    1.92 -void Main::editRedo()	    // TODO
    1.93 +void Main::editRedo()	   
    1.94  {
    1.95 +	if (currentMapEditor())
    1.96 +		currentMapEditor()->redo();
    1.97  }
    1.98  
    1.99  void Main::editCopy()