mainwindow.cpp
changeset 243 fad762341d2d
parent 228 654ad4b03c5a
child 250 0e994bf2346b
     1.1 --- a/mainwindow.cpp	Tue Mar 14 14:27:04 2006 +0000
     1.2 +++ b/mainwindow.cpp	Tue Mar 14 14:27:08 2006 +0000
     1.3 @@ -107,6 +107,7 @@
     1.4  extern QAction *actionEditOpenVymLink;
     1.5  extern QAction *actionEditVymLink;
     1.6  extern QAction *actionEditDeleteVymLink;
     1.7 +extern QAction *actionEditToggleHideExport;
     1.8  extern QAction *actionEditMapInfo;
     1.9  extern QAction *actionEditHeading;
    1.10  extern QAction *actionEditDelete;
    1.11 @@ -391,7 +392,7 @@
    1.12  	connect( a, SIGNAL( activated() ), this, SLOT( fileImportKDEBookmarks() ) );
    1.13  	a->addTo (importMenu);
    1.14  
    1.15 -	a = new QAction( tr( "Import")+" "+tr("Mind Manager" ), QPixmap(), tr("Mind Manager")+QString("..."), 0, this, "importMM" );
    1.16 +	a = new QAction( tr( "Import")+" Mind Manager" , QPixmap(), "Mind Manager...", 0, this, "importMM" );
    1.17  	connect( a, SIGNAL( activated() ), this, SLOT( fileImportMM() ) );
    1.18  	a->addTo (importMenu);
    1.19  
    1.20 @@ -556,6 +557,13 @@
    1.21  	a->setEnabled (false);
    1.22  	actionEditDeleteVymLink=a;
    1.23  
    1.24 +    a = new QAction( tr( "Hide object in exports" ), QPixmap("icons/flag-hideexport.png"), tr( "Hide in exports" ), 0, this, "hideExport" );
    1.25 +    connect( a, SIGNAL( activated() ), this, SLOT( editToggleHideExport() ) );
    1.26 +	a->setToggleAction(true);
    1.27 +    a->addTo( tb );
    1.28 +	a->setEnabled (false);
    1.29 +	actionEditToggleHideExport=a;
    1.30 +
    1.31      a = new QAction( tr( "Edit Map Info" ), QPixmap(), tr( "Edit Map Info"+QString("...") ), 0, this, "editMapInfo" );
    1.32      connect( a, SIGNAL( activated() ), this, SLOT( editMapInfo() ) );
    1.33  	a->setEnabled (true);
    1.34 @@ -889,6 +897,11 @@
    1.35  	fo->setToolTip(tr("subtree is temporary scrolled","Systemflag"));
    1.36  	systemFlagsDefault->addFlag (fo);
    1.37  
    1.38 +	fo->load(QPixmap("icons/flag-hideexport.png"));
    1.39 +	fo->setName("hideInExport");
    1.40 +	fo->setToolTip(tr("Hide object in exported maps","Systemflag"));
    1.41 +	systemFlagsDefault->addFlag (fo);
    1.42 +
    1.43  	// Create Standard Flags
    1.44  	standardFlagsDefault = new FlagRowObj ();
    1.45  	standardFlagsDefault->setVisibility (false);
    1.46 @@ -984,6 +997,7 @@
    1.47  	fo->setName("lifebelt");
    1.48  	fo->setToolTip(tr("This will help","Standardflag"));
    1.49  	standardFlagsDefault->addFlag (fo);	
    1.50 +
    1.51  	delete (fo);
    1.52  
    1.53  	standardFlagsDefault->makeToolbar(this, "Standard Flags");
    1.54 @@ -1171,35 +1185,39 @@
    1.55  	floatimageContextMenu->insertSeparator();	
    1.56  	actionFormatHideLinkUnselected->addTo( floatimageContextMenu );
    1.57  
    1.58 -	exportMenu->insertItem ( tr("Export as Image"),exportImageFormatMenu);
    1.59 +	exportMenu->insertItem ( tr("Export as")+" Image",exportImageFormatMenu);
    1.60  
    1.61  	a = new QAction( tr( "Export in Open Document Format used e.g. in Open Office " ), QPixmap(), "Open Office"+QString("..."), 0, this, "exportOOPresentation" );
    1.62  	connect( a, SIGNAL( activated() ), this, SLOT( fileExportOOPresentation() ) );
    1.63  	a->addTo (exportMenu);
    1.64  
    1.65 -	a = new QAction( tr( "Export as webpage (XHTML)" ), QPixmap(), "Webpage (XHTML)...", ALT + Key_X, this, "exportXHTML" );
    1.66 +	a = new QAction( tr( "Export as")+" webpage (XHTML)" , QPixmap(), "Webpage (XHTML)...", ALT + Key_X, this, "exportXHTML" );
    1.67      connect( a, SIGNAL( activated() ), this, SLOT( fileExportXHTML() ) );
    1.68      a->addTo( exportMenu );
    1.69  
    1.70 -    a = new QAction( tr( "Export as ASCII")+" "+tr("(still experimental)" ), QPixmap(), "Text (ASCII)...", 0, this, "exportASCII" );
    1.71 +    a = new QAction( tr( "Export as")+" ASCII"+" "+tr("(still experimental)" ), QPixmap(), "Text (ASCII)...", 0, this, "exportASCII" );
    1.72      connect( a, SIGNAL( activated() ), this, SLOT( fileExportASCII() ) );
    1.73  	a->addTo( exportMenu );
    1.74  
    1.75 -    a = new QAction( tr( "Export as Taskjuggler")+" "+tr("(still experimental)" ), QPixmap(), "Taskjuggler...", 0, this, "exportTJ" );
    1.76 +	a = new QAction( tr( "Export as")+" "+tr("KDE Bookmarks" ), QPixmap(), tr("KDE Bookmarks"), 0, this, "importKDEBookmarks" );
    1.77 +	connect( a, SIGNAL( activated() ), this, SLOT( fileExportKDEBookmarks() ) );
    1.78 +	a->addTo (exportMenu);
    1.79 +
    1.80 +    a = new QAction( tr( "Export as")+" Taskjuggler"+" "+tr("(still experimental)" ), QPixmap(), "Taskjuggler...", 0, this, "exportTJ" );
    1.81      connect( a, SIGNAL( activated() ), this, SLOT( fileExportTaskjuggler() ) );
    1.82  	a->addTo( exportMenu );
    1.83  
    1.84 -    a = new QAction( tr( "Export as LaTeX")+" "+tr("(still experimental)" ), QPixmap(), "LaTeX...", 0, this, "exportLaTeX" );
    1.85 +    a = new QAction( tr( "Export as")+" LaTeX"+" "+tr("(still experimental)" ), QPixmap(), "LaTeX...", 0, this, "exportLaTeX" );
    1.86      connect( a, SIGNAL( activated() ), this, SLOT( fileExportLaTeX() ) );
    1.87  	a->addTo( exportMenu );
    1.88  
    1.89 -	a = new QAction( tr( "Export as XML" ), QPixmap(), "XML...",  0, this, "exportXML" );
    1.90 +	a = new QAction( tr( "Export as")+" XML" , QPixmap(), "XML...",  0, this, "exportXML" );
    1.91      connect( a, SIGNAL( activated() ), this, SLOT( fileExportXML() ) );
    1.92      a->addTo( exportMenu );
    1.93  	
    1.94      if (settings.readBoolEntry( "/vym/mainwindow/showTestMenu",false)) 
    1.95  	{
    1.96 -		a = new QAction( tr( "Export as HTML" ), QPixmap(), "HTML...", 0, this, "exportHTML");
    1.97 +		a = new QAction( tr( "Export as")+" HTML" , QPixmap(), "HTML...", 0, this, "exportHTML");
    1.98  		connect( a, SIGNAL( activated() ), this, SLOT( fileExportHTML() ) );
    1.99  		a->addTo( exportMenu );
   1.100  	}
   1.101 @@ -1931,6 +1949,16 @@
   1.102  	}
   1.103  }
   1.104  
   1.105 +void Main::fileExportKDEBookmarks()
   1.106 +{
   1.107 +	ExportKDEBookmarks ex;
   1.108 +	if (currentMapEditor())
   1.109 +	{
   1.110 +		ex.setMapCenter (currentMapEditor()->getMapCenter() );
   1.111 +		ex.doExport();
   1.112 +	}	
   1.113 +}
   1.114 +
   1.115  void Main::fileExportTaskjuggler()
   1.116  {
   1.117  	ExportTaskjuggler ex;
   1.118 @@ -1938,7 +1966,7 @@
   1.119  	{
   1.120  		ex.setMapCenter (currentMapEditor()->getMapCenter() );
   1.121  		ex.setCaption ( __VYM " - "+tr("Export to")+" Taskjuggler"+tr("(still experimental)"));
   1.122 -		ex.addFilter ("Taskjuggler (*.tj)");
   1.123 +		ex.addFilter ("Taskjuggler (*.tjp)");
   1.124  		if (ex.execDialog()) ex.doExport();
   1.125  	}	
   1.126  }
   1.127 @@ -2194,6 +2222,12 @@
   1.128  		currentMapEditor()->deleteVymLink();	
   1.129  }
   1.130  
   1.131 +void Main::editToggleHideExport()
   1.132 +{
   1.133 +	if (currentMapEditor())
   1.134 +		currentMapEditor()->toggleHideExport();	
   1.135 +}
   1.136 +
   1.137  void Main::editMapInfo()
   1.138  {
   1.139  	if (currentMapEditor())