diff -r f3cc8813844f -r fad762341d2d mainwindow.cpp --- a/mainwindow.cpp Tue Mar 14 14:27:04 2006 +0000 +++ b/mainwindow.cpp Tue Mar 14 14:27:08 2006 +0000 @@ -107,6 +107,7 @@ extern QAction *actionEditOpenVymLink; extern QAction *actionEditVymLink; extern QAction *actionEditDeleteVymLink; +extern QAction *actionEditToggleHideExport; extern QAction *actionEditMapInfo; extern QAction *actionEditHeading; extern QAction *actionEditDelete; @@ -391,7 +392,7 @@ connect( a, SIGNAL( activated() ), this, SLOT( fileImportKDEBookmarks() ) ); a->addTo (importMenu); - a = new QAction( tr( "Import")+" "+tr("Mind Manager" ), QPixmap(), tr("Mind Manager")+QString("..."), 0, this, "importMM" ); + a = new QAction( tr( "Import")+" Mind Manager" , QPixmap(), "Mind Manager...", 0, this, "importMM" ); connect( a, SIGNAL( activated() ), this, SLOT( fileImportMM() ) ); a->addTo (importMenu); @@ -556,6 +557,13 @@ a->setEnabled (false); actionEditDeleteVymLink=a; + a = new QAction( tr( "Hide object in exports" ), QPixmap("icons/flag-hideexport.png"), tr( "Hide in exports" ), 0, this, "hideExport" ); + connect( a, SIGNAL( activated() ), this, SLOT( editToggleHideExport() ) ); + a->setToggleAction(true); + a->addTo( tb ); + a->setEnabled (false); + actionEditToggleHideExport=a; + a = new QAction( tr( "Edit Map Info" ), QPixmap(), tr( "Edit Map Info"+QString("...") ), 0, this, "editMapInfo" ); connect( a, SIGNAL( activated() ), this, SLOT( editMapInfo() ) ); a->setEnabled (true); @@ -889,6 +897,11 @@ fo->setToolTip(tr("subtree is temporary scrolled","Systemflag")); systemFlagsDefault->addFlag (fo); + fo->load(QPixmap("icons/flag-hideexport.png")); + fo->setName("hideInExport"); + fo->setToolTip(tr("Hide object in exported maps","Systemflag")); + systemFlagsDefault->addFlag (fo); + // Create Standard Flags standardFlagsDefault = new FlagRowObj (); standardFlagsDefault->setVisibility (false); @@ -984,6 +997,7 @@ fo->setName("lifebelt"); fo->setToolTip(tr("This will help","Standardflag")); standardFlagsDefault->addFlag (fo); + delete (fo); standardFlagsDefault->makeToolbar(this, "Standard Flags"); @@ -1171,35 +1185,39 @@ floatimageContextMenu->insertSeparator(); actionFormatHideLinkUnselected->addTo( floatimageContextMenu ); - exportMenu->insertItem ( tr("Export as Image"),exportImageFormatMenu); + 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); - a = new QAction( tr( "Export as webpage (XHTML)" ), QPixmap(), "Webpage (XHTML)...", ALT + Key_X, this, "exportXHTML" ); + 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(), "Text (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" ); + a = new QAction( tr( "Export as")+" "+tr("KDE Bookmarks" ), QPixmap(), tr("KDE Bookmarks"), 0, this, "importKDEBookmarks" ); + connect( a, SIGNAL( activated() ), this, SLOT( fileExportKDEBookmarks() ) ); + 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" ); + 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 ); - a = new QAction( tr( "Export as XML" ), QPixmap(), "XML...", 0, this, "exportXML" ); + a = new QAction( tr( "Export as")+" XML" , QPixmap(), "XML...", 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 as HTML" ), QPixmap(), "HTML...", 0, this, "exportHTML"); + a = new QAction( tr( "Export as")+" HTML" , QPixmap(), "HTML...", 0, this, "exportHTML"); connect( a, SIGNAL( activated() ), this, SLOT( fileExportHTML() ) ); a->addTo( exportMenu ); } @@ -1931,6 +1949,16 @@ } } +void Main::fileExportKDEBookmarks() +{ + ExportKDEBookmarks ex; + if (currentMapEditor()) + { + ex.setMapCenter (currentMapEditor()->getMapCenter() ); + ex.doExport(); + } +} + void Main::fileExportTaskjuggler() { ExportTaskjuggler ex; @@ -1938,7 +1966,7 @@ { ex.setMapCenter (currentMapEditor()->getMapCenter() ); ex.setCaption ( __VYM " - "+tr("Export to")+" Taskjuggler"+tr("(still experimental)")); - ex.addFilter ("Taskjuggler (*.tj)"); + ex.addFilter ("Taskjuggler (*.tjp)"); if (ex.execDialog()) ex.doExport(); } } @@ -2194,6 +2222,12 @@ currentMapEditor()->deleteVymLink(); } +void Main::editToggleHideExport() +{ + if (currentMapEditor()) + currentMapEditor()->toggleHideExport(); +} + void Main::editMapInfo() { if (currentMapEditor())