First version of new FindWidget instead of extra floating dialog
authorinsilmaril
Wed Nov 25 15:27:22 2009 +0000 (2009-11-25)
changeset 808b163492fda17
parent 807 f9f7922989d8
child 809 0a1abd218f36
First version of new FindWidget instead of extra floating dialog
findwidget.cpp
findwidget.h
mainwindow.cpp
mainwindow.h
version.h
vym.pro
vymmodel.cpp
vymmodel.h
vymview.cpp
vymview.h
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/findwidget.cpp	Wed Nov 25 15:27:22 2009 +0000
     1.3 @@ -0,0 +1,66 @@
     1.4 +#include <QLineEdit>
     1.5 +#include <QVBoxLayout>
     1.6 +#include <QLabel>
     1.7 +
     1.8 +#include "findwidget.h"
     1.9 +
    1.10 +
    1.11 +extern QString vymName;
    1.12 +
    1.13 +FindWidget::FindWidget(QWidget* parent)
    1.14 +{
    1.15 +    QVBoxLayout* mainLayout = new QVBoxLayout;
    1.16 +    QHBoxLayout *row2Layout = new QHBoxLayout;
    1.17 +    
    1.18 +	// Create Buttons
    1.19 +	cancelbutton = new QPushButton;
    1.20 +	cancelbutton->setText(tr("Cancel"));
    1.21 +	cancelbutton->setShortcut (Qt::Key_Escape);
    1.22 +	connect ( cancelbutton, SIGNAL( clicked() ), this, SLOT( cancelPressed() ) );
    1.23 +	
    1.24 +	// Create LineEdit (here QComboBox)
    1.25 +    findcombo = new QComboBox;
    1.26 +	findcombo->setMinimumWidth(250);
    1.27 +	findcombo->setEditable(true);
    1.28 +	connect ( findcombo, SIGNAL( highlighted(int) ), 
    1.29 +		this, SLOT( nextPressed() ) );
    1.30 +	connect ( findcombo, SIGNAL( textChanged(const QString &) ), 
    1.31 +		this, SLOT( findTextChanged(const QString&) ) );
    1.32 +
    1.33 +	nextbutton = new QPushButton;
    1.34 +	nextbutton->setText (tr("Next","Find widget"));
    1.35 +	//nextbutton->setDefault (true);
    1.36 +	//nextbutton->setShortcut (Qt::Key_Return);
    1.37 +	connect ( nextbutton, SIGNAL( clicked() ), this, SLOT( nextPressed() ) );
    1.38 +
    1.39 +	row2Layout->addWidget (cancelbutton);
    1.40 +	row2Layout->addWidget(findcombo);
    1.41 +	row2Layout->addWidget(nextbutton);
    1.42 +
    1.43 +	mainLayout->addLayout (row2Layout);
    1.44 +
    1.45 +	setLayout (mainLayout);
    1.46 +}
    1.47 +
    1.48 +void FindWidget::popup()
    1.49 +{
    1.50 +	show();
    1.51 +	findcombo->lineEdit()->selectAll();
    1.52 +	findcombo->setFocus();
    1.53 +}
    1.54 +
    1.55 +void FindWidget::cancelPressed()
    1.56 +{
    1.57 +	hide();
    1.58 +}
    1.59 +
    1.60 +void FindWidget::nextPressed()
    1.61 +{
    1.62 +	emit (nextButton(findcombo->currentText() ) );
    1.63 +}
    1.64 +
    1.65 +void FindWidget::findTextChanged(const QString&)
    1.66 +{
    1.67 +	emit (somethingChanged() );
    1.68 +}
    1.69 +
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/findwidget.h	Wed Nov 25 15:27:22 2009 +0000
     2.3 @@ -0,0 +1,36 @@
     2.4 +#ifndef FINDWIDGET_H 
     2.5 +#define FINDWIDGET_H
     2.6 +
     2.7 +#include <QComboBox>
     2.8 +#include <QPushButton>
     2.9 +#include <QGroupBox>
    2.10 +#include <QLayout>
    2.11 +#include <QLabel>
    2.12 +
    2.13 +
    2.14 +class FindWidget: public QWidget
    2.15 +{
    2.16 +	Q_OBJECT
    2.17 +
    2.18 +public:
    2.19 +	FindWidget (QWidget* parent=0);
    2.20 +
    2.21 +public slots:	
    2.22 +	void popup();
    2.23 +	void cancelPressed();
    2.24 +	void nextPressed();
    2.25 +	void findTextChanged(const QString&);
    2.26 +
    2.27 +signals:
    2.28 +	void nextButton(QString);
    2.29 +	void somethingChanged();
    2.30 +
    2.31 +private:
    2.32 +	QGroupBox *findbox;
    2.33 +	QComboBox *findcombo;
    2.34 +	QPushButton *nextbutton;
    2.35 +	QPushButton *cancelbutton;
    2.36 +};
    2.37 +
    2.38 +#endif
    2.39 +
     3.1 --- a/mainwindow.cpp	Wed Nov 25 10:58:21 2009 +0000
     3.2 +++ b/mainwindow.cpp	Wed Nov 25 15:27:22 2009 +0000
     3.3 @@ -32,10 +32,10 @@
     3.4  // clashes with the one in Win32 API.
     3.5  typedef struct _PROCESS_INFORMATION
     3.6  {
     3.7 -long hProcess;
     3.8 -long hThread;
     3.9 -long dwProcessId;
    3.10 -long dwThreadId;
    3.11 +	long hProcess;
    3.12 +	long hThread;
    3.13 +	long dwProcessId;
    3.14 +	long dwThreadId;
    3.15  } PROCESS_INFORMATION, *LPPROCESS_INFORMATION;
    3.16  #endif
    3.17  
    3.18 @@ -83,1769 +83,1759 @@
    3.19  Main::Main(QWidget* parent, const char* name, Qt::WFlags f) :
    3.20  QMainWindow(parent,name,f)
    3.21  {
    3.22 -mainWindow=this;
    3.23 -
    3.24 -setCaption ("VYM - View Your Mind");
    3.25 -
    3.26 -// Load window settings
    3.27 -#if defined(Q_OS_WIN32)
    3.28 -if (settings.value("/mainwindow/geometry/maximized", false).toBool())
    3.29 -{
    3.30 -	setWindowState(Qt::WindowMaximized);
    3.31 -}
    3.32 -else
    3.33 -#endif
    3.34 -{
    3.35 -	resize (settings.value("/mainwindow/geometry/size", QSize (800,600)).toSize());
    3.36 -	move   (settings.value("/mainwindow/geometry/pos",  QPoint(300,100)).toPoint());
    3.37 -}
    3.38 -
    3.39 -// Sometimes we may need to remember old selections
    3.40 -prevSelection="";
    3.41 -
    3.42 -// Default color
    3.43 -currentColor=Qt::black;
    3.44 -
    3.45 -// Create unique temporary directory
    3.46 -bool ok;
    3.47 -tmpVymDir=makeTmpDir (ok,"vym");
    3.48 -if (!ok)
    3.49 -{
    3.50 -	qWarning ("Mainwindow: Could not create temporary directory, failed to start vym");
    3.51 -	exit (1);
    3.52 -}
    3.53 -if (debug) qDebug (QString("vym tmpDir=%1").arg(tmpVymDir) );
    3.54 -
    3.55 -// Create direcctory for clipboard
    3.56 -clipboardDir=tmpVymDir+"/clipboard";
    3.57 -clipboardFile="map.xml";
    3.58 -QDir d(clipboardDir);
    3.59 -d.mkdir (clipboardDir,true);
    3.60 -makeSubDirs (clipboardDir);
    3.61 -clipboardEmpty=true;
    3.62 -
    3.63 -browserPID=new qint64;
    3.64 -*browserPID=0;
    3.65 -
    3.66 -// Satellite windows //////////////////////////////////////////
    3.67 -// history window
    3.68 -historyWindow=new HistoryWindow();
    3.69 -connect (historyWindow, SIGNAL (windowClosed() ), this, SLOT (updateActions()));
    3.70 -
    3.71 -// properties window
    3.72 -branchPropertyWindow = new BranchPropertyWindow();
    3.73 -connect (branchPropertyWindow, SIGNAL (windowClosed() ), this, SLOT (updateActions()));
    3.74 -
    3.75 -// Connect TextEditor, so that we can update flags if text changes
    3.76 -connect (textEditor, SIGNAL (textHasChanged() ), this, SLOT (updateNoteFlag()));
    3.77 -connect (textEditor, SIGNAL (windowClosed() ), this, SLOT (updateActions()));
    3.78 -
    3.79 -// Initialize script editor
    3.80 -scriptEditor = new SimpleScriptEditor();
    3.81 -scriptEditor->move (50,50);
    3.82 -
    3.83 -connect( scriptEditor, SIGNAL( runScript ( QString ) ), 
    3.84 -	this, SLOT( runScript( QString ) ) );
    3.85 -
    3.86 -
    3.87 -// Initialize Find window
    3.88 -findWindow=new FindWindow(NULL);
    3.89 -findWindow->move (x(),y()+70);
    3.90 -connect (findWindow, SIGNAL( findButton(QString) ), 
    3.91 -	this, SLOT(editFind(QString) ) );	
    3.92 -connect (findWindow, SIGNAL( somethingChanged() ), 
    3.93 -	this, SLOT(editFindChanged() ) );	
    3.94 -
    3.95 -// Initialize some settings, which are platform dependant
    3.96 -QString p,s;
    3.97 -
    3.98 -	// application to open URLs
    3.99 -	p="/mainwindow/readerURL";
   3.100 -	#if defined(Q_OS_LINUX)
   3.101 -		s=settings.value (p,"xdg-open").toString();
   3.102 -	#else
   3.103 -		#if defined(Q_OS_MACX)
   3.104 -			s=settings.value (p,"/usr/bin/open").toString();
   3.105 -
   3.106 +	mainWindow=this;
   3.107 +
   3.108 +	setCaption ("VYM - View Your Mind");
   3.109 +
   3.110 +	// Load window settings
   3.111 +	#if defined(Q_OS_WIN32)
   3.112 +	if (settings.value("/mainwindow/geometry/maximized", false).toBool())
   3.113 +	{
   3.114 +		setWindowState(Qt::WindowMaximized);
   3.115 +	}
   3.116 +	else
   3.117 +	#endif
   3.118 +	{
   3.119 +		resize (settings.value("/mainwindow/geometry/size", QSize (800,600)).toSize());
   3.120 +		move   (settings.value("/mainwindow/geometry/pos",  QPoint(300,100)).toPoint());
   3.121 +	}
   3.122 +
   3.123 +	// Sometimes we may need to remember old selections
   3.124 +	prevSelection="";
   3.125 +
   3.126 +	// Default color
   3.127 +	currentColor=Qt::black;
   3.128 +
   3.129 +	// Create unique temporary directory
   3.130 +	bool ok;
   3.131 +	tmpVymDir=makeTmpDir (ok,"vym");
   3.132 +	if (!ok)
   3.133 +	{
   3.134 +		qWarning ("Mainwindow: Could not create temporary directory, failed to start vym");
   3.135 +		exit (1);
   3.136 +	}
   3.137 +	if (debug) qDebug (QString("vym tmpDir=%1").arg(tmpVymDir) );
   3.138 +
   3.139 +	// Create direcctory for clipboard
   3.140 +	clipboardDir=tmpVymDir+"/clipboard";
   3.141 +	clipboardFile="map.xml";
   3.142 +	QDir d(clipboardDir);
   3.143 +	d.mkdir (clipboardDir,true);
   3.144 +	makeSubDirs (clipboardDir);
   3.145 +	clipboardEmpty=true;
   3.146 +
   3.147 +	browserPID=new qint64;
   3.148 +	*browserPID=0;
   3.149 +
   3.150 +	// Satellite windows //////////////////////////////////////////
   3.151 +	// history window
   3.152 +	historyWindow=new HistoryWindow();
   3.153 +	connect (historyWindow, SIGNAL (windowClosed() ), this, SLOT (updateActions()));
   3.154 +
   3.155 +	// properties window
   3.156 +	branchPropertyWindow = new BranchPropertyWindow();
   3.157 +	connect (branchPropertyWindow, SIGNAL (windowClosed() ), this, SLOT (updateActions()));
   3.158 +
   3.159 +	// Connect TextEditor, so that we can update flags if text changes
   3.160 +	connect (textEditor, SIGNAL (textHasChanged() ), this, SLOT (updateNoteFlag()));
   3.161 +	connect (textEditor, SIGNAL (windowClosed() ), this, SLOT (updateActions()));
   3.162 +
   3.163 +	// Initialize script editor
   3.164 +	scriptEditor = new SimpleScriptEditor();
   3.165 +	scriptEditor->move (50,50);
   3.166 +
   3.167 +	connect( scriptEditor, SIGNAL( runScript ( QString ) ), 
   3.168 +		this, SLOT( runScript( QString ) ) );
   3.169 +
   3.170 +	// Initialize some settings, which are platform dependant
   3.171 +	QString p,s;
   3.172 +
   3.173 +		// application to open URLs
   3.174 +		p="/mainwindow/readerURL";
   3.175 +		#if defined(Q_OS_LINUX)
   3.176 +			s=settings.value (p,"xdg-open").toString();
   3.177  		#else
   3.178 -			#if defined(Q_OS_WIN32)
   3.179 -				// Assume that system has been set up so that
   3.180 -				// Explorer automagically opens up the URL
   3.181 -				// in the user's preferred browser.
   3.182 -				s=settings.value (p,"explorer").toString();
   3.183 +			#if defined(Q_OS_MACX)
   3.184 +				s=settings.value (p,"/usr/bin/open").toString();
   3.185 +
   3.186  			#else
   3.187 -				s=settings.value (p,"mozilla").toString();
   3.188 +				#if defined(Q_OS_WIN32)
   3.189 +					// Assume that system has been set up so that
   3.190 +					// Explorer automagically opens up the URL
   3.191 +					// in the user's preferred browser.
   3.192 +					s=settings.value (p,"explorer").toString();
   3.193 +				#else
   3.194 +					s=settings.value (p,"mozilla").toString();
   3.195 +				#endif
   3.196  			#endif
   3.197  		#endif
   3.198 -	#endif
   3.199 -	settings.setValue( p,s);
   3.200 -
   3.201 -	// application to open PDFs
   3.202 -	p="/mainwindow/readerPDF";
   3.203 -	#if defined(Q_OS_LINUX)
   3.204 -		s=settings.value (p,"xdg-open").toString();
   3.205 -	#else
   3.206 -		#if defined(Q_OS_MACX)
   3.207 -			s=settings.value (p,"/usr/bin/open").toString();
   3.208 -		#elif defined(Q_OS_WIN32)
   3.209 -			s=settings.value (p,"acrord32").toString();
   3.210 +		settings.setValue( p,s);
   3.211 +
   3.212 +		// application to open PDFs
   3.213 +		p="/mainwindow/readerPDF";
   3.214 +		#if defined(Q_OS_LINUX)
   3.215 +			s=settings.value (p,"xdg-open").toString();
   3.216  		#else
   3.217 -			s=settings.value (p,"acroread").toString();
   3.218 +			#if defined(Q_OS_MACX)
   3.219 +				s=settings.value (p,"/usr/bin/open").toString();
   3.220 +			#elif defined(Q_OS_WIN32)
   3.221 +				s=settings.value (p,"acrord32").toString();
   3.222 +			#else
   3.223 +				s=settings.value (p,"acroread").toString();
   3.224 +			#endif
   3.225  		#endif
   3.226 -	#endif
   3.227 -	settings.setValue( p,s);
   3.228 -
   3.229 -// width of xLinksMenu
   3.230 -xLinkMenuWidth=60;
   3.231 -
   3.232 -// Create tab widget which holds the maps
   3.233 -tabWidget= new QTabWidget (this);
   3.234 -connect( tabWidget, SIGNAL( currentChanged( QWidget * ) ), 
   3.235 -	this, SLOT( editorChanged( QWidget * ) ) );
   3.236 -
   3.237 -setCentralWidget(tabWidget);	
   3.238 -
   3.239 -setupFileActions();
   3.240 -setupEditActions();
   3.241 -setupFormatActions();
   3.242 -setupViewActions();
   3.243 -setupModeActions();
   3.244 -setupFlagActions();
   3.245 -setupNetworkActions();
   3.246 -setupSettingsActions();
   3.247 -setupContextMenus();
   3.248 -setupMacros();
   3.249 -if (settings.value( "/mainwindow/showTestMenu",false).toBool()) setupTestActions();
   3.250 -setupHelpActions();
   3.251 -
   3.252 -// Status bar and progress bar there
   3.253 -statusBar();
   3.254 -progressMax=0;
   3.255 -progressBar=new QProgressBar; 
   3.256 -progressBar->hide();
   3.257 -statusBar()->addPermanentWidget(progressBar);
   3.258 -
   3.259 -restoreState (settings.value("/mainwindow/state",0).toByteArray());
   3.260 -
   3.261 -updateGeometry();
   3.262 +		settings.setValue( p,s);
   3.263 +
   3.264 +	// width of xLinksMenu
   3.265 +	xLinkMenuWidth=60;
   3.266 +
   3.267 +	// Create tab widget which holds the maps
   3.268 +	tabWidget= new QTabWidget (this);
   3.269 +	connect( tabWidget, SIGNAL( currentChanged( QWidget * ) ), 
   3.270 +		this, SLOT( editorChanged( QWidget * ) ) );
   3.271 +
   3.272 +	setCentralWidget(tabWidget);	
   3.273 +
   3.274 +	setupFileActions();
   3.275 +	setupEditActions();
   3.276 +	setupFormatActions();
   3.277 +	setupViewActions();
   3.278 +	setupModeActions();
   3.279 +	setupFlagActions();
   3.280 +	setupNetworkActions();
   3.281 +	setupSettingsActions();
   3.282 +	setupContextMenus();
   3.283 +	setupMacros();
   3.284 +	if (settings.value( "/mainwindow/showTestMenu",false).toBool()) setupTestActions();
   3.285 +	setupHelpActions();
   3.286 +
   3.287 +	// Status bar and progress bar there
   3.288 +	statusBar();
   3.289 +	progressMax=0;
   3.290 +	progressBar=new QProgressBar; 
   3.291 +	progressBar->hide();
   3.292 +	statusBar()->addPermanentWidget(progressBar);
   3.293 +
   3.294 +	restoreState (settings.value("/mainwindow/state",0).toByteArray());
   3.295 +
   3.296 +	updateGeometry();
   3.297  }
   3.298  
   3.299  Main::~Main()
   3.300  {
   3.301 -// Save Settings
   3.302 -#if defined(Q_OS_WIN32)
   3.303 -settings.setValue ("/mainwindow/geometry/maximized", isMaximized());
   3.304 -#endif
   3.305 -settings.setValue ("/mainwindow/geometry/size", size());
   3.306 -settings.setValue ("/mainwindow/geometry/pos", pos());
   3.307 -settings.setValue ("/mainwindow/state",saveState(0));
   3.308 -
   3.309 -settings.setValue ("/mainwindow/view/AntiAlias",actionViewToggleAntiAlias->isOn());
   3.310 -settings.setValue ("/mainwindow/view/SmoothPixmapTransform",actionViewToggleSmoothPixmapTransform->isOn());
   3.311 -settings.setValue( "/version/version", vymVersion );
   3.312 -settings.setValue( "/version/builddate", vymBuildDate );
   3.313 -
   3.314 -settings.setValue( "/mainwindow/autosave/use",actionSettingsAutosaveToggle->isOn() );
   3.315 -settings.setValue( "/mapeditor/editmode/autoSelectNewBranch",actionSettingsAutoSelectNewBranch->isOn() );
   3.316 -settings.setValue( "/mainwindow/writeBackupFile",actionSettingsWriteBackupFile->isOn() );
   3.317 -settings.setValue( "/mapeditor/editmode/autoSelectText",actionSettingsAutoSelectText->isOn() );
   3.318 -settings.setValue( "/mapeditor/editmode/autoEditNewBranch",actionSettingsAutoEditNewBranch->isOn() );
   3.319 -settings.setValue( "/mapeditor/editmode/useDelKey",actionSettingsUseDelKey->isOn() );
   3.320 -settings.setValue( "/mapeditor/editmode/useFlagGroups",actionSettingsUseFlagGroups->isOn() );
   3.321 -settings.setValue( "/export/useHideExport",actionSettingsUseHideExport->isOn() );
   3.322 -
   3.323 -//TODO save scriptEditor settings
   3.324 -
   3.325 -// call the destructors
   3.326 -delete textEditor;
   3.327 -delete historyWindow;
   3.328 -delete branchPropertyWindow;
   3.329 -delete progressBar;
   3.330 -
   3.331 -// Remove temporary directory
   3.332 -removeDir (QDir(tmpVymDir));
   3.333 +	// Save Settings
   3.334 +	#if defined(Q_OS_WIN32)
   3.335 +	settings.setValue ("/mainwindow/geometry/maximized", isMaximized());
   3.336 +	#endif
   3.337 +	settings.setValue ("/mainwindow/geometry/size", size());
   3.338 +	settings.setValue ("/mainwindow/geometry/pos", pos());
   3.339 +	settings.setValue ("/mainwindow/state",saveState(0));
   3.340 +
   3.341 +	settings.setValue ("/mainwindow/view/AntiAlias",actionViewToggleAntiAlias->isOn());
   3.342 +	settings.setValue ("/mainwindow/view/SmoothPixmapTransform",actionViewToggleSmoothPixmapTransform->isOn());
   3.343 +	settings.setValue( "/version/version", vymVersion );
   3.344 +	settings.setValue( "/version/builddate", vymBuildDate );
   3.345 +
   3.346 +	settings.setValue( "/mainwindow/autosave/use",actionSettingsAutosaveToggle->isOn() );
   3.347 +	settings.setValue( "/mapeditor/editmode/autoSelectNewBranch",actionSettingsAutoSelectNewBranch->isOn() );
   3.348 +	settings.setValue( "/mainwindow/writeBackupFile",actionSettingsWriteBackupFile->isOn() );
   3.349 +	settings.setValue( "/mapeditor/editmode/autoSelectText",actionSettingsAutoSelectText->isOn() );
   3.350 +	settings.setValue( "/mapeditor/editmode/autoEditNewBranch",actionSettingsAutoEditNewBranch->isOn() );
   3.351 +	settings.setValue( "/mapeditor/editmode/useDelKey",actionSettingsUseDelKey->isOn() );
   3.352 +	settings.setValue( "/mapeditor/editmode/useFlagGroups",actionSettingsUseFlagGroups->isOn() );
   3.353 +	settings.setValue( "/export/useHideExport",actionSettingsUseHideExport->isOn() );
   3.354 +
   3.355 +	//TODO save scriptEditor settings
   3.356 +
   3.357 +	// call the destructors
   3.358 +	delete textEditor;
   3.359 +	delete historyWindow;
   3.360 +	delete branchPropertyWindow;
   3.361 +	delete progressBar;
   3.362 +
   3.363 +	// Remove temporary directory
   3.364 +	removeDir (QDir(tmpVymDir));
   3.365  }
   3.366  
   3.367  void Main::loadCmdLine()
   3.368  {
   3.369 -/* TODO draw some kind of splashscreen while loading...
   3.370 -if (qApp->argc()>1)
   3.371 -{
   3.372 -}
   3.373 -*/
   3.374 -
   3.375 -QStringList flist=options.getFileList();
   3.376 -QStringList::Iterator it=flist.begin();
   3.377 -
   3.378 -while (it !=flist.end() )
   3.379 -{
   3.380 -	fileLoad (*it, NewMap);
   3.381 -	*it++;
   3.382 -}	
   3.383 +	/* TODO draw some kind of splashscreen while loading...
   3.384 +	if (qApp->argc()>1)
   3.385 +	{
   3.386 +	}
   3.387 +	*/
   3.388 +
   3.389 +	QStringList flist=options.getFileList();
   3.390 +	QStringList::Iterator it=flist.begin();
   3.391 +
   3.392 +	while (it !=flist.end() )
   3.393 +	{
   3.394 +		fileLoad (*it, NewMap);
   3.395 +		*it++;
   3.396 +	}	
   3.397  }
   3.398  
   3.399  
   3.400  void Main::statusMessage(const QString &s)
   3.401  {
   3.402 -// Surpress messages while progressbar during 
   3.403 -// load is active
   3.404 -if (progressMin==progressMax)
   3.405 -	statusBar()->message( s);
   3.406 +	// Surpress messages while progressbar during 
   3.407 +	// load is active
   3.408 +	if (progressMin==progressMax)
   3.409 +		statusBar()->message( s);
   3.410  }
   3.411  
   3.412  void Main::setProgressMinimum (int min)
   3.413  {
   3.414 -progressBar->setMinimum(min);
   3.415 -progressMin=min;
   3.416 +	progressBar->setMinimum(min);
   3.417 +	progressMin=min;
   3.418  }
   3.419  
   3.420  void Main::setProgressMaximum (int max)
   3.421  {
   3.422 -progressBar->setMaximum(max);
   3.423 -progressMax=max;
   3.424 -if (max>0)
   3.425 -{
   3.426 -	statusBar()->addPermanentWidget(progressBar);
   3.427 -	progressBar->show();
   3.428 -}
   3.429 +	progressBar->setMaximum(max);
   3.430 +	progressMax=max;
   3.431 +	if (max>0)
   3.432 +	{
   3.433 +		statusBar()->addPermanentWidget(progressBar);
   3.434 +		progressBar->show();
   3.435 +	}
   3.436  }
   3.437  
   3.438  void Main::setProgressValue (int v)
   3.439  {
   3.440 -progressBar->setValue (v);
   3.441 +	progressBar->setValue (v);
   3.442  }
   3.443  
   3.444  void Main::removeProgressBar()
   3.445  {
   3.446 -if (progressMax>0)
   3.447 -	statusBar()->removeWidget(progressBar);
   3.448 -progressMax=progressMin=0;
   3.449 +	if (progressMax>0)
   3.450 +		statusBar()->removeWidget(progressBar);
   3.451 +	progressMax=progressMin=0;
   3.452  }
   3.453  
   3.454  void Main::closeEvent (QCloseEvent* )
   3.455  {
   3.456 -fileExitVYM();
   3.457 +	fileExitVYM();
   3.458  }
   3.459  
   3.460  // File Actions
   3.461  void Main::setupFileActions()
   3.462  {
   3.463 -QMenu *fileMenu = menuBar()->addMenu ( tr ("&Map") );
   3.464 -QToolBar *tb = addToolBar( tr ("&Map") );
   3.465 -tb->setObjectName ("mapTB");
   3.466 -
   3.467 -QAction *a;
   3.468 -a = new QAction(QPixmap( iconPath+"filenew.png"), tr( "&New map","File menu" ),this);
   3.469 -a->setStatusTip ( tr( "New map","Status tip File menu" ) );
   3.470 -a->setShortcut ( Qt::CTRL + Qt::Key_N );		//New map
   3.471 -a->addTo( tb );
   3.472 -fileMenu->addAction (a);
   3.473 -connect( a, SIGNAL( triggered() ), this, SLOT( fileNew() ) );
   3.474 -
   3.475 -a = new QAction(QPixmap( iconPath+"filenewcopy.png"), tr( "&Copy to new map","File menu" ),this);
   3.476 -a->setStatusTip ( tr( "Copy selection to mapcenter of a new map","Status tip File menu" ) );
   3.477 -a->setShortcut ( Qt::CTRL +Qt::SHIFT + Qt::Key_N );		//New map
   3.478 -fileMenu->addAction (a);
   3.479 -connect( a, SIGNAL( triggered() ), this, SLOT( fileNewCopy() ) );
   3.480 -actionFileNewCopy=a;
   3.481 -
   3.482 -a = new QAction( QPixmap( iconPath+"fileopen.png"), tr( "&Open..." ,"File menu"),this);
   3.483 -a->setStatusTip (tr( "Open","Status tip File menu" ) );
   3.484 -a->setShortcut ( Qt::CTRL + Qt::Key_O );		//Open map
   3.485 -a->addTo( tb );
   3.486 -fileMenu->addAction (a);
   3.487 -connect( a, SIGNAL( triggered() ), this, SLOT( fileLoad() ) );
   3.488 -
   3.489 -fileLastMapsMenu = fileMenu->addMenu (tr("Open Recent","File menu"));
   3.490 -fileMenu->addSeparator();
   3.491 -
   3.492 -a = new QAction( QPixmap( iconPath+"filesave.png"), tr( "&Save...","File menu" ), this);
   3.493 -a->setStatusTip ( tr( "Save","Status tip file menu" ));
   3.494 -a->setShortcut (Qt::CTRL + Qt::Key_S );			//Save map
   3.495 -a->addTo( tb );
   3.496 -fileMenu->addAction (a);
   3.497 -connect( a, SIGNAL( triggered() ), this, SLOT( fileSave() ) );
   3.498 -actionFileSave=a;
   3.499 -
   3.500 -a = new QAction( QPixmap(iconPath+"filesaveas.png"), tr( "Save &As...","File menu" ), this);
   3.501 -a->setStatusTip (tr( "Save &As","Status tip file menu" ) );
   3.502 -fileMenu->addAction (a);
   3.503 -connect( a, SIGNAL( triggered() ), this, SLOT( fileSaveAs() ) );
   3.504 -
   3.505 -fileMenu->addSeparator();
   3.506 -
   3.507 -fileImportMenu = fileMenu->addMenu (tr("Import","File menu"));
   3.508 -
   3.509 -a = new QAction(tr("KDE 3 Bookmarks"), this);
   3.510 -a->setStatusTip ( tr( "Import %1","Status tip file menu" ).arg(tr("KDE 3 bookmarks")));
   3.511 -a->addTo (fileImportMenu);
   3.512 -connect( a, SIGNAL( triggered() ), this, SLOT( fileImportKDE3Bookmarks() ) );
   3.513 -
   3.514 -a = new QAction(tr("KDE 4 Bookmarks"), this);
   3.515 -a->setStatusTip ( tr( "Import %1","Status tip file menu" ).arg(tr("KDE 4 bookmarks")));
   3.516 -a->addTo (fileImportMenu);
   3.517 -connect( a, SIGNAL( triggered() ), this, SLOT( fileImportKDE4Bookmarks() ) );
   3.518 -
   3.519 -if (settings.value( "/mainwindow/showTestMenu",false).toBool()) 
   3.520 -{
   3.521 -	a = new QAction( QPixmap(), tr("Firefox Bookmarks","File menu"),this);
   3.522 -	a->setStatusTip (tr( "Import %1","Status tip file menu").arg(tr("Firefox Bookmarks" ) ));
   3.523 +	QMenu *fileMenu = menuBar()->addMenu ( tr ("&Map") );
   3.524 +	QToolBar *tb = addToolBar( tr ("&Map") );
   3.525 +	tb->setObjectName ("mapTB");
   3.526 +
   3.527 +	QAction *a;
   3.528 +	a = new QAction(QPixmap( iconPath+"filenew.png"), tr( "&New map","File menu" ),this);
   3.529 +	a->setStatusTip ( tr( "New map","Status tip File menu" ) );
   3.530 +	a->setShortcut ( Qt::CTRL + Qt::Key_N );		//New map
   3.531 +	a->addTo( tb );
   3.532 +	fileMenu->addAction (a);
   3.533 +	connect( a, SIGNAL( triggered() ), this, SLOT( fileNew() ) );
   3.534 +
   3.535 +	a = new QAction(QPixmap( iconPath+"filenewcopy.png"), tr( "&Copy to new map","File menu" ),this);
   3.536 +	a->setStatusTip ( tr( "Copy selection to mapcenter of a new map","Status tip File menu" ) );
   3.537 +	a->setShortcut ( Qt::CTRL +Qt::SHIFT + Qt::Key_N );		//New map
   3.538 +	fileMenu->addAction (a);
   3.539 +	connect( a, SIGNAL( triggered() ), this, SLOT( fileNewCopy() ) );
   3.540 +	actionFileNewCopy=a;
   3.541 +
   3.542 +	a = new QAction( QPixmap( iconPath+"fileopen.png"), tr( "&Open..." ,"File menu"),this);
   3.543 +	a->setStatusTip (tr( "Open","Status tip File menu" ) );
   3.544 +	a->setShortcut ( Qt::CTRL + Qt::Key_O );		//Open map
   3.545 +	a->addTo( tb );
   3.546 +	fileMenu->addAction (a);
   3.547 +	connect( a, SIGNAL( triggered() ), this, SLOT( fileLoad() ) );
   3.548 +
   3.549 +	fileLastMapsMenu = fileMenu->addMenu (tr("Open Recent","File menu"));
   3.550 +	fileMenu->addSeparator();
   3.551 +
   3.552 +	a = new QAction( QPixmap( iconPath+"filesave.png"), tr( "&Save...","File menu" ), this);
   3.553 +	a->setStatusTip ( tr( "Save","Status tip file menu" ));
   3.554 +	a->setShortcut (Qt::CTRL + Qt::Key_S );			//Save map
   3.555 +	a->addTo( tb );
   3.556 +	fileMenu->addAction (a);
   3.557 +	connect( a, SIGNAL( triggered() ), this, SLOT( fileSave() ) );
   3.558 +	actionFileSave=a;
   3.559 +
   3.560 +	a = new QAction( QPixmap(iconPath+"filesaveas.png"), tr( "Save &As...","File menu" ), this);
   3.561 +	a->setStatusTip (tr( "Save &As","Status tip file menu" ) );
   3.562 +	fileMenu->addAction (a);
   3.563 +	connect( a, SIGNAL( triggered() ), this, SLOT( fileSaveAs() ) );
   3.564 +
   3.565 +	fileMenu->addSeparator();
   3.566 +
   3.567 +	fileImportMenu = fileMenu->addMenu (tr("Import","File menu"));
   3.568 +
   3.569 +	a = new QAction(tr("KDE 3 Bookmarks"), this);
   3.570 +	a->setStatusTip ( tr( "Import %1","Status tip file menu" ).arg(tr("KDE 3 bookmarks")));
   3.571  	a->addTo (fileImportMenu);
   3.572 -	connect( a, SIGNAL( triggered() ), this, SLOT( fileImportFirefoxBookmarks() ) );
   3.573 -}	
   3.574 -
   3.575 -a = new QAction("Freemind...",this);
   3.576 -a->setStatusTip ( tr( "Import %1","status tip file menu").arg(" Freemind")  );
   3.577 -fileImportMenu->addAction (a);
   3.578 -connect( a, SIGNAL( triggered() ), this, SLOT( fileImportFreemind() ) );
   3.579 -
   3.580 -a = new QAction("Mind Manager...",this);
   3.581 -a->setStatusTip ( tr( "Import %1","status tip file menu").arg(" Mind Manager")  );
   3.582 -fileImportMenu->addAction (a);
   3.583 -connect( a, SIGNAL( triggered() ), this, SLOT( fileImportMM() ) );
   3.584 -
   3.585 -a = new QAction( tr( "Import Dir%1","File menu").arg("..."), this);
   3.586 -a->setStatusTip (tr( "Import directory structure (experimental)","status tip file menu" ) );
   3.587 -fileImportMenu->addAction (a);
   3.588 -connect( a, SIGNAL( triggered() ), this, SLOT( fileImportDir() ) );
   3.589 -
   3.590 -fileExportMenu = fileMenu->addMenu (tr("Export","File menu"));
   3.591 -
   3.592 -a = new QAction( tr("Image%1","File export menu").arg("..."), this);
   3.593 -a->setStatusTip( tr( "Export map as image","status tip file menu" ));
   3.594 -connect( a, SIGNAL( triggered() ), this, SLOT( fileExportImage() ) );
   3.595 -fileExportMenu->addAction (a);
   3.596 -
   3.597 -a = new QAction( "Open Office...", this);
   3.598 -a->setStatusTip( tr( "Export in Open Document Format used e.g. in Open Office ","status tip file menu" ));
   3.599 -connect( a, SIGNAL( triggered() ), this, SLOT( fileExportOOPresentation() ) );
   3.600 -fileExportMenu->addAction (a);
   3.601 -
   3.602 -a = new QAction(  "Webpage (XHTML)...",this );
   3.603 -a->setShortcut (Qt::ALT + Qt::Key_X);			//Export XHTML
   3.604 -a->setStatusTip ( tr( "Export as %1","status tip file menu").arg(tr(" webpage (XHTML)","status tip file menu")));
   3.605 -connect( a, SIGNAL( triggered() ), this, SLOT( fileExportXHTML() ) );
   3.606 -fileExportMenu->addAction (a);
   3.607 -
   3.608 -a = new QAction( "Text (A&O report)...", this);
   3.609 -a->setStatusTip ( tr( "Export as %1").arg("A&O report "+tr("(still experimental)" )));
   3.610 -connect( a, SIGNAL( triggered() ), this, SLOT( fileExportAO() ) );
   3.611 -fileExportMenu->addAction (a);
   3.612 -
   3.613 -a = new QAction( "Text (ASCII)...", this);
   3.614 -a->setStatusTip ( tr( "Export as %1").arg("ASCII "+tr("(still experimental)" )));
   3.615 -connect( a, SIGNAL( triggered() ), this, SLOT( fileExportASCII() ) );
   3.616 -fileExportMenu->addAction (a);
   3.617 -
   3.618 -a = new QAction( "Spreadsheet (CSV)...", this);
   3.619 -a->setStatusTip ( tr( "Export as %1").arg("CSV "+tr("(still experimental)" )));
   3.620 -connect( a, SIGNAL( triggered() ), this, SLOT( fileExportCSV() ) );
   3.621 -fileExportMenu->addAction (a);
   3.622 -
   3.623 -a = new QAction( tr("KDE 3 Bookmarks","File menu"), this);
   3.624 -a->setStatusTip( tr( "Export as %1").arg(tr("KDE 3 Bookmarks" )));
   3.625 -connect( a, SIGNAL( triggered() ), this, SLOT( fileExportKDE3Bookmarks() ) );
   3.626 -fileExportMenu->addAction (a);
   3.627 -
   3.628 -a = new QAction( tr("KDE 4 Bookmarks","File menu"), this);
   3.629 -a->setStatusTip( tr( "Export as %1").arg(tr("KDE 4 Bookmarks" )));
   3.630 -connect( a, SIGNAL( triggered() ), this, SLOT( fileExportKDE4Bookmarks() ) );
   3.631 -fileExportMenu->addAction (a);
   3.632 -
   3.633 -a = new QAction( "Taskjuggler...", this );
   3.634 -a->setStatusTip( tr( "Export as %1").arg("Taskjuggler "+tr("(still experimental)" )));
   3.635 -connect( a, SIGNAL( triggered() ), this, SLOT( fileExportTaskjuggler() ) );
   3.636 -fileExportMenu->addAction (a);
   3.637 -
   3.638 -a = new QAction( "LaTeX...", this);
   3.639 -a->setStatusTip( tr( "Export as %1").arg("LaTeX "+tr("(still experimental)" )));
   3.640 -connect( a, SIGNAL( triggered() ), this, SLOT( fileExportLaTeX() ) );
   3.641 -fileExportMenu->addAction (a);
   3.642 -
   3.643 -a = new QAction( "XML..." , this );
   3.644 -a->setStatusTip (tr( "Export as %1").arg("XML"));
   3.645 -connect( a, SIGNAL( triggered() ), this, SLOT( fileExportXML() ) );
   3.646 -fileExportMenu->addAction (a);
   3.647 -
   3.648 -fileMenu->addSeparator();
   3.649 -
   3.650 -a = new QAction(QPixmap( iconPath+"fileprint.png"), tr( "&Print")+QString("..."), this);
   3.651 -a->setStatusTip ( tr( "Print" ,"File menu") );
   3.652 -a->setShortcut (Qt::CTRL + Qt::Key_P );			//Print map
   3.653 -a->addTo( tb );
   3.654 -fileMenu->addAction (a);
   3.655 -connect( a, SIGNAL( triggered() ), this, SLOT( filePrint() ) );
   3.656 -actionFilePrint=a;
   3.657 -
   3.658 -a = new QAction( QPixmap(iconPath+"fileclose.png"), tr( "&Close Map","File menu" ), this);
   3.659 -a->setStatusTip (tr( "Close Map" ) );
   3.660 -a->setShortcut (Qt::CTRL + Qt::Key_W );			//Close map
   3.661 -fileMenu->addAction (a);
   3.662 -connect( a, SIGNAL( triggered() ), this, SLOT( fileCloseMap() ) );
   3.663 -
   3.664 -a = new QAction(QPixmap(iconPath+"exit.png"), tr( "E&xit","File menu")+" "+vymName, this);
   3.665 -a->setStatusTip ( tr( "Exit")+" "+vymName );
   3.666 -a->setShortcut (Qt::CTRL + Qt::Key_Q );			//Quit vym
   3.667 -fileMenu->addAction (a);
   3.668 -connect( a, SIGNAL( triggered() ), this, SLOT( fileExitVYM() ) );
   3.669 +	connect( a, SIGNAL( triggered() ), this, SLOT( fileImportKDE3Bookmarks() ) );
   3.670 +
   3.671 +	a = new QAction(tr("KDE 4 Bookmarks"), this);
   3.672 +	a->setStatusTip ( tr( "Import %1","Status tip file menu" ).arg(tr("KDE 4 bookmarks")));
   3.673 +	a->addTo (fileImportMenu);
   3.674 +	connect( a, SIGNAL( triggered() ), this, SLOT( fileImportKDE4Bookmarks() ) );
   3.675 +
   3.676 +	if (settings.value( "/mainwindow/showTestMenu",false).toBool()) 
   3.677 +	{
   3.678 +		a = new QAction( QPixmap(), tr("Firefox Bookmarks","File menu"),this);
   3.679 +		a->setStatusTip (tr( "Import %1","Status tip file menu").arg(tr("Firefox Bookmarks" ) ));
   3.680 +		a->addTo (fileImportMenu);
   3.681 +		connect( a, SIGNAL( triggered() ), this, SLOT( fileImportFirefoxBookmarks() ) );
   3.682 +	}	
   3.683 +
   3.684 +	a = new QAction("Freemind...",this);
   3.685 +	a->setStatusTip ( tr( "Import %1","status tip file menu").arg(" Freemind")  );
   3.686 +	fileImportMenu->addAction (a);
   3.687 +	connect( a, SIGNAL( triggered() ), this, SLOT( fileImportFreemind() ) );
   3.688 +
   3.689 +	a = new QAction("Mind Manager...",this);
   3.690 +	a->setStatusTip ( tr( "Import %1","status tip file menu").arg(" Mind Manager")  );
   3.691 +	fileImportMenu->addAction (a);
   3.692 +	connect( a, SIGNAL( triggered() ), this, SLOT( fileImportMM() ) );
   3.693 +
   3.694 +	a = new QAction( tr( "Import Dir%1","File menu").arg("..."), this);
   3.695 +	a->setStatusTip (tr( "Import directory structure (experimental)","status tip file menu" ) );
   3.696 +	fileImportMenu->addAction (a);
   3.697 +	connect( a, SIGNAL( triggered() ), this, SLOT( fileImportDir() ) );
   3.698 +
   3.699 +	fileExportMenu = fileMenu->addMenu (tr("Export","File menu"));
   3.700 +
   3.701 +	a = new QAction( tr("Image%1","File export menu").arg("..."), this);
   3.702 +	a->setStatusTip( tr( "Export map as image","status tip file menu" ));
   3.703 +	connect( a, SIGNAL( triggered() ), this, SLOT( fileExportImage() ) );
   3.704 +	fileExportMenu->addAction (a);
   3.705 +
   3.706 +	a = new QAction( "Open Office...", this);
   3.707 +	a->setStatusTip( tr( "Export in Open Document Format used e.g. in Open Office ","status tip file menu" ));
   3.708 +	connect( a, SIGNAL( triggered() ), this, SLOT( fileExportOOPresentation() ) );
   3.709 +	fileExportMenu->addAction (a);
   3.710 +
   3.711 +	a = new QAction(  "Webpage (XHTML)...",this );
   3.712 +	a->setShortcut (Qt::ALT + Qt::Key_X);			//Export XHTML
   3.713 +	a->setStatusTip ( tr( "Export as %1","status tip file menu").arg(tr(" webpage (XHTML)","status tip file menu")));
   3.714 +	connect( a, SIGNAL( triggered() ), this, SLOT( fileExportXHTML() ) );
   3.715 +	fileExportMenu->addAction (a);
   3.716 +
   3.717 +	a = new QAction( "Text (A&O report)...", this);
   3.718 +	a->setStatusTip ( tr( "Export as %1").arg("A&O report "+tr("(still experimental)" )));
   3.719 +	connect( a, SIGNAL( triggered() ), this, SLOT( fileExportAO() ) );
   3.720 +	fileExportMenu->addAction (a);
   3.721 +
   3.722 +	a = new QAction( "Text (ASCII)...", this);
   3.723 +	a->setStatusTip ( tr( "Export as %1").arg("ASCII "+tr("(still experimental)" )));
   3.724 +	connect( a, SIGNAL( triggered() ), this, SLOT( fileExportASCII() ) );
   3.725 +	fileExportMenu->addAction (a);
   3.726 +
   3.727 +	a = new QAction( "Spreadsheet (CSV)...", this);
   3.728 +	a->setStatusTip ( tr( "Export as %1").arg("CSV "+tr("(still experimental)" )));
   3.729 +	connect( a, SIGNAL( triggered() ), this, SLOT( fileExportCSV() ) );
   3.730 +	fileExportMenu->addAction (a);
   3.731 +
   3.732 +	a = new QAction( tr("KDE 3 Bookmarks","File menu"), this);
   3.733 +	a->setStatusTip( tr( "Export as %1").arg(tr("KDE 3 Bookmarks" )));
   3.734 +	connect( a, SIGNAL( triggered() ), this, SLOT( fileExportKDE3Bookmarks() ) );
   3.735 +	fileExportMenu->addAction (a);
   3.736 +
   3.737 +	a = new QAction( tr("KDE 4 Bookmarks","File menu"), this);
   3.738 +	a->setStatusTip( tr( "Export as %1").arg(tr("KDE 4 Bookmarks" )));
   3.739 +	connect( a, SIGNAL( triggered() ), this, SLOT( fileExportKDE4Bookmarks() ) );
   3.740 +	fileExportMenu->addAction (a);
   3.741 +
   3.742 +	a = new QAction( "Taskjuggler...", this );
   3.743 +	a->setStatusTip( tr( "Export as %1").arg("Taskjuggler "+tr("(still experimental)" )));
   3.744 +	connect( a, SIGNAL( triggered() ), this, SLOT( fileExportTaskjuggler() ) );
   3.745 +	fileExportMenu->addAction (a);
   3.746 +
   3.747 +	a = new QAction( "LaTeX...", this);
   3.748 +	a->setStatusTip( tr( "Export as %1").arg("LaTeX "+tr("(still experimental)" )));
   3.749 +	connect( a, SIGNAL( triggered() ), this, SLOT( fileExportLaTeX() ) );
   3.750 +	fileExportMenu->addAction (a);
   3.751 +
   3.752 +	a = new QAction( "XML..." , this );
   3.753 +	a->setStatusTip (tr( "Export as %1").arg("XML"));
   3.754 +	connect( a, SIGNAL( triggered() ), this, SLOT( fileExportXML() ) );
   3.755 +	fileExportMenu->addAction (a);
   3.756 +
   3.757 +	fileMenu->addSeparator();
   3.758 +
   3.759 +	a = new QAction(QPixmap( iconPath+"fileprint.png"), tr( "&Print")+QString("..."), this);
   3.760 +	a->setStatusTip ( tr( "Print" ,"File menu") );
   3.761 +	a->setShortcut (Qt::CTRL + Qt::Key_P );			//Print map
   3.762 +	a->addTo( tb );
   3.763 +	fileMenu->addAction (a);
   3.764 +	connect( a, SIGNAL( triggered() ), this, SLOT( filePrint() ) );
   3.765 +	actionFilePrint=a;
   3.766 +
   3.767 +	a = new QAction( QPixmap(iconPath+"fileclose.png"), tr( "&Close Map","File menu" ), this);
   3.768 +	a->setStatusTip (tr( "Close Map" ) );
   3.769 +	a->setShortcut (Qt::CTRL + Qt::Key_W );			//Close map
   3.770 +	fileMenu->addAction (a);
   3.771 +	connect( a, SIGNAL( triggered() ), this, SLOT( fileCloseMap() ) );
   3.772 +
   3.773 +	a = new QAction(QPixmap(iconPath+"exit.png"), tr( "E&xit","File menu")+" "+vymName, this);
   3.774 +	a->setStatusTip ( tr( "Exit")+" "+vymName );
   3.775 +	a->setShortcut (Qt::CTRL + Qt::Key_Q );			//Quit vym
   3.776 +	fileMenu->addAction (a);
   3.777 +	connect( a, SIGNAL( triggered() ), this, SLOT( fileExitVYM() ) );
   3.778  }
   3.779  
   3.780  
   3.781  //Edit Actions
   3.782  void Main::setupEditActions()
   3.783  {
   3.784 -QToolBar *tb = addToolBar( tr ("&Actions toolbar","Toolbar name") );
   3.785 -tb->setLabel( "Edit Actions" );
   3.786 -tb->setObjectName ("actionsTB");
   3.787 -QMenu *editMenu = menuBar()->addMenu( tr("&Edit","Edit menu") );
   3.788 -
   3.789 -QAction *a;
   3.790 -QAction *alt;
   3.791 -a = new QAction( QPixmap( iconPath+"undo.png"), tr( "&Undo","Edit menu" ),this);
   3.792 -connect( a, SIGNAL( triggered() ), this, SLOT( editUndo() ) );
   3.793 -a->setStatusTip (tr( "Undo" ) );
   3.794 -a->setShortcut ( Qt::CTRL + Qt::Key_Z );		//Undo last action
   3.795 -a->setEnabled (false);
   3.796 -tb->addAction (a);
   3.797 -editMenu->addAction (a);
   3.798 -actionUndo=a;
   3.799 -
   3.800 -a = new QAction( QPixmap( iconPath+"redo.png"), tr( "&Redo","Edit menu" ), this); 
   3.801 -a->setStatusTip (tr( "Redo" ));
   3.802 -a->setShortcut (Qt::CTRL + Qt::Key_Y );			//Redo last action
   3.803 -tb->addAction (a);
   3.804 -editMenu->addAction (a);
   3.805 -connect( a, SIGNAL( triggered() ), this, SLOT( editRedo() ) );
   3.806 -actionRedo=a;
   3.807 -
   3.808 -editMenu->addSeparator();
   3.809 -a = new QAction(QPixmap( iconPath+"editcopy.png"), tr( "&Copy","Edit menu" ), this);
   3.810 -a->setStatusTip ( tr( "Copy" ) );
   3.811 -a->setShortcut (Qt::CTRL + Qt::Key_C );			//Copy
   3.812 -a->setEnabled (false);
   3.813 -tb->addAction (a);
   3.814 -editMenu->addAction (a);
   3.815 -connect( a, SIGNAL( triggered() ), this, SLOT( editCopy() ) );
   3.816 -actionCopy=a;
   3.817 -
   3.818 -a = new QAction(QPixmap( iconPath+"editcut.png" ), tr( "Cu&t","Edit menu" ), this);
   3.819 -a->setStatusTip ( tr( "Cut" ) );
   3.820 -a->setShortcut (Qt::CTRL + Qt::Key_X );			//Cut
   3.821 -a->setEnabled (false);
   3.822 -tb->addAction (a);
   3.823 -editMenu->addAction (a);
   3.824 -actionCut=a;
   3.825 -connect( a, SIGNAL( triggered() ), this, SLOT( editCut() ) );
   3.826 -
   3.827 -a = new QAction(QPixmap( iconPath+"editpaste.png"), tr( "&Paste","Edit menu" ),this);
   3.828 -connect( a, SIGNAL( triggered() ), this, SLOT( editPaste() ) );
   3.829 -a->setStatusTip ( tr( "Paste" ) );
   3.830 -a->setShortcut ( Qt::CTRL + Qt::Key_V );		//Paste
   3.831 -a->setEnabled (false);
   3.832 -tb->addAction (a);
   3.833 -editMenu->addAction (a);
   3.834 -actionPaste=a;
   3.835 -
   3.836 -// Shortcut to delete selection
   3.837 -a = new QAction( tr( "Delete Selection","Edit menu" ),this);
   3.838 -a->setStatusTip (tr( "Delete Selection" ));
   3.839 -a->setShortcut ( Qt::Key_Delete);				//Delete selection
   3.840 -a->setShortcutContext (Qt::WindowShortcut);
   3.841 -addAction (a);
   3.842 -connect( a, SIGNAL( triggered() ), this, SLOT( editDeleteSelection() ) );
   3.843 -actionDelete=a;
   3.844 -
   3.845 -// Shortcut to add attribute
   3.846 -a= new QAction(tr( "Add attribute" ), this);
   3.847 -a->setShortcut ( Qt::Key_Q);	
   3.848 -a->setShortcutContext (Qt::WindowShortcut);
   3.849 -addAction (a);
   3.850 -connect( a, SIGNAL( triggered() ), this, SLOT( editAddAttribute() ) );
   3.851 -actionAddAttribute= a;
   3.852 -
   3.853 -
   3.854 -// Shortcut to add mapcenter
   3.855 -a= new QAction(QPixmap(iconPath+"newmapcenter.png"),tr( "Add mapcenter","Canvas context menu" ), this);
   3.856 -a->setShortcut ( Qt::Key_M);	
   3.857 -a->setShortcutContext (Qt::WindowShortcut);
   3.858 -connect( a, SIGNAL( triggered() ), this, SLOT( editAddMapCenter() ) );
   3.859 -//actionListBranches.append(a);
   3.860 -tb->addAction (a);
   3.861 -actionAddMapCenter = a;
   3.862 -
   3.863 -
   3.864 -// Shortcut to add branch
   3.865 -alt = new QAction(QPixmap(iconPath+"newbranch.png"), tr( "Add branch as child","Edit menu" ), this);
   3.866 -alt->setStatusTip ( tr( "Add a branch as child of selection" ));
   3.867 -alt->setShortcut (Qt::Key_A);					//Add branch
   3.868 -alt->setShortcutContext (Qt::WindowShortcut);
   3.869 -addAction (alt);
   3.870 -connect( alt, SIGNAL( triggered() ), this, SLOT( editNewBranch() ) );
   3.871 -a = new QAction(QPixmap(iconPath+"newbranch.png"), tr( "Add branch as child","Edit menu" ), this);
   3.872 -a->setStatusTip ( tr( "Add a branch as child of selection" ));
   3.873 -a->setShortcut (Qt::Key_Insert);				//Add branch
   3.874 -connect( a, SIGNAL( triggered() ), this, SLOT( editNewBranch() ) );
   3.875 -actionListBranches.append(a);
   3.876 -#if defined (Q_OS_MACX)
   3.877 -	// In OSX show different shortcut in menues, the keys work indepently always			
   3.878 -	actionAddBranch=alt;
   3.879 -#else	
   3.880 -	actionAddBranch=a;
   3.881 -#endif	
   3.882 -editMenu->addAction (actionAddBranch);
   3.883 -tb->addAction (actionAddBranch);
   3.884 -
   3.885 -
   3.886 -// Add branch by inserting it at selection
   3.887 -a = new QAction(tr( "Add branch (insert)","Edit menu" ), this);
   3.888 -a->setStatusTip ( tr( "Add a branch by inserting and making selection its child" ));
   3.889 -a->setShortcut (Qt::ALT + Qt::Key_Insert );		//Insert branch
   3.890 -a->setShortcutContext (Qt::WindowShortcut);
   3.891 -addAction (a);
   3.892 -connect( a, SIGNAL( triggered() ), this, SLOT( editNewBranchBefore() ) );
   3.893 -a->setEnabled (false);
   3.894 -actionListBranches.append(a);
   3.895 -actionAddBranchBefore=a;
   3.896 -a = new QAction(tr( "Add branch (insert)","Edit menu" ),this);
   3.897 -a->setStatusTip ( tr( "Add a branch by inserting and making selection its child" ));
   3.898 -a->setShortcut ( Qt::ALT + Qt::Key_A );			//Insert branch
   3.899 -a->setShortcutContext (Qt::WindowShortcut);
   3.900 -addAction (a);
   3.901 -connect( a, SIGNAL( triggered() ), this, SLOT( editNewBranchBefore() ) );
   3.902 -actionListBranches.append(a);
   3.903 -
   3.904 -// Add branch above
   3.905 -a = new QAction(tr( "Add branch above","Edit menu" ), this);
   3.906 -a->setStatusTip ( tr( "Add a branch above selection" ));
   3.907 -a->setShortcut (Qt::SHIFT+Qt::Key_Insert );		//Add branch above
   3.908 -a->setShortcutContext (Qt::WindowShortcut);
   3.909 -addAction (a);
   3.910 -connect( a, SIGNAL( triggered() ), this, SLOT( editNewBranchAbove() ) );
   3.911 -a->setEnabled (false);
   3.912 -actionListBranches.append(a);
   3.913 -actionAddBranchAbove=a;
   3.914 -a = new QAction(tr( "Add branch above","Edit menu" ), this);
   3.915 -a->setStatusTip ( tr( "Add a branch above selection" ));
   3.916 -a->setShortcut (Qt::SHIFT+Qt::Key_A );			//Add branch above
   3.917 -a->setShortcutContext (Qt::WindowShortcut);
   3.918 -addAction (a);
   3.919 -connect( a, SIGNAL( triggered() ), this, SLOT( editNewBranchAbove() ) );
   3.920 -actionListBranches.append(a);
   3.921 -
   3.922 -// Add branch below 
   3.923 -a = new QAction(tr( "Add branch below","Edit menu" ), this);
   3.924 -a->setStatusTip ( tr( "Add a branch below selection" ));
   3.925 -a->setShortcut (Qt::CTRL +Qt::Key_Insert );		//Add branch below
   3.926 -a->setShortcutContext (Qt::WindowShortcut);
   3.927 -addAction (a);
   3.928 -connect( a, SIGNAL( triggered() ), this, SLOT( editNewBranchBelow() ) );
   3.929 -a->setEnabled (false);
   3.930 -actionListBranches.append(a);
   3.931 -actionAddBranchBelow=a;
   3.932 -a = new QAction(tr( "Add branch below","Edit menu" ), this);
   3.933 -a->setStatusTip ( tr( "Add a branch below selection" ));
   3.934 -a->setShortcut (Qt::CTRL +Qt::Key_A );			// Add branch below
   3.935 -a->setShortcutContext (Qt::WindowShortcut);
   3.936 -addAction (a);
   3.937 -connect( a, SIGNAL( triggered() ), this, SLOT( editNewBranchBelow() ) );
   3.938 -actionListBranches.append(a);
   3.939 -
   3.940 -a = new QAction(QPixmap(iconPath+"up.png" ), tr( "Move up","Edit menu" ), this);
   3.941 -a->setStatusTip ( tr( "Move branch up" ) );
   3.942 -a->setShortcut (Qt::Key_PageUp );				// Move branch up
   3.943 -a->setEnabled (false);
   3.944 -tb->addAction (a);
   3.945 -editMenu->addAction (a);
   3.946 -connect( a, SIGNAL( triggered() ), this, SLOT( editMoveUp() ) );
   3.947 -actionMoveUp=a;
   3.948 -
   3.949 -a = new QAction( QPixmap( iconPath+"down.png"), tr( "Move down","Edit menu" ),this);
   3.950 -connect( a, SIGNAL( triggered() ), this, SLOT( editMoveDown() ) );
   3.951 -a->setStatusTip (tr( "Move branch down" ) );
   3.952 -a->setShortcut ( Qt::Key_PageDown );			// Move branch down
   3.953 -a->setEnabled (false);
   3.954 -tb->addAction (a);
   3.955 -editMenu->addAction (a);
   3.956 -actionMoveDown=a;
   3.957 -
   3.958 -a = new QAction(QPixmap(), tr( "&Detach","Context menu" ),this);
   3.959 -a->setStatusTip ( tr( "Detach branch and use as mapcenter","Context menu" ) );
   3.960 -a->setShortcut ( Qt::Key_D );					// Detach branch
   3.961 -editMenu->addAction (a);
   3.962 -connect( a, SIGNAL( triggered() ), this, SLOT( editDetach() ) );
   3.963 -actionDetach=a;
   3.964 -
   3.965 -a = new QAction( QPixmap(iconPath+"editsort.png" ), tr( "Sort children","Edit menu" ), this );
   3.966 -connect( a, SIGNAL( activated() ), this, SLOT( editSortChildren() ) );
   3.967 -a->setEnabled (true);
   3.968 -a->addTo( tb );
   3.969 -editMenu->addAction (a);
   3.970 -actionSortChildren=a;
   3.971 -
   3.972 -alt = new QAction( QPixmap(flagsPath+"flag-scrolled-right.png"), tr( "Scroll branch","Edit menu" ), this);
   3.973 -alt->setShortcut ( Qt::Key_S );					// Scroll branch
   3.974 -alt->setStatusTip (tr( "Scroll branch" )); 
   3.975 -connect( alt, SIGNAL( triggered() ), this, SLOT( editToggleScroll() ) );
   3.976 -#if defined(Q_OS_MACX)
   3.977 -	actionToggleScroll=alt;
   3.978 -#else	
   3.979 -	actionToggleScroll=a;
   3.980 -#endif	
   3.981 -actionToggleScroll->setEnabled (false);
   3.982 -actionToggleScroll->setToggleAction(true);
   3.983 -tb->addAction (actionToggleScroll);
   3.984 -editMenu->addAction ( actionToggleScroll);
   3.985 -editMenu->addAction (actionToggleScroll);
   3.986 -addAction (a);
   3.987 -addAction (alt);
   3.988 -actionListBranches.append(actionToggleScroll);
   3.989 -
   3.990 -a = new QAction( QPixmap(), tr( "Expand all branches","Edit menu" ), this);
   3.991 -a->setShortcut ( Qt::SHIFT + Qt::Key_X );		// Expand all branches 
   3.992 -a->setStatusTip (tr( "Expand all branches" )); 
   3.993 -connect( a, SIGNAL( triggered() ), this, SLOT( editExpandAll() ) );
   3.994 -actionExpandAll=a;
   3.995 -actionExpandAll->setEnabled (false);
   3.996 -actionExpandAll->setToggleAction(false);
   3.997 -//tb->addAction (actionExpandAll);
   3.998 -editMenu->addAction ( actionExpandAll);
   3.999 -addAction (a);
  3.1000 -actionListBranches.append(actionExpandAll);
  3.1001 -
  3.1002 -a = new QAction( QPixmap(), tr( "Expand one level","Edit menu" ), this);
  3.1003 -a->setShortcut ( Qt::Key_Greater );		// Expand one level in tree editor
  3.1004 -a->setStatusTip (tr( "Expand one level in tree editor" )); 
  3.1005 -connect( a, SIGNAL( triggered() ), this, SLOT( editExpandOneLevel() ) );
  3.1006 -a->setEnabled (false);
  3.1007 -a->setToggleAction(false);
  3.1008 -actionExpandOneLevel=a;
  3.1009 -//tb->addAction (a);
  3.1010 -editMenu->addAction ( a);
  3.1011 -addAction (a);
  3.1012 -actionListBranches.append(a);
  3.1013 -
  3.1014 -a = new QAction( QPixmap(), tr( "Collapse one level","Edit menu" ), this);
  3.1015 -a->setShortcut ( Qt::Key_Less);			// Collapse one level in tree editor
  3.1016 -a->setStatusTip (tr( "Collapse one level in tree editor" )); 
  3.1017 -connect( a, SIGNAL( triggered() ), this, SLOT( editCollapseOneLevel() ) );
  3.1018 -a->setEnabled (false);
  3.1019 -a->setToggleAction(false);
  3.1020 -actionCollapseOneLevel=a;
  3.1021 -//tb->addAction (a);
  3.1022 -editMenu->addAction ( a);
  3.1023 -addAction (a);
  3.1024 -actionListBranches.append(a);
  3.1025 -
  3.1026 -a = new QAction( tr( "Unscroll children","Edit menu" ), this);
  3.1027 -a->setStatusTip (tr( "Unscroll all scrolled branches in selected subtree" ));
  3.1028 -editMenu->addAction (a);
  3.1029 -connect( a, SIGNAL( triggered() ), this, SLOT( editUnscrollChildren() ) );
  3.1030 -
  3.1031 -editMenu->addSeparator();
  3.1032 -
  3.1033 -a = new QAction( QPixmap(iconPath+"find.png"), tr( "Find...","Edit menu"), this);
  3.1034 -a->setStatusTip (tr( "Find" ) );
  3.1035 -a->setShortcut (Qt::CTRL + Qt::Key_F );				//Find
  3.1036 -editMenu->addAction (a);
  3.1037 -connect( a, SIGNAL( triggered() ), this, SLOT( editOpenFindWindow() ) );
  3.1038 -
  3.1039 -editMenu->addSeparator();
  3.1040 -
  3.1041 -a = new QAction( QPixmap(flagsPath+"flag-url.png"), tr( "Open URL","Edit menu" ), this);
  3.1042 -a->setShortcut (Qt::SHIFT + Qt::Key_U );
  3.1043 -a->setShortcut (tr( "Open URL" ));
  3.1044 -tb->addAction (a);
  3.1045 -addAction(a);
  3.1046 -connect( a, SIGNAL( triggered() ), this, SLOT( editOpenURL() ) );
  3.1047 -actionOpenURL=a;
  3.1048 -
  3.1049 -a = new QAction( tr( "Open URL in new tab","Edit menu" ), this);
  3.1050 -a->setStatusTip (tr( "Open URL in new tab" ));
  3.1051 -//a->setShortcut (Qt::CTRL+Qt::Key_U );
  3.1052 -addAction(a);
  3.1053 -connect( a, SIGNAL( triggered() ), this, SLOT( editOpenURLTab() ) );
  3.1054 -actionOpenURLTab=a;
  3.1055 -
  3.1056 -a = new QAction( tr( "Open all URLs in subtree","Edit menu" ), this);
  3.1057 -a->setStatusTip (tr( "Open all URLs in subtree" ));
  3.1058 -a->setShortcut ( Qt::CTRL + Qt::Key_U );
  3.1059 -addAction(a);
  3.1060 -actionListBranches.append(a);
  3.1061 -connect( a, SIGNAL( triggered() ), this, SLOT( editOpenMultipleURLTabs() ) );
  3.1062 -actionOpenMultipleURLTabs=a;
  3.1063 -
  3.1064 -a = new QAction(QPixmap(), tr( "Edit URL...","Edit menu"), this);
  3.1065 -a->setStatusTip ( tr( "Edit URL" ) );
  3.1066 -a->setShortcut ( Qt::Key_U );
  3.1067 -a->setShortcutContext (Qt::WindowShortcut);
  3.1068 -actionListBranches.append(a);
  3.1069 -addAction(a);
  3.1070 -connect( a, SIGNAL( triggered() ), this, SLOT( editURL() ) );
  3.1071 -actionURL=a;
  3.1072 -
  3.1073 -a = new QAction(QPixmap(), tr( "Edit local URL...","Edit menu"), this);
  3.1074 -a->setStatusTip ( tr( "Edit local URL" ) );
  3.1075 -//a->setShortcut (Qt::SHIFT +  Qt::Key_U );
  3.1076 -a->setShortcutContext (Qt::WindowShortcut);
  3.1077 -actionListBranches.append(a);
  3.1078 -addAction(a);
  3.1079 -connect( a, SIGNAL( triggered() ), this, SLOT( editLocalURL() ) );
  3.1080 -actionLocalURL=a;
  3.1081 -
  3.1082 -a = new QAction( tr( "Use heading for URL","Edit menu" ), this);
  3.1083 -a->setStatusTip ( tr( "Use heading of selected branch as URL" ));
  3.1084 -a->setEnabled (false);
  3.1085 -actionListBranches.append(a);
  3.1086 -connect( a, SIGNAL( triggered() ), this, SLOT( editHeading2URL() ) );
  3.1087 -actionHeading2URL=a;
  3.1088 -
  3.1089 -a = new QAction(tr( "Create URL to Novell Bugzilla","Edit menu" ), this);
  3.1090 -a->setStatusTip ( tr( "Create URL to Novell Bugzilla" ));
  3.1091 -a->setEnabled (false);
  3.1092 -actionListBranches.append(a);
  3.1093 -a->setShortcut ( Qt::Key_B );
  3.1094 -a->setShortcutContext (Qt::WindowShortcut);
  3.1095 -addAction(a);
  3.1096 -connect( a, SIGNAL( triggered() ), this, SLOT( editBugzilla2URL() ) );
  3.1097 -actionBugzilla2URL=a;
  3.1098 -
  3.1099 -a = new QAction(tr( "Create URL to Novell FATE","Edit menu" ), this);
  3.1100 -a->setStatusTip ( tr( "Create URL to Novell FATE" ));
  3.1101 -a->setEnabled (false);
  3.1102 -actionListBranches.append(a);
  3.1103 -connect( a, SIGNAL( triggered() ), this, SLOT( editFATE2URL() ) );
  3.1104 -actionFATE2URL=a;
  3.1105 -
  3.1106 -a = new QAction(QPixmap(flagsPath+"flag-vymlink.png"), tr( "Open linked map","Edit menu" ), this);
  3.1107 -a->setStatusTip ( tr( "Jump to another vym map, if needed load it first" ));
  3.1108 -tb->addAction (a);
  3.1109 -a->setEnabled (false);
  3.1110 -connect( a, SIGNAL( triggered() ), this, SLOT( editOpenVymLink() ) );
  3.1111 -actionOpenVymLink=a;
  3.1112 -
  3.1113 -a = new QAction(QPixmap(), tr( "Open all vym links in subtree","Edit menu" ), this);
  3.1114 -a->setStatusTip ( tr( "Open all vym links in subtree" ));
  3.1115 -a->setEnabled (false);
  3.1116 -actionListBranches.append(a);
  3.1117 -connect( a, SIGNAL( triggered() ), this, SLOT( editOpenMultipleVymLinks() ) );
  3.1118 -actionOpenMultipleVymLinks=a;
  3.1119 -
  3.1120 -
  3.1121 -a = new QAction(tr( "Edit vym link...","Edit menu" ), this);
  3.1122 -a->setEnabled (false);
  3.1123 -a->setStatusTip ( tr( "Edit link to another vym map" ));
  3.1124 -connect( a, SIGNAL( triggered() ), this, SLOT( editVymLink() ) );
  3.1125 -actionListBranches.append(a);
  3.1126 -actionVymLink=a;
  3.1127 -
  3.1128 -a = new QAction(tr( "Delete vym link","Edit menu" ),this);
  3.1129 -a->setStatusTip ( tr( "Delete link to another vym map" ));
  3.1130 -a->setEnabled (false);
  3.1131 -connect( a, SIGNAL( triggered() ), this, SLOT( editDeleteVymLink() ) );
  3.1132 -actionDeleteVymLink=a;
  3.1133 -
  3.1134 -a = new QAction(QPixmap(flagsPath+"flag-hideexport.png"), tr( "Hide in exports","Edit menu" ), this);
  3.1135 -a->setStatusTip ( tr( "Hide object in exports" ) );
  3.1136 -a->setShortcut (Qt::Key_H );
  3.1137 -a->setToggleAction(true);
  3.1138 -tb->addAction (a);
  3.1139 -a->setEnabled (false);
  3.1140 -connect( a, SIGNAL( triggered() ), this, SLOT( editToggleHideExport() ) );
  3.1141 -actionToggleHideExport=a;
  3.1142 -
  3.1143 -a = new QAction(tr( "Add timestamp","Edit menu" ), this);
  3.1144 -a->setStatusTip ( tr( "Add timestamp" ));
  3.1145 -a->setEnabled (false);
  3.1146 -actionListBranches.append(a);
  3.1147 -a->setShortcut ( Qt::Key_T );	// Add timestamp
  3.1148 -a->setShortcutContext (Qt::WindowShortcut);
  3.1149 -addAction(a);
  3.1150 -connect( a, SIGNAL( triggered() ), this, SLOT( editAddTimestamp() ) );
  3.1151 -actionAddTimestamp=a;
  3.1152 -
  3.1153 -a = new QAction(tr( "Edit Map Info...","Edit menu" ),this);
  3.1154 -a->setStatusTip ( tr( "Edit Map Info" ));
  3.1155 -a->setEnabled (true);
  3.1156 -connect( a, SIGNAL( triggered() ), this, SLOT( editMapInfo() ) );
  3.1157 -actionMapInfo=a;
  3.1158 -
  3.1159 -// Import at selection (adding to selection)
  3.1160 -a = new QAction( tr( "Add map (insert)","Edit menu" ),this);
  3.1161 -a->setStatusTip (tr( "Add map at selection" ));
  3.1162 -connect( a, SIGNAL( triggered() ), this, SLOT( editImportAdd() ) );
  3.1163 -a->setEnabled (false);
  3.1164 -actionListBranches.append(a);
  3.1165 -actionImportAdd=a;
  3.1166 -
  3.1167 -// Import at selection (replacing selection)
  3.1168 -a = new QAction( tr( "Add map (replace)","Edit menu" ), this);
  3.1169 -a->setStatusTip (tr( "Replace selection with map" ));
  3.1170 -connect( a, SIGNAL( triggered() ), this, SLOT( editImportReplace() ) );
  3.1171 -a->setEnabled (false);
  3.1172 -actionListBranches.append(a);
  3.1173 -actionImportReplace=a;
  3.1174 -
  3.1175 -// Save selection 
  3.1176 -a = new QAction( tr( "Save selection","Edit menu" ), this);
  3.1177 -a->setStatusTip (tr( "Save selection" ));
  3.1178 -connect( a, SIGNAL( triggered() ), this, SLOT( editSaveBranch() ) );
  3.1179 -a->setEnabled (false);
  3.1180 -actionListBranches.append(a);
  3.1181 -actionSaveBranch=a;
  3.1182 -
  3.1183 -// Only remove branch, not its children
  3.1184 -a = new QAction(tr( "Remove only branch ","Edit menu" ), this);
  3.1185 -a->setStatusTip ( tr( "Remove only branch and keep its children" ));
  3.1186 -a->setShortcut (Qt::ALT + Qt::Key_Delete );
  3.1187 -connect( a, SIGNAL( triggered() ), this, SLOT( editDeleteKeepChildren() ) );
  3.1188 -a->setEnabled (false);
  3.1189 -addAction (a);
  3.1190 -actionListBranches.append(a);
  3.1191 -actionDeleteKeepChildren=a;
  3.1192 -
  3.1193 -// Only remove children of a branch
  3.1194 -a = new QAction( tr( "Remove children","Edit menu" ), this);
  3.1195 -a->setStatusTip (tr( "Remove children of branch" ));
  3.1196 -a->setShortcut (Qt::SHIFT + Qt::Key_Delete );
  3.1197 -connect( a, SIGNAL( triggered() ), this, SLOT( editDeleteChildren() ) );
  3.1198 -a->setEnabled (false);
  3.1199 -actionListBranches.append(a);
  3.1200 -actionDeleteChildren=a;
  3.1201 -
  3.1202 -a = new QAction( tr( "Add Image...","Edit menu" ), this);
  3.1203 -a->setStatusTip (tr( "Add Image" ));
  3.1204 -connect( a, SIGNAL( triggered() ), this, SLOT( editLoadImage() ) );
  3.1205 -actionLoadImage=a;
  3.1206 -
  3.1207 -a = new QAction( tr( "Property window","Dialog to edit properties of selection" )+QString ("..."), this);
  3.1208 -a->setStatusTip (tr( "Set properties for selection" ));
  3.1209 -a->setShortcut ( Qt::CTRL + Qt::Key_I );		//Property window
  3.1210 -a->setShortcutContext (Qt::WindowShortcut);
  3.1211 -a->setToggleAction (true);
  3.1212 -addAction (a);
  3.1213 -connect( a, SIGNAL( triggered() ), this, SLOT( windowToggleProperty() ) );
  3.1214 -actionViewTogglePropertyWindow=a;
  3.1215 +	QToolBar *tb = addToolBar( tr ("&Actions toolbar","Toolbar name") );
  3.1216 +	tb->setLabel( "Edit Actions" );
  3.1217 +	tb->setObjectName ("actionsTB");
  3.1218 +	QMenu *editMenu = menuBar()->addMenu( tr("&Edit","Edit menu") );
  3.1219 +
  3.1220 +	QAction *a;
  3.1221 +	QAction *alt;
  3.1222 +	a = new QAction( QPixmap( iconPath+"undo.png"), tr( "&Undo","Edit menu" ),this);
  3.1223 +	connect( a, SIGNAL( triggered() ), this, SLOT( editUndo() ) );
  3.1224 +	a->setStatusTip (tr( "Undo" ) );
  3.1225 +	a->setShortcut ( Qt::CTRL + Qt::Key_Z );		//Undo last action
  3.1226 +	a->setEnabled (false);
  3.1227 +	tb->addAction (a);
  3.1228 +	editMenu->addAction (a);
  3.1229 +	actionUndo=a;
  3.1230 +
  3.1231 +	a = new QAction( QPixmap( iconPath+"redo.png"), tr( "&Redo","Edit menu" ), this); 
  3.1232 +	a->setStatusTip (tr( "Redo" ));
  3.1233 +	a->setShortcut (Qt::CTRL + Qt::Key_Y );			//Redo last action
  3.1234 +	tb->addAction (a);
  3.1235 +	editMenu->addAction (a);
  3.1236 +	connect( a, SIGNAL( triggered() ), this, SLOT( editRedo() ) );
  3.1237 +	actionRedo=a;
  3.1238 +
  3.1239 +	editMenu->addSeparator();
  3.1240 +	a = new QAction(QPixmap( iconPath+"editcopy.png"), tr( "&Copy","Edit menu" ), this);
  3.1241 +	a->setStatusTip ( tr( "Copy" ) );
  3.1242 +	a->setShortcut (Qt::CTRL + Qt::Key_C );			//Copy
  3.1243 +	a->setEnabled (false);
  3.1244 +	tb->addAction (a);
  3.1245 +	editMenu->addAction (a);
  3.1246 +	connect( a, SIGNAL( triggered() ), this, SLOT( editCopy() ) );
  3.1247 +	actionCopy=a;
  3.1248 +
  3.1249 +	a = new QAction(QPixmap( iconPath+"editcut.png" ), tr( "Cu&t","Edit menu" ), this);
  3.1250 +	a->setStatusTip ( tr( "Cut" ) );
  3.1251 +	a->setShortcut (Qt::CTRL + Qt::Key_X );			//Cut
  3.1252 +	a->setEnabled (false);
  3.1253 +	tb->addAction (a);
  3.1254 +	editMenu->addAction (a);
  3.1255 +	actionCut=a;
  3.1256 +	connect( a, SIGNAL( triggered() ), this, SLOT( editCut() ) );
  3.1257 +
  3.1258 +	a = new QAction(QPixmap( iconPath+"editpaste.png"), tr( "&Paste","Edit menu" ),this);
  3.1259 +	connect( a, SIGNAL( triggered() ), this, SLOT( editPaste() ) );
  3.1260 +	a->setStatusTip ( tr( "Paste" ) );
  3.1261 +	a->setShortcut ( Qt::CTRL + Qt::Key_V );		//Paste
  3.1262 +	a->setEnabled (false);
  3.1263 +	tb->addAction (a);
  3.1264 +	editMenu->addAction (a);
  3.1265 +	actionPaste=a;
  3.1266 +
  3.1267 +	// Shortcut to delete selection
  3.1268 +	a = new QAction( tr( "Delete Selection","Edit menu" ),this);
  3.1269 +	a->setStatusTip (tr( "Delete Selection" ));
  3.1270 +	a->setShortcut ( Qt::Key_Delete);				//Delete selection
  3.1271 +	a->setShortcutContext (Qt::WindowShortcut);
  3.1272 +	addAction (a);
  3.1273 +	connect( a, SIGNAL( triggered() ), this, SLOT( editDeleteSelection() ) );
  3.1274 +	actionDelete=a;
  3.1275 +
  3.1276 +	// Shortcut to add attribute
  3.1277 +	a= new QAction(tr( "Add attribute" ), this);
  3.1278 +	a->setShortcut ( Qt::Key_Q);	
  3.1279 +	a->setShortcutContext (Qt::WindowShortcut);
  3.1280 +	addAction (a);
  3.1281 +	connect( a, SIGNAL( triggered() ), this, SLOT( editAddAttribute() ) );
  3.1282 +	actionAddAttribute= a;
  3.1283 +
  3.1284 +
  3.1285 +	// Shortcut to add mapcenter
  3.1286 +	a= new QAction(QPixmap(iconPath+"newmapcenter.png"),tr( "Add mapcenter","Canvas context menu" ), this);
  3.1287 +	a->setShortcut ( Qt::Key_M);	
  3.1288 +	a->setShortcutContext (Qt::WindowShortcut);
  3.1289 +	connect( a, SIGNAL( triggered() ), this, SLOT( editAddMapCenter() ) );
  3.1290 +	//actionListBranches.append(a);
  3.1291 +	tb->addAction (a);
  3.1292 +	actionAddMapCenter = a;
  3.1293 +
  3.1294 +
  3.1295 +	// Shortcut to add branch
  3.1296 +	alt = new QAction(QPixmap(iconPath+"newbranch.png"), tr( "Add branch as child","Edit menu" ), this);
  3.1297 +	alt->setStatusTip ( tr( "Add a branch as child of selection" ));
  3.1298 +	alt->setShortcut (Qt::Key_A);					//Add branch
  3.1299 +	alt->setShortcutContext (Qt::WindowShortcut);
  3.1300 +	addAction (alt);
  3.1301 +	connect( alt, SIGNAL( triggered() ), this, SLOT( editNewBranch() ) );
  3.1302 +	a = new QAction(QPixmap(iconPath+"newbranch.png"), tr( "Add branch as child","Edit menu" ), this);
  3.1303 +	a->setStatusTip ( tr( "Add a branch as child of selection" ));
  3.1304 +	a->setShortcut (Qt::Key_Insert);				//Add branch
  3.1305 +	connect( a, SIGNAL( triggered() ), this, SLOT( editNewBranch() ) );
  3.1306 +	actionListBranches.append(a);
  3.1307 +	#if defined (Q_OS_MACX)
  3.1308 +		// In OSX show different shortcut in menues, the keys work indepently always			
  3.1309 +		actionAddBranch=alt;
  3.1310 +	#else	
  3.1311 +		actionAddBranch=a;
  3.1312 +	#endif	
  3.1313 +	editMenu->addAction (actionAddBranch);
  3.1314 +	tb->addAction (actionAddBranch);
  3.1315 +
  3.1316 +
  3.1317 +	// Add branch by inserting it at selection
  3.1318 +	a = new QAction(tr( "Add branch (insert)","Edit menu" ), this);
  3.1319 +	a->setStatusTip ( tr( "Add a branch by inserting and making selection its child" ));
  3.1320 +	a->setShortcut (Qt::ALT + Qt::Key_Insert );		//Insert branch
  3.1321 +	a->setShortcutContext (Qt::WindowShortcut);
  3.1322 +	addAction (a);
  3.1323 +	connect( a, SIGNAL( triggered() ), this, SLOT( editNewBranchBefore() ) );
  3.1324 +	a->setEnabled (false);
  3.1325 +	actionListBranches.append(a);
  3.1326 +	actionAddBranchBefore=a;
  3.1327 +	a = new QAction(tr( "Add branch (insert)","Edit menu" ),this);
  3.1328 +	a->setStatusTip ( tr( "Add a branch by inserting and making selection its child" ));
  3.1329 +	a->setShortcut ( Qt::ALT + Qt::Key_A );			//Insert branch
  3.1330 +	a->setShortcutContext (Qt::WindowShortcut);
  3.1331 +	addAction (a);
  3.1332 +	connect( a, SIGNAL( triggered() ), this, SLOT( editNewBranchBefore() ) );
  3.1333 +	actionListBranches.append(a);
  3.1334 +
  3.1335 +	// Add branch above
  3.1336 +	a = new QAction(tr( "Add branch above","Edit menu" ), this);
  3.1337 +	a->setStatusTip ( tr( "Add a branch above selection" ));
  3.1338 +	a->setShortcut (Qt::SHIFT+Qt::Key_Insert );		//Add branch above
  3.1339 +	a->setShortcutContext (Qt::WindowShortcut);
  3.1340 +	addAction (a);
  3.1341 +	connect( a, SIGNAL( triggered() ), this, SLOT( editNewBranchAbove() ) );
  3.1342 +	a->setEnabled (false);
  3.1343 +	actionListBranches.append(a);
  3.1344 +	actionAddBranchAbove=a;
  3.1345 +	a = new QAction(tr( "Add branch above","Edit menu" ), this);
  3.1346 +	a->setStatusTip ( tr( "Add a branch above selection" ));
  3.1347 +	a->setShortcut (Qt::SHIFT+Qt::Key_A );			//Add branch above
  3.1348 +	a->setShortcutContext (Qt::WindowShortcut);
  3.1349 +	addAction (a);
  3.1350 +	connect( a, SIGNAL( triggered() ), this, SLOT( editNewBranchAbove() ) );
  3.1351 +	actionListBranches.append(a);
  3.1352 +
  3.1353 +	// Add branch below 
  3.1354 +	a = new QAction(tr( "Add branch below","Edit menu" ), this);
  3.1355 +	a->setStatusTip ( tr( "Add a branch below selection" ));
  3.1356 +	a->setShortcut (Qt::CTRL +Qt::Key_Insert );		//Add branch below
  3.1357 +	a->setShortcutContext (Qt::WindowShortcut);
  3.1358 +	addAction (a);
  3.1359 +	connect( a, SIGNAL( triggered() ), this, SLOT( editNewBranchBelow() ) );
  3.1360 +	a->setEnabled (false);
  3.1361 +	actionListBranches.append(a);
  3.1362 +	actionAddBranchBelow=a;
  3.1363 +	a = new QAction(tr( "Add branch below","Edit menu" ), this);
  3.1364 +	a->setStatusTip ( tr( "Add a branch below selection" ));
  3.1365 +	a->setShortcut (Qt::CTRL +Qt::Key_A );			// Add branch below
  3.1366 +	a->setShortcutContext (Qt::WindowShortcut);
  3.1367 +	addAction (a);
  3.1368 +	connect( a, SIGNAL( triggered() ), this, SLOT( editNewBranchBelow() ) );
  3.1369 +	actionListBranches.append(a);
  3.1370 +
  3.1371 +	a = new QAction(QPixmap(iconPath+"up.png" ), tr( "Move up","Edit menu" ), this);
  3.1372 +	a->setStatusTip ( tr( "Move branch up" ) );
  3.1373 +	a->setShortcut (Qt::Key_PageUp );				// Move branch up
  3.1374 +	a->setEnabled (false);
  3.1375 +	tb->addAction (a);
  3.1376 +	editMenu->addAction (a);
  3.1377 +	connect( a, SIGNAL( triggered() ), this, SLOT( editMoveUp() ) );
  3.1378 +	actionMoveUp=a;
  3.1379 +
  3.1380 +	a = new QAction( QPixmap( iconPath+"down.png"), tr( "Move down","Edit menu" ),this);
  3.1381 +	connect( a, SIGNAL( triggered() ), this, SLOT( editMoveDown() ) );
  3.1382 +	a->setStatusTip (tr( "Move branch down" ) );
  3.1383 +	a->setShortcut ( Qt::Key_PageDown );			// Move branch down
  3.1384 +	a->setEnabled (false);
  3.1385 +	tb->addAction (a);
  3.1386 +	editMenu->addAction (a);
  3.1387 +	actionMoveDown=a;
  3.1388 +
  3.1389 +	a = new QAction(QPixmap(), tr( "&Detach","Context menu" ),this);
  3.1390 +	a->setStatusTip ( tr( "Detach branch and use as mapcenter","Context menu" ) );
  3.1391 +	a->setShortcut ( Qt::Key_D );					// Detach branch
  3.1392 +	editMenu->addAction (a);
  3.1393 +	connect( a, SIGNAL( triggered() ), this, SLOT( editDetach() ) );
  3.1394 +	actionDetach=a;
  3.1395 +
  3.1396 +	a = new QAction( QPixmap(iconPath+"editsort.png" ), tr( "Sort children","Edit menu" ), this );
  3.1397 +	connect( a, SIGNAL( activated() ), this, SLOT( editSortChildren() ) );
  3.1398 +	a->setEnabled (true);
  3.1399 +	a->addTo( tb );
  3.1400 +	editMenu->addAction (a);
  3.1401 +	actionSortChildren=a;
  3.1402 +
  3.1403 +	alt = new QAction( QPixmap(flagsPath+"flag-scrolled-right.png"), tr( "Scroll branch","Edit menu" ), this);
  3.1404 +	alt->setShortcut ( Qt::Key_S );					// Scroll branch
  3.1405 +	alt->setStatusTip (tr( "Scroll branch" )); 
  3.1406 +	connect( alt, SIGNAL( triggered() ), this, SLOT( editToggleScroll() ) );
  3.1407 +	#if defined(Q_OS_MACX)
  3.1408 +		actionToggleScroll=alt;
  3.1409 +	#else	
  3.1410 +		actionToggleScroll=a;
  3.1411 +	#endif	
  3.1412 +	actionToggleScroll->setEnabled (false);
  3.1413 +	actionToggleScroll->setToggleAction(true);
  3.1414 +	tb->addAction (actionToggleScroll);
  3.1415 +	editMenu->addAction ( actionToggleScroll);
  3.1416 +	editMenu->addAction (actionToggleScroll);
  3.1417 +	addAction (a);
  3.1418 +	addAction (alt);
  3.1419 +	actionListBranches.append(actionToggleScroll);
  3.1420 +
  3.1421 +	a = new QAction( QPixmap(), tr( "Expand all branches","Edit menu" ), this);
  3.1422 +	a->setShortcut ( Qt::SHIFT + Qt::Key_X );		// Expand all branches 
  3.1423 +	a->setStatusTip (tr( "Expand all branches" )); 
  3.1424 +	connect( a, SIGNAL( triggered() ), this, SLOT( editExpandAll() ) );
  3.1425 +	actionExpandAll=a;
  3.1426 +	actionExpandAll->setEnabled (false);
  3.1427 +	actionExpandAll->setToggleAction(false);
  3.1428 +	//tb->addAction (actionExpandAll);
  3.1429 +	editMenu->addAction ( actionExpandAll);
  3.1430 +	addAction (a);
  3.1431 +	actionListBranches.append(actionExpandAll);
  3.1432 +
  3.1433 +	a = new QAction( QPixmap(), tr( "Expand one level","Edit menu" ), this);
  3.1434 +	a->setShortcut ( Qt::Key_Greater );		// Expand one level in tree editor
  3.1435 +	a->setStatusTip (tr( "Expand one level in tree editor" )); 
  3.1436 +	connect( a, SIGNAL( triggered() ), this, SLOT( editExpandOneLevel() ) );
  3.1437 +	a->setEnabled (false);
  3.1438 +	a->setToggleAction(false);
  3.1439 +	actionExpandOneLevel=a;
  3.1440 +	//tb->addAction (a);
  3.1441 +	editMenu->addAction ( a);
  3.1442 +	addAction (a);
  3.1443 +	actionListBranches.append(a);
  3.1444 +
  3.1445 +	a = new QAction( QPixmap(), tr( "Collapse one level","Edit menu" ), this);
  3.1446 +	a->setShortcut ( Qt::Key_Less);			// Collapse one level in tree editor
  3.1447 +	a->setStatusTip (tr( "Collapse one level in tree editor" )); 
  3.1448 +	connect( a, SIGNAL( triggered() ), this, SLOT( editCollapseOneLevel() ) );
  3.1449 +	a->setEnabled (false);
  3.1450 +	a->setToggleAction(false);
  3.1451 +	actionCollapseOneLevel=a;
  3.1452 +	//tb->addAction (a);
  3.1453 +	editMenu->addAction ( a);
  3.1454 +	addAction (a);
  3.1455 +	actionListBranches.append(a);
  3.1456 +
  3.1457 +	a = new QAction( tr( "Unscroll children","Edit menu" ), this);
  3.1458 +	a->setStatusTip (tr( "Unscroll all scrolled branches in selected subtree" ));
  3.1459 +	editMenu->addAction (a);
  3.1460 +	connect( a, SIGNAL( triggered() ), this, SLOT( editUnscrollChildren() ) );
  3.1461 +
  3.1462 +	editMenu->addSeparator();
  3.1463 +
  3.1464 +	a = new QAction( QPixmap(iconPath+"find.png"), tr( "Find...","Edit menu"), this);
  3.1465 +	a->setStatusTip (tr( "Find" ) );
  3.1466 +	a->setShortcut (Qt::CTRL + Qt::Key_F );				//Find
  3.1467 +	editMenu->addAction (a);
  3.1468 +	connect( a, SIGNAL( triggered() ), this, SLOT( editOpenFindWidget() ) );
  3.1469 +
  3.1470 +	editMenu->addSeparator();
  3.1471 +
  3.1472 +	a = new QAction( QPixmap(flagsPath+"flag-url.png"), tr( "Open URL","Edit menu" ), this);
  3.1473 +	a->setShortcut (Qt::SHIFT + Qt::Key_U );
  3.1474 +	a->setShortcut (tr( "Open URL" ));
  3.1475 +	tb->addAction (a);
  3.1476 +	addAction(a);
  3.1477 +	connect( a, SIGNAL( triggered() ), this, SLOT( editOpenURL() ) );
  3.1478 +	actionOpenURL=a;
  3.1479 +
  3.1480 +	a = new QAction( tr( "Open URL in new tab","Edit menu" ), this);
  3.1481 +	a->setStatusTip (tr( "Open URL in new tab" ));
  3.1482 +	//a->setShortcut (Qt::CTRL+Qt::Key_U );
  3.1483 +	addAction(a);
  3.1484 +	connect( a, SIGNAL( triggered() ), this, SLOT( editOpenURLTab() ) );
  3.1485 +	actionOpenURLTab=a;
  3.1486 +
  3.1487 +	a = new QAction( tr( "Open all URLs in subtree","Edit menu" ), this);
  3.1488 +	a->setStatusTip (tr( "Open all URLs in subtree" ));
  3.1489 +	a->setShortcut ( Qt::CTRL + Qt::Key_U );
  3.1490 +	addAction(a);
  3.1491 +	actionListBranches.append(a);
  3.1492 +	connect( a, SIGNAL( triggered() ), this, SLOT( editOpenMultipleURLTabs() ) );
  3.1493 +	actionOpenMultipleURLTabs=a;
  3.1494 +
  3.1495 +	a = new QAction(QPixmap(), tr( "Edit URL...","Edit menu"), this);
  3.1496 +	a->setStatusTip ( tr( "Edit URL" ) );
  3.1497 +	a->setShortcut ( Qt::Key_U );
  3.1498 +	a->setShortcutContext (Qt::WindowShortcut);
  3.1499 +	actionListBranches.append(a);
  3.1500 +	addAction(a);
  3.1501 +	connect( a, SIGNAL( triggered() ), this, SLOT( editURL() ) );
  3.1502 +	actionURL=a;
  3.1503 +
  3.1504 +	a = new QAction(QPixmap(), tr( "Edit local URL...","Edit menu"), this);
  3.1505 +	a->setStatusTip ( tr( "Edit local URL" ) );
  3.1506 +	//a->setShortcut (Qt::SHIFT +  Qt::Key_U );
  3.1507 +	a->setShortcutContext (Qt::WindowShortcut);
  3.1508 +	actionListBranches.append(a);
  3.1509 +	addAction(a);
  3.1510 +	connect( a, SIGNAL( triggered() ), this, SLOT( editLocalURL() ) );
  3.1511 +	actionLocalURL=a;
  3.1512 +
  3.1513 +	a = new QAction( tr( "Use heading for URL","Edit menu" ), this);
  3.1514 +	a->setStatusTip ( tr( "Use heading of selected branch as URL" ));
  3.1515 +	a->setEnabled (false);
  3.1516 +	actionListBranches.append(a);
  3.1517 +	connect( a, SIGNAL( triggered() ), this, SLOT( editHeading2URL() ) );
  3.1518 +	actionHeading2URL=a;
  3.1519 +
  3.1520 +	a = new QAction(tr( "Create URL to Novell Bugzilla","Edit menu" ), this);
  3.1521 +	a->setStatusTip ( tr( "Create URL to Novell Bugzilla" ));
  3.1522 +	a->setEnabled (false);
  3.1523 +	actionListBranches.append(a);
  3.1524 +	a->setShortcut ( Qt::Key_B );
  3.1525 +	a->setShortcutContext (Qt::WindowShortcut);
  3.1526 +	addAction(a);
  3.1527 +	connect( a, SIGNAL( triggered() ), this, SLOT( editBugzilla2URL() ) );
  3.1528 +	actionBugzilla2URL=a;
  3.1529 +
  3.1530 +	a = new QAction(tr( "Create URL to Novell FATE","Edit menu" ), this);
  3.1531 +	a->setStatusTip ( tr( "Create URL to Novell FATE" ));
  3.1532 +	a->setEnabled (false);
  3.1533 +	actionListBranches.append(a);
  3.1534 +	connect( a, SIGNAL( triggered() ), this, SLOT( editFATE2URL() ) );
  3.1535 +	actionFATE2URL=a;
  3.1536 +
  3.1537 +	a = new QAction(QPixmap(flagsPath+"flag-vymlink.png"), tr( "Open linked map","Edit menu" ), this);
  3.1538 +	a->setStatusTip ( tr( "Jump to another vym map, if needed load it first" ));
  3.1539 +	tb->addAction (a);
  3.1540 +	a->setEnabled (false);
  3.1541 +	connect( a, SIGNAL( triggered() ), this, SLOT( editOpenVymLink() ) );
  3.1542 +	actionOpenVymLink=a;
  3.1543 +
  3.1544 +	a = new QAction(QPixmap(), tr( "Open all vym links in subtree","Edit menu" ), this);
  3.1545 +	a->setStatusTip ( tr( "Open all vym links in subtree" ));
  3.1546 +	a->setEnabled (false);
  3.1547 +	actionListBranches.append(a);
  3.1548 +	connect( a, SIGNAL( triggered() ), this, SLOT( editOpenMultipleVymLinks() ) );
  3.1549 +	actionOpenMultipleVymLinks=a;
  3.1550 +
  3.1551 +
  3.1552 +	a = new QAction(tr( "Edit vym link...","Edit menu" ), this);
  3.1553 +	a->setEnabled (false);
  3.1554 +	a->setStatusTip ( tr( "Edit link to another vym map" ));
  3.1555 +	connect( a, SIGNAL( triggered() ), this, SLOT( editVymLink() ) );
  3.1556 +	actionListBranches.append(a);
  3.1557 +	actionVymLink=a;
  3.1558 +
  3.1559 +	a = new QAction(tr( "Delete vym link","Edit menu" ),this);
  3.1560 +	a->setStatusTip ( tr( "Delete link to another vym map" ));
  3.1561 +	a->setEnabled (false);
  3.1562 +	connect( a, SIGNAL( triggered() ), this, SLOT( editDeleteVymLink() ) );
  3.1563 +	actionDeleteVymLink=a;
  3.1564 +
  3.1565 +	a = new QAction(QPixmap(flagsPath+"flag-hideexport.png"), tr( "Hide in exports","Edit menu" ), this);
  3.1566 +	a->setStatusTip ( tr( "Hide object in exports" ) );
  3.1567 +	a->setShortcut (Qt::Key_H );
  3.1568 +	a->setToggleAction(true);
  3.1569 +	tb->addAction (a);
  3.1570 +	a->setEnabled (false);
  3.1571 +	connect( a, SIGNAL( triggered() ), this, SLOT( editToggleHideExport() ) );
  3.1572 +	actionToggleHideExport=a;
  3.1573 +
  3.1574 +	a = new QAction(tr( "Add timestamp","Edit menu" ), this);
  3.1575 +	a->setStatusTip ( tr( "Add timestamp" ));
  3.1576 +	a->setEnabled (false);
  3.1577 +	actionListBranches.append(a);
  3.1578 +	a->setShortcut ( Qt::Key_T );	// Add timestamp
  3.1579 +	a->setShortcutContext (Qt::WindowShortcut);
  3.1580 +	addAction(a);
  3.1581 +	connect( a, SIGNAL( triggered() ), this, SLOT( editAddTimestamp() ) );
  3.1582 +	actionAddTimestamp=a;
  3.1583 +
  3.1584 +	a = new QAction(tr( "Edit Map Info...","Edit menu" ),this);
  3.1585 +	a->setStatusTip ( tr( "Edit Map Info" ));
  3.1586 +	a->setEnabled (true);
  3.1587 +	connect( a, SIGNAL( triggered() ), this, SLOT( editMapInfo() ) );
  3.1588 +	actionMapInfo=a;
  3.1589 +
  3.1590 +	// Import at selection (adding to selection)
  3.1591 +	a = new QAction( tr( "Add map (insert)","Edit menu" ),this);
  3.1592 +	a->setStatusTip (tr( "Add map at selection" ));
  3.1593 +	connect( a, SIGNAL( triggered() ), this, SLOT( editImportAdd() ) );
  3.1594 +	a->setEnabled (false);
  3.1595 +	actionListBranches.append(a);
  3.1596 +	actionImportAdd=a;
  3.1597 +
  3.1598 +	// Import at selection (replacing selection)
  3.1599 +	a = new QAction( tr( "Add map (replace)","Edit menu" ), this);
  3.1600 +	a->setStatusTip (tr( "Replace selection with map" ));
  3.1601 +	connect( a, SIGNAL( triggered() ), this, SLOT( editImportReplace() ) );
  3.1602 +	a->setEnabled (false);
  3.1603 +	actionListBranches.append(a);
  3.1604 +	actionImportReplace=a;
  3.1605 +
  3.1606 +	// Save selection 
  3.1607 +	a = new QAction( tr( "Save selection","Edit menu" ), this);
  3.1608 +	a->setStatusTip (tr( "Save selection" ));
  3.1609 +	connect( a, SIGNAL( triggered() ), this, SLOT( editSaveBranch() ) );
  3.1610 +	a->setEnabled (false);
  3.1611 +	actionListBranches.append(a);
  3.1612 +	actionSaveBranch=a;
  3.1613 +
  3.1614 +	// Only remove branch, not its children
  3.1615 +	a = new QAction(tr( "Remove only branch ","Edit menu" ), this);
  3.1616 +	a->setStatusTip ( tr( "Remove only branch and keep its children" ));
  3.1617 +	a->setShortcut (Qt::ALT + Qt::Key_Delete );
  3.1618 +	connect( a, SIGNAL( triggered() ), this, SLOT( editDeleteKeepChildren() ) );
  3.1619 +	a->setEnabled (false);
  3.1620 +	addAction (a);
  3.1621 +	actionListBranches.append(a);
  3.1622 +	actionDeleteKeepChildren=a;
  3.1623 +
  3.1624 +	// Only remove children of a branch
  3.1625 +	a = new QAction( tr( "Remove children","Edit menu" ), this);
  3.1626 +	a->setStatusTip (tr( "Remove children of branch" ));
  3.1627 +	a->setShortcut (Qt::SHIFT + Qt::Key_Delete );
  3.1628 +	connect( a, SIGNAL( triggered() ), this, SLOT( editDeleteChildren() ) );
  3.1629 +	a->setEnabled (false);
  3.1630 +	actionListBranches.append(a);
  3.1631 +	actionDeleteChildren=a;
  3.1632 +
  3.1633 +	a = new QAction( tr( "Add Image...","Edit menu" ), this);
  3.1634 +	a->setStatusTip (tr( "Add Image" ));
  3.1635 +	connect( a, SIGNAL( triggered() ), this, SLOT( editLoadImage() ) );
  3.1636 +	actionLoadImage=a;
  3.1637 +
  3.1638 +	a = new QAction( tr( "Property window","Dialog to edit properties of selection" )+QString ("..."), this);
  3.1639 +	a->setStatusTip (tr( "Set properties for selection" ));
  3.1640 +	a->setShortcut ( Qt::CTRL + Qt::Key_I );		//Property window
  3.1641 +	a->setShortcutContext (Qt::WindowShortcut);
  3.1642 +	a->setToggleAction (true);
  3.1643 +	addAction (a);
  3.1644 +	connect( a, SIGNAL( triggered() ), this, SLOT( windowToggleProperty() ) );
  3.1645 +	actionViewTogglePropertyWindow=a;
  3.1646  }
  3.1647  
  3.1648  // Format Actions
  3.1649  void Main::setupFormatActions()
  3.1650  {
  3.1651 -QMenu *formatMenu = menuBar()->addMenu (tr ("F&ormat","Format menu"));
  3.1652 -
  3.1653 -QToolBar *tb = addToolBar( tr("Format Actions","Format Toolbar name"));
  3.1654 -tb->setObjectName ("formatTB");
  3.1655 -QAction *a;
  3.1656 -QPixmap pix( 16,16);
  3.1657 -pix.fill (Qt::black);
  3.1658 -a= new QAction(pix, tr( "Set &Color" )+QString("..."), this);
  3.1659 -a->setStatusTip ( tr( "Set Color" ));
  3.1660 -connect( a, SIGNAL( triggered() ), this, SLOT( formatSelectColor() ) );
  3.1661 -a->addTo( tb );
  3.1662 -formatMenu->addAction (a);
  3.1663 -actionFormatColor=a;
  3.1664 -a= new QAction( QPixmap(iconPath+"formatcolorpicker.png"), tr( "Pic&k color","Edit menu" ), this);
  3.1665 -a->setStatusTip (tr( "Pick color\nHint: You can pick a color from another branch and color using CTRL+Left Button" ) );
  3.1666 -a->setShortcut (Qt::CTRL + Qt::Key_K );
  3.1667 -connect( a, SIGNAL( triggered() ), this, SLOT( formatPickColor() ) );
  3.1668 -a->setEnabled (false);
  3.1669 -a->addTo( tb );
  3.1670 -formatMenu->addAction (a);
  3.1671 -actionListBranches.append(a);
  3.1672 -actionFormatPickColor=a;
  3.1673 -
  3.1674 -a= new QAction(QPixmap(iconPath+"formatcolorbranch.png"), tr( "Color &branch","Edit menu" ), this);
  3.1675 -a->setStatusTip ( tr( "Color branch" ) );
  3.1676 -a->setShortcut (Qt::CTRL + Qt::Key_B);
  3.1677 -connect( a, SIGNAL( triggered() ), this, SLOT( formatColorBranch() ) );
  3.1678 -a->setEnabled (false);
  3.1679 -a->addTo( tb );
  3.1680 -formatMenu->addAction (a);
  3.1681 -actionListBranches.append(a);
  3.1682 -actionFormatColorSubtree=a;
  3.1683 -
  3.1684 -a= new QAction(QPixmap(iconPath+"formatcolorsubtree.png"), tr( "Color sub&tree","Edit menu" ), this);
  3.1685 -a->setStatusTip ( tr( "Color Subtree" ));
  3.1686 -//FIXME-2 switch back to that a->setShortcut (Qt::CTRL + Qt::Key_T);	// Color subtree
  3.1687 -connect( a, SIGNAL( triggered() ), this, SLOT( formatColorSubtree() ) );
  3.1688 -a->setEnabled (false);
  3.1689 -formatMenu->addAction (a);
  3.1690 -a->addTo( tb );
  3.1691 -actionListBranches.append(a);
  3.1692 -actionFormatColorSubtree=a;
  3.1693 -
  3.1694 -formatMenu->addSeparator();
  3.1695 -actionGroupFormatLinkStyles=new QActionGroup ( this);
  3.1696 -actionGroupFormatLinkStyles->setExclusive (true);
  3.1697 -a= new QAction( tr( "Linkstyle Line" ), actionGroupFormatLinkStyles);
  3.1698 -a->setStatusTip (tr( "Line" ));
  3.1699 -a->setToggleAction(true);
  3.1700 -connect( a, SIGNAL( triggered() ), this, SLOT( formatLinkStyleLine() ) );
  3.1701 -formatMenu->addAction (a);
  3.1702 -actionFormatLinkStyleLine=a;
  3.1703 -a= new QAction( tr( "Linkstyle Curve" ), actionGroupFormatLinkStyles);
  3.1704 -a->setStatusTip (tr( "Line" ));
  3.1705 -a->setToggleAction(true);
  3.1706 -connect( a, SIGNAL( triggered() ), this, SLOT( formatLinkStyleParabel() ) );
  3.1707 -formatMenu->addAction (a);
  3.1708 -actionFormatLinkStyleParabel=a;
  3.1709 -a= new QAction( tr( "Linkstyle Thick Line" ), actionGroupFormatLinkStyles );
  3.1710 -a->setStatusTip (tr( "PolyLine" ));
  3.1711 -a->setToggleAction(true);
  3.1712 -connect( a, SIGNAL( triggered() ), this, SLOT( formatLinkStylePolyLine() ) );
  3.1713 -formatMenu->addAction (a);
  3.1714 -actionFormatLinkStylePolyLine=a;
  3.1715 -a= new QAction( tr( "Linkstyle Thick Curve" ), actionGroupFormatLinkStyles);
  3.1716 -a->setStatusTip (tr( "PolyParabel" ) );
  3.1717 -a->setToggleAction(true);
  3.1718 -a->setChecked (true);
  3.1719 -connect( a, SIGNAL( triggered() ), this, SLOT( formatLinkStylePolyParabel() ) );
  3.1720 -formatMenu->addAction (a);
  3.1721 -actionFormatLinkStylePolyParabel=a;
  3.1722 -
  3.1723 -a = new QAction( tr( "Hide link if object is not selected","Branch attribute" ), this);
  3.1724 -a->setStatusTip (tr( "Hide link" ));
  3.1725 -a->setToggleAction(true);
  3.1726 -connect( a, SIGNAL( triggered() ), this, SLOT( formatHideLinkUnselected() ) );
  3.1727 -actionFormatHideLinkUnselected=a;
  3.1728 -
  3.1729 -formatMenu->addSeparator();
  3.1730 -a= new QAction( tr( "&Use color of heading for link","Branch attribute" ),  this);
  3.1731 -a->setStatusTip (tr( "Use same color for links and headings" ));
  3.1732 -a->setToggleAction(true);
  3.1733 -connect( a, SIGNAL( triggered() ), this, SLOT( formatToggleLinkColorHint() ) );
  3.1734 -formatMenu->addAction (a);
  3.1735 -actionFormatLinkColorHint=a;
  3.1736 -
  3.1737 -pix.fill (Qt::white);
  3.1738 -a= new QAction( pix, tr( "Set &Link Color"+QString("...") ), this  );
  3.1739 -a->setStatusTip (tr( "Set Link Color" ));
  3.1740 -formatMenu->addAction (a);
  3.1741 -connect( a, SIGNAL( triggered() ), this, SLOT( formatSelectLinkColor() ) );
  3.1742 -actionFormatLinkColor=a;
  3.1743 -
  3.1744 -a= new QAction( pix, tr( "Set &Selection Color"+QString("...") ), this  );
  3.1745 -a->setStatusTip (tr( "Set Selection Color" ));
  3.1746 -formatMenu->addAction (a);
  3.1747 -connect( a, SIGNAL( triggered() ), this, SLOT( formatSelectSelectionColor() ) );
  3.1748 -actionFormatSelectionColor=a;
  3.1749 -
  3.1750 -a= new QAction( pix, tr( "Set &Background Color" )+QString("..."), this );
  3.1751 -a->setStatusTip (tr( "Set Background Color" ));
  3.1752 -formatMenu->addAction (a);
  3.1753 -connect( a, SIGNAL( triggered() ), this, SLOT( formatSelectBackColor() ) );
  3.1754 -actionFormatBackColor=a;
  3.1755 -
  3.1756 -a= new QAction( pix, tr( "Set &Background image" )+QString("..."), this );
  3.1757 -a->setStatusTip (tr( "Set Background image" ));
  3.1758 -formatMenu->addAction (a);
  3.1759 -connect( a, SIGNAL( triggered() ), this, SLOT( formatSelectBackImage() ) );
  3.1760 -actionFormatBackImage=a;
  3.1761 +	QMenu *formatMenu = menuBar()->addMenu (tr ("F&ormat","Format menu"));
  3.1762 +
  3.1763 +	QToolBar *tb = addToolBar( tr("Format Actions","Format Toolbar name"));
  3.1764 +	tb->setObjectName ("formatTB");
  3.1765 +	QAction *a;
  3.1766 +	QPixmap pix( 16,16);
  3.1767 +	pix.fill (Qt::black);
  3.1768 +	a= new QAction(pix, tr( "Set &Color" )+QString("..."), this);
  3.1769 +	a->setStatusTip ( tr( "Set Color" ));
  3.1770 +	connect( a, SIGNAL( triggered() ), this, SLOT( formatSelectColor() ) );
  3.1771 +	a->addTo( tb );
  3.1772 +	formatMenu->addAction (a);
  3.1773 +	actionFormatColor=a;
  3.1774 +	a= new QAction( QPixmap(iconPath+"formatcolorpicker.png"), tr( "Pic&k color","Edit menu" ), this);
  3.1775 +	a->setStatusTip (tr( "Pick color\nHint: You can pick a color from another branch and color using CTRL+Left Button" ) );
  3.1776 +	a->setShortcut (Qt::CTRL + Qt::Key_K );
  3.1777 +	connect( a, SIGNAL( triggered() ), this, SLOT( formatPickColor() ) );
  3.1778 +	a->setEnabled (false);
  3.1779 +	a->addTo( tb );
  3.1780 +	formatMenu->addAction (a);
  3.1781 +	actionListBranches.append(a);
  3.1782 +	actionFormatPickColor=a;
  3.1783 +
  3.1784 +	a= new QAction(QPixmap(iconPath+"formatcolorbranch.png"), tr( "Color &branch","Edit menu" ), this);
  3.1785 +	a->setStatusTip ( tr( "Color branch" ) );
  3.1786 +	a->setShortcut (Qt::CTRL + Qt::Key_B);
  3.1787 +	connect( a, SIGNAL( triggered() ), this, SLOT( formatColorBranch() ) );
  3.1788 +	a->setEnabled (false);
  3.1789 +	a->addTo( tb );
  3.1790 +	formatMenu->addAction (a);
  3.1791 +	actionListBranches.append(a);
  3.1792 +	actionFormatColorSubtree=a;
  3.1793 +
  3.1794 +	a= new QAction(QPixmap(iconPath+"formatcolorsubtree.png"), tr( "Color sub&tree","Edit menu" ), this);
  3.1795 +	a->setStatusTip ( tr( "Color Subtree" ));
  3.1796 +	//FIXME-2 switch back to that a->setShortcut (Qt::CTRL + Qt::Key_T);	// Color subtree
  3.1797 +	connect( a, SIGNAL( triggered() ), this, SLOT( formatColorSubtree() ) );
  3.1798 +	a->setEnabled (false);
  3.1799 +	formatMenu->addAction (a);
  3.1800 +	a->addTo( tb );
  3.1801 +	actionListBranches.append(a);
  3.1802 +	actionFormatColorSubtree=a;
  3.1803 +
  3.1804 +	formatMenu->addSeparator();
  3.1805 +	actionGroupFormatLinkStyles=new QActionGroup ( this);
  3.1806 +	actionGroupFormatLinkStyles->setExclusive (true);
  3.1807 +	a= new QAction( tr( "Linkstyle Line" ), actionGroupFormatLinkStyles);
  3.1808 +	a->setStatusTip (tr( "Line" ));
  3.1809 +	a->setToggleAction(true);
  3.1810 +	connect( a, SIGNAL( triggered() ), this, SLOT( formatLinkStyleLine() ) );
  3.1811 +	formatMenu->addAction (a);
  3.1812 +	actionFormatLinkStyleLine=a;
  3.1813 +	a= new QAction( tr( "Linkstyle Curve" ), actionGroupFormatLinkStyles);
  3.1814 +	a->setStatusTip (tr( "Line" ));
  3.1815 +	a->setToggleAction(true);
  3.1816 +	connect( a, SIGNAL( triggered() ), this, SLOT( formatLinkStyleParabel() ) );
  3.1817 +	formatMenu->addAction (a);
  3.1818 +	actionFormatLinkStyleParabel=a;
  3.1819 +	a= new QAction( tr( "Linkstyle Thick Line" ), actionGroupFormatLinkStyles );
  3.1820 +	a->setStatusTip (tr( "PolyLine" ));
  3.1821 +	a->setToggleAction(true);
  3.1822 +	connect( a, SIGNAL( triggered() ), this, SLOT( formatLinkStylePolyLine() ) );
  3.1823 +	formatMenu->addAction (a);
  3.1824 +	actionFormatLinkStylePolyLine=a;
  3.1825 +	a= new QAction( tr( "Linkstyle Thick Curve" ), actionGroupFormatLinkStyles);
  3.1826 +	a->setStatusTip (tr( "PolyParabel" ) );
  3.1827 +	a->setToggleAction(true);
  3.1828 +	a->setChecked (true);
  3.1829 +	connect( a, SIGNAL( triggered() ), this, SLOT( formatLinkStylePolyParabel() ) );
  3.1830 +	formatMenu->addAction (a);
  3.1831 +	actionFormatLinkStylePolyParabel=a;
  3.1832 +
  3.1833 +	a = new QAction( tr( "Hide link if object is not selected","Branch attribute" ), this);
  3.1834 +	a->setStatusTip (tr( "Hide link" ));
  3.1835 +	a->setToggleAction(true);
  3.1836 +	connect( a, SIGNAL( triggered() ), this, SLOT( formatHideLinkUnselected() ) );
  3.1837 +	actionFormatHideLinkUnselected=a;
  3.1838 +
  3.1839 +	formatMenu->addSeparator();
  3.1840 +	a= new QAction( tr( "&Use color of heading for link","Branch attribute" ),  this);
  3.1841 +	a->setStatusTip (tr( "Use same color for links and headings" ));
  3.1842 +	a->setToggleAction(true);
  3.1843 +	connect( a, SIGNAL( triggered() ), this, SLOT( formatToggleLinkColorHint() ) );
  3.1844 +	formatMenu->addAction (a);
  3.1845 +	actionFormatLinkColorHint=a;
  3.1846 +
  3.1847 +	pix.fill (Qt::white);
  3.1848 +	a= new QAction( pix, tr( "Set &Link Color"+QString("...") ), this  );
  3.1849 +	a->setStatusTip (tr( "Set Link Color" ));
  3.1850 +	formatMenu->addAction (a);
  3.1851 +	connect( a, SIGNAL( triggered() ), this, SLOT( formatSelectLinkColor() ) );
  3.1852 +	actionFormatLinkColor=a;
  3.1853 +
  3.1854 +	a= new QAction( pix, tr( "Set &Selection Color"+QString("...") ), this  );
  3.1855 +	a->setStatusTip (tr( "Set Selection Color" ));
  3.1856 +	formatMenu->addAction (a);
  3.1857 +	connect( a, SIGNAL( triggered() ), this, SLOT( formatSelectSelectionColor() ) );
  3.1858 +	actionFormatSelectionColor=a;
  3.1859 +
  3.1860 +	a= new QAction( pix, tr( "Set &Background Color" )+QString("..."), this );
  3.1861 +	a->setStatusTip (tr( "Set Background Color" ));
  3.1862 +	formatMenu->addAction (a);
  3.1863 +	connect( a, SIGNAL( triggered() ), this, SLOT( formatSelectBackColor() ) );
  3.1864 +	actionFormatBackColor=a;
  3.1865 +
  3.1866 +	a= new QAction( pix, tr( "Set &Background image" )+QString("..."), this );
  3.1867 +	a->setStatusTip (tr( "Set Background image" ));
  3.1868 +	formatMenu->addAction (a);
  3.1869 +	connect( a, SIGNAL( triggered() ), this, SLOT( formatSelectBackImage() ) );
  3.1870 +	actionFormatBackImage=a;
  3.1871  }
  3.1872  
  3.1873  // View Actions
  3.1874  void Main::setupViewActions()
  3.1875  {
  3.1876 -QToolBar *tb = addToolBar( tr("View Actions","View Toolbar name") );
  3.1877 -tb->setLabel( "View Actions" );
  3.1878 -tb->setObjectName ("viewTB");
  3.1879 -QMenu *viewMenu = menuBar()->addMenu ( tr( "&View" ));
  3.1880 -
  3.1881 -Switchboard switchboard;	//FIXME-1 testing...
  3.1882 -
  3.1883 -QAction *a;
  3.1884 -a = new QAction(QPixmap(iconPath+"viewmag-reset.png"), tr( "reset Zoom","View action" ), this);
  3.1885 -a->setStatusTip ( tr( "Zoom reset" ) );
  3.1886 -a->setShortcut (Qt::CTRL + Qt::Key_0);	// Reset zoom
  3.1887 -switchboard.addConnection(a,"CTRL+0");
  3.1888 -a->addTo( tb );
  3.1889 -viewMenu->addAction (a);
  3.1890 -connect( a, SIGNAL( triggered() ), this, SLOT(viewZoomReset() ) );
  3.1891 -
  3.1892 -a = new QAction( QPixmap(iconPath+"viewmag+.png"), tr( "Zoom in","View action" ), this);
  3.1893 -a->setStatusTip (tr( "Zoom in" ));
  3.1894 -switchboard.addConnection(a,"CTRL++");
  3.1895 -a->addTo( tb );
  3.1896 -viewMenu->addAction (a);
  3.1897 -connect( a, SIGNAL( triggered() ), this, SLOT(viewZoomIn() ) );
  3.1898 -
  3.1899 -a = new QAction( QPixmap(iconPath+"viewmag-.png"), tr( "Zoom out","View action" ), this);
  3.1900 -a->setStatusTip (tr( "Zoom out" ));
  3.1901 -switchboard.addConnection(a,"CTRL+-");
  3.1902 -a->addTo( tb );
  3.1903 -viewMenu->addAction (a);
  3.1904 -connect( a, SIGNAL( triggered() ), this, SLOT( viewZoomOut() ) );
  3.1905 -
  3.1906 -a = new QAction( QPixmap(iconPath+"viewshowsel.png"), tr( "Show selection","View action" ), this);
  3.1907 -a->setStatusTip (tr( "Show selection" ));
  3.1908 -switchboard.addConnection(a,".");
  3.1909 -a->addTo( tb );
  3.1910 -viewMenu->addAction (a);
  3.1911 -connect( a, SIGNAL( triggered() ), this, SLOT( viewCenter() ) );
  3.1912 -
  3.1913 -viewMenu->addSeparator();	
  3.1914 -
  3.1915 -a = new QAction(QPixmap(flagsPath+"flag-note.png"), tr( "Show Note Editor","View action" ),this);
  3.1916 -a->setStatusTip ( tr( "Show Note Editor" ));
  3.1917 -a->setShortcut ( Qt::CTRL + Qt::Key_E );	// Toggle Note Editor
  3.1918 -a->setToggleAction(true);
  3.1919 -a->addTo( tb );
  3.1920 -viewMenu->addAction (a);
  3.1921 -connect( a, SIGNAL( triggered() ), this, SLOT(windowToggleNoteEditor() ) );
  3.1922 -actionViewToggleNoteEditor=a;
  3.1923 -
  3.1924 -a = new QAction(QPixmap(iconPath+"history.png"),  tr( "History Window","View action" ),this );
  3.1925 -a->setStatusTip ( tr( "Show History Window" ));
  3.1926 -a->setShortcut ( Qt::CTRL + Qt::Key_H  );	// Toggle history window
  3.1927 -a->setToggleAction(true);
  3.1928 -a->addTo( tb );
  3.1929 -viewMenu->addAction (a);
  3.1930 -connect( a, SIGNAL( triggered() ), this, SLOT(windowToggleHistory() ) );
  3.1931 -actionViewToggleHistoryWindow=a;
  3.1932 -
  3.1933 -viewMenu->addAction (actionViewTogglePropertyWindow);
  3.1934 -
  3.1935 -viewMenu->addSeparator();	
  3.1936 -
  3.1937 -a = new QAction(tr( "Antialiasing","View action" ),this );
  3.1938 -a->setStatusTip ( tr( "Antialiasing" ));
  3.1939 -a->setToggleAction(true);
  3.1940 -a->setChecked (settings.value("/mainwindow/view/AntiAlias",true).toBool());
  3.1941 -viewMenu->addAction (a);
  3.1942 -connect( a, SIGNAL( triggered() ), this, SLOT(windowToggleAntiAlias() ) );
  3.1943 -actionViewToggleAntiAlias=a;
  3.1944 -
  3.1945 -a = new QAction(tr( "Smooth pixmap transformations","View action" ),this );
  3.1946 -a->setStatusTip (a->text());
  3.1947 -a->setToggleAction(true);
  3.1948 -a->setChecked (settings.value("/mainwindow/view/SmoothPixmapTransformation",true).toBool());
  3.1949 -viewMenu->addAction (a);
  3.1950 -connect( a, SIGNAL( triggered() ), this, SLOT(windowToggleSmoothPixmap() ) );
  3.1951 -actionViewToggleSmoothPixmapTransform=a;
  3.1952 -
  3.1953 -a = new QAction(tr( "Next Map","View action" ), this);
  3.1954 -a->setStatusTip (a->text());
  3.1955 -a->setShortcut (Qt::ALT + Qt::Key_N );
  3.1956 -viewMenu->addAction (a);
  3.1957 -connect( a, SIGNAL( triggered() ), this, SLOT(windowNextEditor() ) );
  3.1958 -
  3.1959 -a = new QAction (tr( "Previous Map","View action" ), this );
  3.1960 -a->setStatusTip (a->text());
  3.1961 -a->setShortcut (Qt::ALT + Qt::Key_P );
  3.1962 -viewMenu->addAction (a);
  3.1963 -connect( a, SIGNAL( triggered() ), this, SLOT(windowPreviousEditor() ) );
  3.1964 -
  3.1965 -switchboard.print();
  3.1966 +	QToolBar *tb = addToolBar( tr("View Actions","View Toolbar name") );
  3.1967 +	tb->setLabel( "View Actions" );
  3.1968 +	tb->setObjectName ("viewTB");
  3.1969 +	QMenu *viewMenu = menuBar()->addMenu ( tr( "&View" ));
  3.1970 +
  3.1971 +	Switchboard switchboard;	//FIXME-1 testing...
  3.1972 +
  3.1973 +	QAction *a;
  3.1974 +	a = new QAction(QPixmap(iconPath+"viewmag-reset.png"), tr( "reset Zoom","View action" ), this);
  3.1975 +	a->setStatusTip ( tr( "Zoom reset" ) );
  3.1976 +	a->setShortcut (Qt::CTRL + Qt::Key_0);	// Reset zoom
  3.1977 +	switchboard.addConnection(a,"CTRL+0");
  3.1978 +	a->addTo( tb );
  3.1979 +	viewMenu->addAction (a);
  3.1980 +	connect( a, SIGNAL( triggered() ), this, SLOT(viewZoomReset() ) );
  3.1981 +
  3.1982 +	a = new QAction( QPixmap(iconPath+"viewmag+.png"), tr( "Zoom in","View action" ), this);
  3.1983 +	a->setStatusTip (tr( "Zoom in" ));
  3.1984 +	switchboard.addConnection(a,"CTRL++");
  3.1985 +	a->addTo( tb );
  3.1986 +	viewMenu->addAction (a);
  3.1987 +	connect( a, SIGNAL( triggered() ), this, SLOT(viewZoomIn() ) );
  3.1988 +
  3.1989 +	a = new QAction( QPixmap(iconPath+"viewmag-.png"), tr( "Zoom out","View action" ), this);
  3.1990 +	a->setStatusTip (tr( "Zoom out" ));
  3.1991 +	switchboard.addConnection(a,"CTRL+-");
  3.1992 +	a->addTo( tb );
  3.1993 +	viewMenu->addAction (a);
  3.1994 +	connect( a, SIGNAL( triggered() ), this, SLOT( viewZoomOut() ) );
  3.1995 +
  3.1996 +	a = new QAction( QPixmap(iconPath+"viewshowsel.png"), tr( "Show selection","View action" ), this);
  3.1997 +	a->setStatusTip (tr( "Show selection" ));
  3.1998 +	switchboard.addConnection(a,".");
  3.1999 +	a->addTo( tb );
  3.2000 +	viewMenu->addAction (a);
  3.2001 +	connect( a, SIGNAL( triggered() ), this, SLOT( viewCenter() ) );
  3.2002 +
  3.2003 +	viewMenu->addSeparator();	
  3.2004 +
  3.2005 +	a = new QAction(QPixmap(flagsPath+"flag-note.png"), tr( "Show Note Editor","View action" ),this);
  3.2006 +	a->setStatusTip ( tr( "Show Note Editor" ));
  3.2007 +	a->setShortcut ( Qt::CTRL + Qt::Key_E );	// Toggle Note Editor
  3.2008 +	a->setToggleAction(true);
  3.2009 +	a->addTo( tb );
  3.2010 +	viewMenu->addAction (a);
  3.2011 +	connect( a, SIGNAL( triggered() ), this, SLOT(windowToggleNoteEditor() ) );
  3.2012 +	actionViewToggleNoteEditor=a;
  3.2013 +
  3.2014 +	a = new QAction(QPixmap(iconPath+"history.png"),  tr( "History Window","View action" ),this );
  3.2015 +	a->setStatusTip ( tr( "Show History Window" ));
  3.2016 +	a->setShortcut ( Qt::CTRL + Qt::Key_H  );	// Toggle history window
  3.2017 +	a->setToggleAction(true);
  3.2018 +	a->addTo( tb );
  3.2019 +	viewMenu->addAction (a);
  3.2020 +	connect( a, SIGNAL( triggered() ), this, SLOT(windowToggleHistory() ) );
  3.2021 +	actionViewToggleHistoryWindow=a;
  3.2022 +
  3.2023 +	viewMenu->addAction (actionViewTogglePropertyWindow);
  3.2024 +
  3.2025 +	viewMenu->addSeparator();	
  3.2026 +
  3.2027 +	a = new QAction(tr( "Antialiasing","View action" ),this );
  3.2028 +	a->setStatusTip ( tr( "Antialiasing" ));
  3.2029 +	a->setToggleAction(true);
  3.2030 +	a->setChecked (settings.value("/mainwindow/view/AntiAlias",true).toBool());
  3.2031 +	viewMenu->addAction (a);
  3.2032 +	connect( a, SIGNAL( triggered() ), this, SLOT(windowToggleAntiAlias() ) );
  3.2033 +	actionViewToggleAntiAlias=a;
  3.2034 +
  3.2035 +	a = new QAction(tr( "Smooth pixmap transformations","View action" ),this );
  3.2036 +	a->setStatusTip (a->text());
  3.2037 +	a->setToggleAction(true);
  3.2038 +	a->setChecked (settings.value("/mainwindow/view/SmoothPixmapTransformation",true).toBool());
  3.2039 +	viewMenu->addAction (a);
  3.2040 +	connect( a, SIGNAL( triggered() ), this, SLOT(windowToggleSmoothPixmap() ) );
  3.2041 +	actionViewToggleSmoothPixmapTransform=a;
  3.2042 +
  3.2043 +	a = new QAction(tr( "Next Map","View action" ), this);
  3.2044 +	a->setStatusTip (a->text());
  3.2045 +	a->setShortcut (Qt::ALT + Qt::Key_N );
  3.2046 +	viewMenu->addAction (a);
  3.2047 +	connect( a, SIGNAL( triggered() ), this, SLOT(windowNextEditor() ) );
  3.2048 +
  3.2049 +	a = new QAction (tr( "Previous Map","View action" ), this );
  3.2050 +	a->setStatusTip (a->text());
  3.2051 +	a->setShortcut (Qt::ALT + Qt::Key_P );
  3.2052 +	viewMenu->addAction (a);
  3.2053 +	connect( a, SIGNAL( triggered() ), this, SLOT(windowPreviousEditor() ) );
  3.2054 +
  3.2055 +	switchboard.print();
  3.2056  }
  3.2057  
  3.2058  // Mode Actions
  3.2059  void Main::setupModeActions()
  3.2060  {
  3.2061 -//QPopupMenu *menu = new QPopupMenu( this );
  3.2062 -//menuBar()->insertItem( tr( "&Mode (using modifiers)" ), menu );
  3.2063 -
  3.2064 -QToolBar *tb = addToolBar( tr ("Modes when using modifiers","Modifier Toolbar name") );
  3.2065 -tb->setObjectName ("modesTB");
  3.2066 -QAction *a;
  3.2067 -actionGroupModModes=new QActionGroup ( this);
  3.2068 -actionGroupModModes->setExclusive (true);
  3.2069 -a= new QAction( QPixmap(iconPath+"modecolor.png"), tr( "Use modifier to color branches","Mode modifier" ), actionGroupModModes);
  3.2070 -a->setShortcut (Qt::Key_J);
  3.2071 -a->setStatusTip ( tr( "Use modifier to color branches" ));
  3.2072 -a->setToggleAction(true);
  3.2073 -a->addTo (tb);
  3.2074 -a->setChecked(true);
  3.2075 -actionModModeColor=a;
  3.2076 -
  3.2077 -a= new QAction( QPixmap(iconPath+"modecopy.png"), tr( "Use modifier to copy","Mode modifier" ), actionGroupModModes );
  3.2078 -a->setShortcut( Qt::Key_K); 
  3.2079 -a->setStatusTip( tr( "Use modifier to copy" ));
  3.2080 -a->setToggleAction(true);
  3.2081 -a->addTo (tb);
  3.2082 -actionModModeCopy=a;
  3.2083 -
  3.2084 -a= new QAction(QPixmap(iconPath+"modelink.png"), tr( "Use modifier to draw xLinks","Mode modifier" ), actionGroupModModes );
  3.2085 -a->setShortcut (Qt::Key_L);
  3.2086 -a->setStatusTip( tr( "Use modifier to draw xLinks" ));
  3.2087 -a->setToggleAction(true);
  3.2088 -a->addTo (tb);
  3.2089 -actionModModeXLink=a;
  3.2090 +	//QPopupMenu *menu = new QPopupMenu( this );
  3.2091 +	//menuBar()->insertItem( tr( "&Mode (using modifiers)" ), menu );
  3.2092 +
  3.2093 +	QToolBar *tb = addToolBar( tr ("Modes when using modifiers","Modifier Toolbar name") );
  3.2094 +	tb->setObjectName ("modesTB");
  3.2095 +	QAction *a;
  3.2096 +	actionGroupModModes=new QActionGroup ( this);
  3.2097 +	actionGroupModModes->setExclusive (true);
  3.2098 +	a= new QAction( QPixmap(iconPath+"modecolor.png"), tr( "Use modifier to color branches","Mode modifier" ), actionGroupModModes);
  3.2099 +	a->setShortcut (Qt::Key_J);
  3.2100 +	a->setStatusTip ( tr( "Use modifier to color branches" ));
  3.2101 +	a->setToggleAction(true);
  3.2102 +	a->addTo (tb);
  3.2103 +	a->setChecked(true);
  3.2104 +	actionModModeColor=a;
  3.2105 +
  3.2106 +	a= new QAction( QPixmap(iconPath+"modecopy.png"), tr( "Use modifier to copy","Mode modifier" ), actionGroupModModes );
  3.2107 +	a->setShortcut( Qt::Key_K); 
  3.2108 +	a->setStatusTip( tr( "Use modifier to copy" ));
  3.2109 +	a->setToggleAction(true);
  3.2110 +	a->addTo (tb);
  3.2111 +	actionModModeCopy=a;
  3.2112 +
  3.2113 +	a= new QAction(QPixmap(iconPath+"modelink.png"), tr( "Use modifier to draw xLinks","Mode modifier" ), actionGroupModModes );
  3.2114 +	a->setShortcut (Qt::Key_L);
  3.2115 +	a->setStatusTip( tr( "Use modifier to draw xLinks" ));
  3.2116 +	a->setToggleAction(true);
  3.2117 +	a->addTo (tb);
  3.2118 +	actionModModeXLink=a;
  3.2119  }
  3.2120  
  3.2121  // Flag Actions
  3.2122  void Main::setupFlagActions()
  3.2123  {
  3.2124 -// Create System Flags
  3.2125 -QToolBar *tb=NULL;
  3.2126 -
  3.2127 -Flag *flag=new Flag;;
  3.2128 -flag->setVisible(true);
  3.2129 -
  3.2130 -flag->load(QPixmap(flagsPath+"flag-note.png"));
  3.2131 -setupFlag (flag,tb,"system-note",tr("Note","SystemFlag"));
  3.2132 -
  3.2133 -flag->load(QPixmap(flagsPath+"flag-url.png"));
  3.2134 -setupFlag (flag,tb,"system-url",tr("URL to Document ","SystemFlag"));
  3.2135 -
  3.2136 -flag->load(QPixmap(flagsPath+"flag-vymlink.png"));
  3.2137 -setupFlag (flag,tb,"system-vymLink",tr("Link to another vym map","SystemFlag"));
  3.2138 -
  3.2139 -flag->load(QPixmap(flagsPath+"flag-scrolled-right.png"));
  3.2140 -setupFlag (flag,tb,"system-scrolledright",tr("subtree is scrolled","SystemFlag"));
  3.2141 -
  3.2142 -flag->load(QPixmap(flagsPath+"flag-tmpUnscrolled-right.png"));
  3.2143 -setupFlag (flag,tb,"system-tmpUnscrolledRight",tr("subtree is temporary scrolled","SystemFlag"));
  3.2144 -
  3.2145 -flag->load(QPixmap(flagsPath+"flag-hideexport.png"));
  3.2146 -setupFlag (flag,tb,"system-hideInExport",tr("Hide object in exported maps","SystemFlag"));
  3.2147 -
  3.2148 -// Create Standard Flags
  3.2149 -tb=addToolBar (tr ("Standard Flags","Standard Flag Toolbar"));
  3.2150 -tb->setObjectName ("standardFlagTB");
  3.2151 -standardFlagsMaster->setToolBar (tb);
  3.2152 -
  3.2153 -flag->load(flagsPath+"flag-exclamationmark.png");
  3.2154 -flag->setGroup("standard-mark");
  3.2155 -setupFlag (flag,tb,"exclamationmark",tr("Take care!","Standardflag"));
  3.2156 -
  3.2157 -flag->load(flagsPath+"flag-questionmark.png");
  3.2158 -flag->setGroup("standard-mark");
  3.2159 -setupFlag (flag,tb,"questionmark",tr("Really?","Standardflag"));
  3.2160 -
  3.2161 -flag->load(flagsPath+"flag-hook-green.png");
  3.2162 -flag->setGroup("standard-hook");
  3.2163 -setupFlag (flag,tb,"hook-green",tr("ok!","Standardflag"));
  3.2164 -
  3.2165 -flag->load(flagsPath+"flag-cross-red.png");
  3.2166 -flag->setGroup("standard-hook");
  3.2167 -setupFlag (flag,tb,"cross-red",tr("Not ok!","Standardflag"));
  3.2168 -flag->unsetGroup();
  3.2169 -
  3.2170 -flag->load(flagsPath+"flag-stopsign.png");
  3.2171 -setupFlag (flag,tb,"stopsign",tr("This won't work!","Standardflag"));
  3.2172 -
  3.2173 -flag->load(flagsPath+"flag-smiley-good.png");
  3.2174 -flag->setGroup("standard-smiley");
  3.2175 -setupFlag (flag,tb,"smiley-good",tr("Good","Standardflag"));
  3.2176 -
  3.2177 -flag->load(flagsPath+"flag-smiley-sad.png");
  3.2178 -flag->setGroup("standard-smiley");
  3.2179 -setupFlag (flag,tb,"smiley-sad",tr("Bad","Standardflag"));
  3.2180 -
  3.2181 -flag->load(flagsPath+"flag-smiley-omg.png");
  3.2182 -flag->setGroup("standard-smiley");
  3.2183 -setupFlag (flag,tb,"smiley-omb",tr("Oh no!","Standardflag"));
  3.2184 -// Original omg.png (in KDE emoticons)
  3.2185 -flag->unsetGroup();
  3.2186 -
  3.2187 -flag->load(flagsPath+"flag-kalarm.png");
  3.2188 -setupFlag (flag,tb,"clock",tr("Time critical","Standardflag"));
  3.2189 -
  3.2190 -flag->load(flagsPath+"flag-phone.png");
  3.2191 -setupFlag (flag,tb,"phone",tr("Call...","Standardflag"));
  3.2192 -
  3.2193 -flag->load(flagsPath+"flag-lamp.png");
  3.2194 -setupFlag (flag,tb,"lamp",tr("Idea!","Standardflag"));
  3.2195 -
  3.2196 -flag->load(flagsPath+"flag-arrow-up.png");
  3.2197 -flag->setGroup("standard-arrow");
  3.2198 -setupFlag (flag,tb,"arrow-up",tr("Important","Standardflag"));
  3.2199 -
  3.2200 -flag->load(flagsPath+"flag-arrow-down.png");
  3.2201 -flag->setGroup("standard-arrow");
  3.2202 -setupFlag (flag,tb,"arrow-down",tr("Unimportant","Standardflag"));
  3.2203 -
  3.2204 -flag->load(flagsPath+"flag-arrow-2up.png");
  3.2205 -flag->setGroup("standard-arrow");
  3.2206 -setupFlag (flag,tb,"2arrow-up",tr("Very important!","Standardflag"));
  3.2207 -
  3.2208 -flag->load(flagsPath+"flag-arrow-2down.png");
  3.2209 -flag->setGroup("standard-arrow");
  3.2210 -setupFlag (flag,tb,"2arrow-down",tr("Very unimportant!","Standardflag"));
  3.2211 -flag->unsetGroup();
  3.2212 -
  3.2213 -flag->load(flagsPath+"flag-thumb-up.png");
  3.2214 -flag->setGroup("standard-thumb");
  3.2215 -setupFlag (flag,tb,"thumb-up",tr("I like this","Standardflag"));
  3.2216 -
  3.2217 -flag->load(flagsPath+"flag-thumb-down.png");
  3.2218 -flag->setGroup("standard-thumb");
  3.2219 -setupFlag (flag,tb,"thumb-down",tr("I do not like this","Standardflag"));
  3.2220 -flag->unsetGroup();
  3.2221 -
  3.2222 -flag->load(flagsPath+"flag-rose.png");
  3.2223 -setupFlag (flag,tb,"rose",tr("Rose","Standardflag"));
  3.2224 -
  3.2225 -flag->load(flagsPath+"flag-heart.png");
  3.2226 -setupFlag (flag,tb,"heart",tr("I just love...","Standardflag"));
  3.2227 -
  3.2228 -flag->load(flagsPath+"flag-present.png");
  3.2229 -setupFlag (flag,tb,"present",tr("Surprise!","Standardflag"));
  3.2230 -
  3.2231 -flag->load(flagsPath+"flag-flash.png");
  3.2232 -setupFlag (flag,tb,"flash",tr("Dangerous","Standardflag"));
  3.2233 -
  3.2234 -// Original: xsldbg_output.png
  3.2235 -flag->load(flagsPath+"flag-info.png");
  3.2236 -setupFlag (flag,tb,"info",tr("Info","Standardflag"));
  3.2237 -
  3.2238 -// Original khelpcenter.png
  3.2239 -flag->load(flagsPath+"flag-lifebelt.png");
  3.2240 -setupFlag (flag,tb,"lifebelt",tr("This will help","Standardflag"));
  3.2241 -
  3.2242 -// Freemind flags
  3.2243 -flag->setVisible(false);
  3.2244 -flag->load(flagsPath+"freemind/warning.png");
  3.2245 -setupFlag (flag,tb,  "freemind-warning",tr("Important","Freemind-Flag"));
  3.2246 -
  3.2247 -for (int i=1; i<8; i++)
  3.2248 -{
  3.2249 -	flag->load(flagsPath+QString("freemind/priority-%1.png").arg(i));
  3.2250 -	setupFlag (flag,tb, QString("freemind-priority-%1").arg(i),tr("Priority","Freemind-Flag"));
  3.2251 -}
  3.2252 -
  3.2253 -flag->load(flagsPath+"freemind/back.png");
  3.2254 -setupFlag (flag,tb,"freemind-back",tr("Back","Freemind-Flag"));
  3.2255 -
  3.2256 -flag->load(flagsPath+"freemind/forward.png");
  3.2257 -setupFlag (flag,tb,"freemind-forward",tr("forward","Freemind-Flag"));
  3.2258 -
  3.2259 -flag->load(flagsPath+"freemind/attach.png");
  3.2260 -setupFlag (flag,tb,"freemind-attach",tr("Look here","Freemind-Flag"));
  3.2261 -
  3.2262 -flag->load(flagsPath+"freemind/clanbomber.png");
  3.2263 -setupFlag (flag,tb,"freemind-clanbomber",tr("Dangerous","Freemind-Flag"));
  3.2264 -
  3.2265 -flag->load(flagsPath+"freemind/desktopnew.png");
  3.2266 -setupFlag (flag,tb,"freemind-desktopnew",tr("Don't flagrget","Freemind-Flag"));
  3.2267 -
  3.2268 -flag->load(flagsPath+"freemind/flag.png");
  3.2269 -setupFlag (flag,tb,"freemind-flag",tr("Flag","Freemind-Flag"));
  3.2270 -
  3.2271 -
  3.2272 -flag->load(flagsPath+"freemind/gohome.png");
  3.2273 -setupFlag (flag,tb,"freemind-gohome",tr("Home","Freemind-Flag"));
  3.2274 -
  3.2275 -
  3.2276 -flag->load(flagsPath+"freemind/kaddressbook.png");
  3.2277 -setupFlag (flag,tb,"freemind-kaddressbook",tr("Telephone","Freemind-Flag"));
  3.2278 -
  3.2279 -flag->load(flagsPath+"freemind/knotify.png");
  3.2280 -setupFlag (flag,tb,"freemind-knotify",tr("Music","Freemind-Flag"));
  3.2281 -
  3.2282 -flag->load(flagsPath+"freemind/korn.png");
  3.2283 -setupFlag (flag,tb,"freemind-korn",tr("Mailbox","Freemind-Flag"));
  3.2284 -
  3.2285 -flag->load(flagsPath+"freemind/mail.png");
  3.2286 -setupFlag (flag,tb,"freemind-mail",tr("Maix","Freemind-Flag"));
  3.2287 -
  3.2288 -flag->load(flagsPath+"freemind/password.png");
  3.2289 -setupFlag (flag,tb,"freemind-password",tr("Password","Freemind-Flag"));
  3.2290 -
  3.2291 -flag->load(flagsPath+"freemind/pencil.png");
  3.2292 -setupFlag (flag,tb,"freemind-pencil",tr("To be improved","Freemind-Flag"));
  3.2293 -
  3.2294 -flag->load(flagsPath+"freemind/stop.png");
  3.2295 -setupFlag (flag,tb,"freemind-stop",tr("Stop","Freemind-Flag"));
  3.2296 -
  3.2297 -flag->load(flagsPath+"freemind/wizard.png");
  3.2298 -setupFlag (flag,tb,"freemind-wizard",tr("Magic","Freemind-Flag"));
  3.2299 -
  3.2300 -flag->load(flagsPath+"freemind/xmag.png");
  3.2301 -setupFlag (flag,tb,"freemind-xmag",tr("To be discussed","Freemind-Flag"));
  3.2302 -
  3.2303 -flag->load(flagsPath+"freemind/bell.png");
  3.2304 -setupFlag (flag,tb,"freemind-bell",tr("Reminder","Freemind-Flag"));
  3.2305 -
  3.2306 -flag->load(flagsPath+"freemind/bookmark.png");
  3.2307 -setupFlag (flag,tb,"freemind-bookmark",tr("Excellent","Freemind-Flag"));
  3.2308 -
  3.2309 -flag->load(flagsPath+"freemind/penguin.png");
  3.2310 -setupFlag (flag,tb,"freemind-penguin",tr("Linux","Freemind-Flag"));
  3.2311 -
  3.2312 -flag->load(flagsPath+"freemind/licq.png");
  3.2313 -setupFlag (flag,tb,"freemind-licq",tr("Sweet","Freemind-Flag"));
  3.2314 +	// Create System Flags
  3.2315 +	QToolBar *tb=NULL;
  3.2316 +
  3.2317 +	Flag *flag=new Flag;;
  3.2318 +	flag->setVisible(true);
  3.2319 +
  3.2320 +	flag->load(QPixmap(flagsPath+"flag-note.png"));
  3.2321 +	setupFlag (flag,tb,"system-note",tr("Note","SystemFlag"));
  3.2322 +
  3.2323 +	flag->load(QPixmap(flagsPath+"flag-url.png"));
  3.2324 +	setupFlag (flag,tb,"system-url",tr("URL to Document ","SystemFlag"));
  3.2325 +
  3.2326 +	flag->load(QPixmap(flagsPath+"flag-vymlink.png"));
  3.2327 +	setupFlag (flag,tb,"system-vymLink",tr("Link to another vym map","SystemFlag"));
  3.2328 +
  3.2329 +	flag->load(QPixmap(flagsPath+"flag-scrolled-right.png"));
  3.2330 +	setupFlag (flag,tb,"system-scrolledright",tr("subtree is scrolled","SystemFlag"));
  3.2331 +
  3.2332 +	flag->load(QPixmap(flagsPath+"flag-tmpUnscrolled-right.png"));
  3.2333 +	setupFlag (flag,tb,"system-tmpUnscrolledRight",tr("subtree is temporary scrolled","SystemFlag"));
  3.2334 +
  3.2335 +	flag->load(QPixmap(flagsPath+"flag-hideexport.png"));
  3.2336 +	setupFlag (flag,tb,"system-hideInExport",tr("Hide object in exported maps","SystemFlag"));
  3.2337 +
  3.2338 +	// Create Standard Flags
  3.2339 +	tb=addToolBar (tr ("Standard Flags","Standard Flag Toolbar"));
  3.2340 +	tb->setObjectName ("standardFlagTB");
  3.2341 +	standardFlagsMaster->setToolBar (tb);
  3.2342 +
  3.2343 +	flag->load(flagsPath+"flag-exclamationmark.png");
  3.2344 +	flag->setGroup("standard-mark");
  3.2345 +	setupFlag (flag,tb,"exclamationmark",tr("Take care!","Standardflag"));
  3.2346 +
  3.2347 +	flag->load(flagsPath+"flag-questionmark.png");
  3.2348 +	flag->setGroup("standard-mark");
  3.2349 +	setupFlag (flag,tb,"questionmark",tr("Really?","Standardflag"));
  3.2350 +
  3.2351 +	flag->load(flagsPath+"flag-hook-green.png");
  3.2352 +	flag->setGroup("standard-hook");
  3.2353 +	setupFlag (flag,tb,"hook-green",tr("ok!","Standardflag"));
  3.2354 +
  3.2355 +	flag->load(flagsPath+"flag-cross-red.png");
  3.2356 +	flag->setGroup("standard-hook");
  3.2357 +	setupFlag (flag,tb,"cross-red",tr("Not ok!","Standardflag"));
  3.2358 +	flag->unsetGroup();
  3.2359 +
  3.2360 +	flag->load(flagsPath+"flag-stopsign.png");
  3.2361 +	setupFlag (flag,tb,"stopsign",tr("This won't work!","Standardflag"));
  3.2362 +
  3.2363 +	flag->load(flagsPath+"flag-smiley-good.png");
  3.2364 +	flag->setGroup("standard-smiley");
  3.2365 +	setupFlag (flag,tb,"smiley-good",tr("Good","Standardflag"));
  3.2366 +
  3.2367 +	flag->load(flagsPath+"flag-smiley-sad.png");
  3.2368 +	flag->setGroup("standard-smiley");
  3.2369 +	setupFlag (flag,tb,"smiley-sad",tr("Bad","Standardflag"));
  3.2370 +
  3.2371 +	flag->load(flagsPath+"flag-smiley-omg.png");
  3.2372 +	flag->setGroup("standard-smiley");
  3.2373 +	setupFlag (flag,tb,"smiley-omb",tr("Oh no!","Standardflag"));
  3.2374 +	// Original omg.png (in KDE emoticons)
  3.2375 +	flag->unsetGroup();
  3.2376 +
  3.2377 +	flag->load(flagsPath+"flag-kalarm.png");
  3.2378 +	setupFlag (flag,tb,"clock",tr("Time critical","Standardflag"));
  3.2379 +
  3.2380 +	flag->load(flagsPath+"flag-phone.png");
  3.2381 +	setupFlag (flag,tb,"phone",tr("Call...","Standardflag"));
  3.2382 +
  3.2383 +	flag->load(flagsPath+"flag-lamp.png");
  3.2384 +	setupFlag (flag,tb,"lamp",tr("Idea!","Standardflag"));
  3.2385 +
  3.2386 +	flag->load(flagsPath+"flag-arrow-up.png");
  3.2387 +	flag->setGroup("standard-arrow");
  3.2388 +	setupFlag (flag,tb,"arrow-up",tr("Important","Standardflag"));
  3.2389 +
  3.2390 +	flag->load(flagsPath+"flag-arrow-down.png");
  3.2391 +	flag->setGroup("standard-arrow");
  3.2392 +	setupFlag (flag,tb,"arrow-down",tr("Unimportant","Standardflag"));
  3.2393 +
  3.2394 +	flag->load(flagsPath+"flag-arrow-2up.png");
  3.2395 +	flag->setGroup("standard-arrow");
  3.2396 +	setupFlag (flag,tb,"2arrow-up",tr("Very important!","Standardflag"));
  3.2397 +
  3.2398 +	flag->load(flagsPath+"flag-arrow-2down.png");
  3.2399 +	flag->setGroup("standard-arrow");
  3.2400 +	setupFlag (flag,tb,"2arrow-down",tr("Very unimportant!","Standardflag"));
  3.2401 +	flag->unsetGroup();
  3.2402 +
  3.2403 +	flag->load(flagsPath+"flag-thumb-up.png");
  3.2404 +	flag->setGroup("standard-thumb");
  3.2405 +	setupFlag (flag,tb,"thumb-up",tr("I like this","Standardflag"));
  3.2406 +
  3.2407 +	flag->load(flagsPath+"flag-thumb-down.png");
  3.2408 +	flag->setGroup("standard-thumb");
  3.2409 +	setupFlag (flag,tb,"thumb-down",tr("I do not like this","Standardflag"));
  3.2410 +	flag->unsetGroup();
  3.2411 +
  3.2412 +	flag->load(flagsPath+"flag-rose.png");
  3.2413 +	setupFlag (flag,tb,"rose",tr("Rose","Standardflag"));
  3.2414 +
  3.2415 +	flag->load(flagsPath+"flag-heart.png");
  3.2416 +	setupFlag (flag,tb,"heart",tr("I just love...","Standardflag"));
  3.2417 +
  3.2418 +	flag->load(flagsPath+"flag-present.png");
  3.2419 +	setupFlag (flag,tb,"present",tr("Surprise!","Standardflag"));
  3.2420 +
  3.2421 +	flag->load(flagsPath+"flag-flash.png");
  3.2422 +	setupFlag (flag,tb,"flash",tr("Dangerous","Standardflag"));
  3.2423 +
  3.2424 +	// Original: xsldbg_output.png
  3.2425 +	flag->load(flagsPath+"flag-info.png");
  3.2426 +	setupFlag (flag,tb,"info",tr("Info","Standardflag"));
  3.2427 +
  3.2428 +	// Original khelpcenter.png
  3.2429 +	flag->load(flagsPath+"flag-lifebelt.png");
  3.2430 +	setupFlag (flag,tb,"lifebelt",tr("This will help","Standardflag"));
  3.2431 +
  3.2432 +	// Freemind flags
  3.2433 +	flag->setVisible(false);
  3.2434 +	flag->load(flagsPath+"freemind/warning.png");
  3.2435 +	setupFlag (flag,tb,  "freemind-warning",tr("Important","Freemind-Flag"));
  3.2436 +
  3.2437 +	for (int i=1; i<8; i++)
  3.2438 +	{
  3.2439 +		flag->load(flagsPath+QString("freemind/priority-%1.png").arg(i));
  3.2440 +		setupFlag (flag,tb, QString("freemind-priority-%1").arg(i),tr("Priority","Freemind-Flag"));
  3.2441 +	}
  3.2442 +
  3.2443 +	flag->load(flagsPath+"freemind/back.png");
  3.2444 +	setupFlag (flag,tb,"freemind-back",tr("Back","Freemind-Flag"));
  3.2445 +
  3.2446 +	flag->load(flagsPath+"freemind/forward.png");
  3.2447 +	setupFlag (flag,tb,"freemind-forward",tr("forward","Freemind-Flag"));
  3.2448 +
  3.2449 +	flag->load(flagsPath+"freemind/attach.png");
  3.2450 +	setupFlag (flag,tb,"freemind-attach",tr("Look here","Freemind-Flag"));
  3.2451 +
  3.2452 +	flag->load(flagsPath+"freemind/clanbomber.png");
  3.2453 +	setupFlag (flag,tb,"freemind-clanbomber",tr("Dangerous","Freemind-Flag"));
  3.2454 +
  3.2455 +	flag->load(flagsPath+"freemind/desktopnew.png");
  3.2456 +	setupFlag (flag,tb,"freemind-desktopnew",tr("Don't flagrget","Freemind-Flag"));
  3.2457 +
  3.2458 +	flag->load(flagsPath+"freemind/flag.png");
  3.2459 +	setupFlag (flag,tb,"freemind-flag",tr("Flag","Freemind-Flag"));
  3.2460 +
  3.2461 +
  3.2462 +	flag->load(flagsPath+"freemind/gohome.png");
  3.2463 +	setupFlag (flag,tb,"freemind-gohome",tr("Home","Freemind-Flag"));
  3.2464 +
  3.2465 +
  3.2466 +	flag->load(flagsPath+"freemind/kaddressbook.png");
  3.2467 +	setupFlag (flag,tb,"freemind-kaddressbook",tr("Telephone","Freemind-Flag"));
  3.2468 +
  3.2469 +	flag->load(flagsPath+"freemind/knotify.png");
  3.2470 +	setupFlag (flag,tb,"freemind-knotify",tr("Music","Freemind-Flag"));
  3.2471 +
  3.2472 +	flag->load(flagsPath+"freemind/korn.png");
  3.2473 +	setupFlag (flag,tb,"freemind-korn",tr("Mailbox","Freemind-Flag"));
  3.2474 +
  3.2475 +	flag->load(flagsPath+"freemind/mail.png");
  3.2476 +	setupFlag (flag,tb,"freemind-mail",tr("Maix","Freemind-Flag"));
  3.2477 +
  3.2478 +	flag->load(flagsPath+"freemind/password.png");
  3.2479 +	setupFlag (flag,tb,"freemind-password",tr("Password","Freemind-Flag"));
  3.2480 +
  3.2481 +	flag->load(flagsPath+"freemind/pencil.png");
  3.2482 +	setupFlag (flag,tb,"freemind-pencil",tr("To be improved","Freemind-Flag"));
  3.2483 +
  3.2484 +	flag->load(flagsPath+"freemind/stop.png");
  3.2485 +	setupFlag (flag,tb,"freemind-stop",tr("Stop","Freemind-Flag"));
  3.2486 +
  3.2487 +	flag->load(flagsPath+"freemind/wizard.png");
  3.2488 +	setupFlag (flag,tb,"freemind-wizard",tr("Magic","Freemind-Flag"));
  3.2489 +
  3.2490 +	flag->load(flagsPath+"freemind/xmag.png");
  3.2491 +	setupFlag (flag,tb,"freemind-xmag",tr("To be discussed","Freemind-Flag"));
  3.2492 +
  3.2493 +	flag->load(flagsPath+"freemind/bell.png");
  3.2494 +	setupFlag (flag,tb,"freemind-bell",tr("Reminder","Freemind-Flag"));
  3.2495 +
  3.2496 +	flag->load(flagsPath+"freemind/bookmark.png");
  3.2497 +	setupFlag (flag,tb,"freemind-bookmark",tr("Excellent","Freemind-Flag"));
  3.2498 +
  3.2499 +	flag->load(flagsPath+"freemind/penguin.png");
  3.2500 +	setupFlag (flag,tb,"freemind-penguin",tr("Linux","Freemind-Flag"));
  3.2501 +
  3.2502 +	flag->load(flagsPath+"freemind/licq.png");
  3.2503 +	setupFlag (flag,tb,"freemind-licq",tr("Sweet","Freemind-Flag"));
  3.2504  }
  3.2505  
  3.2506  void Main::setupFlag (Flag *flag, QToolBar *tb, const QString &name, const QString &tooltip)
  3.2507  {
  3.2508 -flag->setName(name);
  3.2509 -flag->setToolTip (tooltip);
  3.2510 -QAction *a;
  3.2511 -if (tb)
  3.2512 -{
  3.2513 -	a=new QAction (flag->getPixmap(),name,this);
  3.2514 -	// StandardFlag
  3.2515 -	tb->addAction (a);
  3.2516 -	flag->setAction (a);
  3.2517 -	a->setVisible (flag->isVisible());
  3.2518 -	a->setCheckable(true);
  3.2519 -	a->setObjectName(name);
  3.2520 -	a->setToolTip(tooltip);
  3.2521 -	connect (a, SIGNAL( triggered() ), this, SLOT( standardFlagChanged() ) );
  3.2522 -	standardFlagsMaster->addFlag (flag);	
  3.2523 -} else
  3.2524 -{
  3.2525 -	// SystemFlag
  3.2526 -	systemFlagsMaster->addFlag (flag);	
  3.2527 -}
  3.2528 +	flag->setName(name);
  3.2529 +	flag->setToolTip (tooltip);
  3.2530 +	QAction *a;
  3.2531 +	if (tb)
  3.2532 +	{
  3.2533 +		a=new QAction (flag->getPixmap(),name,this);
  3.2534 +		// StandardFlag
  3.2535 +		tb->addAction (a);
  3.2536 +		flag->setAction (a);
  3.2537 +		a->setVisible (flag->isVisible());
  3.2538 +		a->setCheckable(true);
  3.2539 +		a->setObjectName(name);
  3.2540 +		a->setToolTip(tooltip);
  3.2541 +		connect (a, SIGNAL( triggered() ), this, SLOT( standardFlagChanged() ) );
  3.2542 +		standardFlagsMaster->addFlag (flag);	
  3.2543 +	} else
  3.2544 +	{
  3.2545 +		// SystemFlag
  3.2546 +		systemFlagsMaster->addFlag (flag);	
  3.2547 +	}
  3.2548  }
  3.2549  
  3.2550  // Network Actions
  3.2551  void Main::setupNetworkActions()
  3.2552  {
  3.2553 -if (!settings.value( "/mainwindow/showTestMenu",false).toBool() ) 
  3.2554 -	return;
  3.2555 -QMenu *netMenu = menuBar()->addMenu(  "Network" );
  3.2556 -
  3.2557 -QAction *a;
  3.2558 -
  3.2559 -a = new QAction(  "Start TCPserver for MapEditor",this);
  3.2560 -//a->setStatusTip ( "Set application to open pdf files"));
  3.2561 -//a->setShortcut ( Qt::ALT + Qt::Key_T );		//New TCP server
  3.2562 -connect( a, SIGNAL( triggered() ), this, SLOT( networkStartServer() ) );
  3.2563 -netMenu->addAction (a);
  3.2564 -
  3.2565 -a = new QAction(  "Connect MapEditor to server",this);
  3.2566 -//a->setStatusTip ( "Set application to open pdf files"));
  3.2567 -a->setShortcut ( Qt::ALT + Qt::Key_C );		// Connect to server
  3.2568 -connect( a, SIGNAL( triggered() ), this, SLOT( networkConnect() ) );
  3.2569 -netMenu->addAction (a);
  3.2570 +	if (!settings.value( "/mainwindow/showTestMenu",false).toBool() ) 
  3.2571 +		return;
  3.2572 +	QMenu *netMenu = menuBar()->addMenu(  "Network" );
  3.2573 +
  3.2574 +	QAction *a;
  3.2575 +
  3.2576 +	a = new QAction(  "Start TCPserver for MapEditor",this);
  3.2577 +	//a->setStatusTip ( "Set application to open pdf files"));
  3.2578 +	//a->setShortcut ( Qt::ALT + Qt::Key_T );		//New TCP server
  3.2579 +	connect( a, SIGNAL( triggered() ), this, SLOT( networkStartServer() ) );
  3.2580 +	netMenu->addAction (a);
  3.2581 +
  3.2582 +	a = new QAction(  "Connect MapEditor to server",this);
  3.2583 +	//a->setStatusTip ( "Set application to open pdf files"));
  3.2584 +	a->setShortcut ( Qt::ALT + Qt::Key_C );		// Connect to server
  3.2585 +	connect( a, SIGNAL( triggered() ), this, SLOT( networkConnect() ) );
  3.2586 +	netMenu->addAction (a);
  3.2587  }
  3.2588  
  3.2589  // Settings Actions
  3.2590  void Main::setupSettingsActions()
  3.2591  {
  3.2592 -QMenu *settingsMenu = menuBar()->addMenu( tr( "&Settings" ));
  3.2593 -
  3.2594 -QAction *a;
  3.2595 -
  3.2596 -a = new QAction( tr( "Set application to open pdf files","Settings action"), this);
  3.2597 -a->setStatusTip ( tr( "Set application to open pdf files"));
  3.2598 -connect( a, SIGNAL( triggered() ), this, SLOT( settingsPDF() ) );
  3.2599 -settingsMenu->addAction (a);
  3.2600 -
  3.2601 -a = new QAction( tr( "Set application to open external links","Settings action"), this);
  3.2602 -a->setStatusTip( tr( "Set application to open external links"));
  3.2603 -connect( a, SIGNAL( triggered() ), this, SLOT( settingsURL() ) );
  3.2604 -settingsMenu->addAction (a);
  3.2605 -
  3.2606 -a = new QAction( tr( "Set path for macros","Settings action")+"...", this);
  3.2607 -a->setStatusTip( tr( "Set path for macros"));
  3.2608 -connect( a, SIGNAL( triggered() ), this, SLOT( settingsMacroDir() ) );
  3.2609 -settingsMenu->addAction (a);
  3.2610 -
  3.2611 -a = new QAction( tr( "Set number of undo levels","Settings action")+"...", this);
  3.2612 -a->setStatusTip( tr( "Set number of undo levels"));
  3.2613 -connect( a, SIGNAL( triggered() ), this, SLOT( settingsUndoLevels() ) );
  3.2614 -settingsMenu->addAction (a);
  3.2615 -
  3.2616 -settingsMenu->addSeparator();
  3.2617 -
  3.2618 -a = new QAction( tr( "Autosave","Settings action"), this);
  3.2619 -a->setStatusTip( tr( "Autosave"));
  3.2620 -a->setToggleAction(true);
  3.2621 -a->setChecked ( settings.value ("/mainwindow/autosave/use",false).toBool());
  3.2622 -connect( a, SIGNAL( triggered() ), this, SLOT( settingsAutosaveToggle() ) );
  3.2623 -settingsMenu->addAction (a);
  3.2624 -actionSettingsAutosaveToggle=a;
  3.2625 -
  3.2626 -a = new QAction( tr( "Autosave time","Settings action")+"...", this);
  3.2627 -a->setStatusTip( tr( "Autosave time"));
  3.2628 -connect( a, SIGNAL( triggered() ), this, SLOT( settingsAutosaveTime() ) );
  3.2629 -settingsMenu->addAction (a);
  3.2630 -actionSettingsAutosaveTime=a;
  3.2631 -
  3.2632 -a = new QAction( tr( "Write backup file on save","Settings action"), this);
  3.2633 -a->setStatusTip( tr( "Write backup file on save"));
  3.2634 -a->setToggleAction(true);
  3.2635 -a->setChecked ( settings.value ("/mainwindow/writeBackupFile",false).toBool());
  3.2636 -connect( a, SIGNAL( triggered() ), this, SLOT( settingsWriteBackupFileToggle() ) );
  3.2637 -settingsMenu->addAction (a);
  3.2638 -actionSettingsWriteBackupFile=a;
  3.2639 -
  3.2640 -settingsMenu->addSeparator();
  3.2641 -
  3.2642 -a = new QAction( tr( "Edit branch after adding it","Settings action" ), this );
  3.2643 -a->setStatusTip( tr( "Edit branch after adding it" ));
  3.2644 -a->setToggleAction(true);
  3.2645 -a->setChecked ( settings.value ("/mapeditor/editmode/autoEditNewBranch",true).toBool());
  3.2646 -settingsMenu->addAction (a);
  3.2647 -actionSettingsAutoEditNewBranch=a;
  3.2648 -
  3.2649 -a= new QAction( tr( "Select branch after adding it","Settings action" ), this );
  3.2650 -a->setStatusTip( tr( "Select branch after adding it" ));
  3.2651 -a->setToggleAction(true);
  3.2652 -a->setChecked ( settings.value ("/mapeditor/editmode/autoSelectNewBranch",false).toBool() );
  3.2653 -settingsMenu->addAction (a);
  3.2654 -actionSettingsAutoSelectNewBranch=a;
  3.2655 -
  3.2656 -a= new QAction(tr( "Select existing heading","Settings action" ), this);
  3.2657 -a->setStatusTip( tr( "Select heading before editing" ));
  3.2658 -a->setToggleAction(true);
  3.2659 -a->setChecked ( settings.value ("/mapeditor/editmode/autoSelectText",true).toBool() );
  3.2660 -settingsMenu->addAction (a);
  3.2661 -actionSettingsAutoSelectText=a;
  3.2662 -
  3.2663 -a= new QAction( tr( "Delete key","Settings action" ), this);
  3.2664 -a->setStatusTip( tr( "Delete key for deleting branches" ));
  3.2665 -a->setToggleAction(true);
  3.2666 -a->setChecked ( settings.value ("/mapeditor/editmode/useDelKey",true).toBool() );
  3.2667 -settingsMenu->addAction (a);
  3.2668 -connect( a, SIGNAL( triggered() ), this, SLOT( settingsToggleDelKey() ) );
  3.2669 -actionSettingsUseDelKey=a;
  3.2670 -
  3.2671 -a= new QAction( tr( "Exclusive flags","Settings action" ), this);
  3.2672 -a->setStatusTip( tr( "Use exclusive flags in flag toolbars" ));
  3.2673 -a->setToggleAction(true);
  3.2674 -a->setChecked ( settings.value ("/mapeditor/editmode/useFlagGroups",true).toBool() );
  3.2675 -settingsMenu->addAction (a);
  3.2676 -actionSettingsUseFlagGroups=a;
  3.2677 -
  3.2678 -a= new QAction( tr( "Use hide flags","Settings action" ), this);
  3.2679 -a->setStatusTip( tr( "Use hide flag during exports " ));
  3.2680 -a->setToggleAction(true);
  3.2681 -a->setChecked ( settings.value ("/export/useHideExport",true).toBool() );
  3.2682 -settingsMenu->addAction (a);
  3.2683 -actionSettingsUseHideExport=a;
  3.2684 -
  3.2685 -a = new QAction( tr( "Animation","Settings action"), this);
  3.2686 -a->setStatusTip( tr( "Animation"));
  3.2687 -a->setToggleAction(true);
  3.2688 -a->setChecked (settings.value("/animation/use",true).toBool() );
  3.2689 -connect( a, SIGNAL( triggered() ), this, SLOT( settingsToggleAnimation() ) );
  3.2690 -settingsMenu->addAction (a);
  3.2691 -actionSettingsUseAnimation=a;
  3.2692 +	QMenu *settingsMenu = menuBar()->addMenu( tr( "&Settings" ));
  3.2693 +
  3.2694 +	QAction *a;
  3.2695 +
  3.2696 +	a = new QAction( tr( "Set application to open pdf files","Settings action"), this);
  3.2697 +	a->setStatusTip ( tr( "Set application to open pdf files"));
  3.2698 +	connect( a, SIGNAL( triggered() ), this, SLOT( settingsPDF() ) );
  3.2699 +	settingsMenu->addAction (a);
  3.2700 +
  3.2701 +	a = new QAction( tr( "Set application to open external links","Settings action"), this);
  3.2702 +	a->setStatusTip( tr( "Set application to open external links"));
  3.2703 +	connect( a, SIGNAL( triggered() ), this, SLOT( settingsURL() ) );
  3.2704 +	settingsMenu->addAction (a);
  3.2705 +
  3.2706 +	a = new QAction( tr( "Set path for macros","Settings action")+"...", this);
  3.2707 +	a->setStatusTip( tr( "Set path for macros"));
  3.2708 +	connect( a, SIGNAL( triggered() ), this, SLOT( settingsMacroDir() ) );
  3.2709 +	settingsMenu->addAction (a);
  3.2710 +
  3.2711 +	a = new QAction( tr( "Set number of undo levels","Settings action")+"...", this);
  3.2712 +	a->setStatusTip( tr( "Set number of undo levels"));
  3.2713 +	connect( a, SIGNAL( triggered() ), this, SLOT( settingsUndoLevels() ) );
  3.2714 +	settingsMenu->addAction (a);
  3.2715 +
  3.2716 +	settingsMenu->addSeparator();
  3.2717 +
  3.2718 +	a = new QAction( tr( "Autosave","Settings action"), this);
  3.2719 +	a->setStatusTip( tr( "Autosave"));
  3.2720 +	a->setToggleAction(true);
  3.2721 +	a->setChecked ( settings.value ("/mainwindow/autosave/use",false).toBool());
  3.2722 +	connect( a, SIGNAL( triggered() ), this, SLOT( settingsAutosaveToggle() ) );
  3.2723 +	settingsMenu->addAction (a);
  3.2724 +	actionSettingsAutosaveToggle=a;
  3.2725 +
  3.2726 +	a = new QAction( tr( "Autosave time","Settings action")+"...", this);
  3.2727 +	a->setStatusTip( tr( "Autosave time"));
  3.2728 +	connect( a, SIGNAL( triggered() ), this, SLOT( settingsAutosaveTime() ) );
  3.2729 +	settingsMenu->addAction (a);
  3.2730 +	actionSettingsAutosaveTime=a;
  3.2731 +
  3.2732 +	a = new QAction( tr( "Write backup file on save","Settings action"), this);
  3.2733 +	a->setStatusTip( tr( "Write backup file on save"));
  3.2734 +	a->setToggleAction(true);
  3.2735 +	a->setChecked ( settings.value ("/mainwindow/writeBackupFile",false).toBool());
  3.2736 +	connect( a, SIGNAL( triggered() ), this, SLOT( settingsWriteBackupFileToggle() ) );
  3.2737 +	settingsMenu->addAction (a);
  3.2738 +	actionSettingsWriteBackupFile=a;
  3.2739 +
  3.2740 +	settingsMenu->addSeparator();
  3.2741 +
  3.2742 +	a = new QAction( tr( "Edit branch after adding it","Settings action" ), this );
  3.2743 +	a->setStatusTip( tr( "Edit branch after adding it" ));
  3.2744 +	a->setToggleAction(true);
  3.2745 +	a->setChecked ( settings.value ("/mapeditor/editmode/autoEditNewBranch",true).toBool());
  3.2746 +	settingsMenu->addAction (a);
  3.2747 +	actionSettingsAutoEditNewBranch=a;
  3.2748 +
  3.2749 +	a= new QAction( tr( "Select branch after adding it","Settings action" ), this );
  3.2750 +	a->setStatusTip( tr( "Select branch after adding it" ));
  3.2751 +	a->setToggleAction(true);
  3.2752 +	a->setChecked ( settings.value ("/mapeditor/editmode/autoSelectNewBranch",false).toBool() );
  3.2753 +	settingsMenu->addAction (a);
  3.2754 +	actionSettingsAutoSelectNewBranch=a;
  3.2755 +
  3.2756 +	a= new QAction(tr( "Select existing heading","Settings action" ), this);
  3.2757 +	a->setStatusTip( tr( "Select heading before editing" ));
  3.2758 +	a->setToggleAction(true);
  3.2759 +	a->setChecked ( settings.value ("/mapeditor/editmode/autoSelectText",true).toBool() );
  3.2760 +	settingsMenu->addAction (a);
  3.2761 +	actionSettingsAutoSelectText=a;
  3.2762 +
  3.2763 +	a= new QAction( tr( "Delete key","Settings action" ), this);
  3.2764 +	a->setStatusTip( tr( "Delete key for deleting branches" ));
  3.2765 +	a->setToggleAction(true);
  3.2766 +	a->setChecked ( settings.value ("/mapeditor/editmode/useDelKey",true).toBool() );
  3.2767 +	settingsMenu->addAction (a);
  3.2768 +	connect( a, SIGNAL( triggered() ), this, SLOT( settingsToggleDelKey() ) );
  3.2769 +	actionSettingsUseDelKey=a;
  3.2770 +
  3.2771 +	a= new QAction( tr( "Exclusive flags","Settings action" ), this);
  3.2772 +	a->setStatusTip( tr( "Use exclusive flags in flag toolbars" ));
  3.2773 +	a->setToggleAction(true);
  3.2774 +	a->setChecked ( settings.value ("/mapeditor/editmode/useFlagGroups",true).toBool() );
  3.2775 +	settingsMenu->addAction (a);
  3.2776 +	actionSettingsUseFlagGroups=a;
  3.2777 +
  3.2778 +	a= new QAction( tr( "Use hide flags","Settings action" ), this);
  3.2779 +	a->setStatusTip( tr( "Use hide flag during exports " ));
  3.2780 +	a->setToggleAction(true);
  3.2781 +	a->setChecked ( settings.value ("/export/useHideExport",true).toBool() );
  3.2782 +	settingsMenu->addAction (a);
  3.2783 +	actionSettingsUseHideExport=a;
  3.2784 +
  3.2785 +	a = new QAction( tr( "Animation","Settings action"), this);
  3.2786 +	a->setStatusTip( tr( "Animation"));
  3.2787 +	a->setToggleAction(true);
  3.2788 +	a->setChecked (settings.value("/animation/use",true).toBool() );
  3.2789 +	connect( a, SIGNAL( triggered() ), this, SLOT( settingsToggleAnimation() ) );
  3.2790 +	settingsMenu->addAction (a);
  3.2791 +	actionSettingsUseAnimation=a;
  3.2792  }
  3.2793  
  3.2794  // Test Actions
  3.2795  void Main::setupTestActions()
  3.2796  {
  3.2797 -QMenu *testMenu = menuBar()->addMenu( tr( "&Test" ));
  3.2798 -
  3.2799 -QAction *a;
  3.2800 -a = new QAction( "Test function 1" , this);
  3.2801 -a->setStatusTip( "Call test function 1" );
  3.2802 -a->setShortcut (Qt::CTRL + Qt::Key_T);	// Test function 1  //FIXME-2 originally: color subtree
  3.2803 -testMenu->addAction (a);
  3.2804 -connect( a, SIGNAL( triggered() ), this, SLOT( testFunction1() ) );
  3.2805 -
  3.2806 -a = new QAction( "Test function 2" , this);
  3.2807 -a->setStatusTip( "Call test function 2" );
  3.2808 -a->setShortcut (Qt::SHIFT + Qt::Key_T);		// Test function 2
  3.2809 -testMenu->addAction (a);
  3.2810 -connect( a, SIGNAL( triggered() ), this, SLOT( testFunction2() ) );
  3.2811 -
  3.2812 -a = new QAction( "Command" , this);
  3.2813 -a->setStatusTip( "Enter command to call in editor" );
  3.2814 -connect( a, SIGNAL( triggered() ), this, SLOT( testCommand() ) );
  3.2815 -testMenu->addAction (a);
  3.2816 +	QMenu *testMenu = menuBar()->addMenu( tr( "&Test" ));
  3.2817 +
  3.2818 +	QAction *a;
  3.2819 +	a = new QAction( "Test function 1" , this);
  3.2820 +	a->setStatusTip( "Call test function 1" );
  3.2821 +	a->setShortcut (Qt::CTRL + Qt::Key_T);	// Test function 1  //FIXME-2 originally: color subtree
  3.2822 +	testMenu->addAction (a);
  3.2823 +	connect( a, SIGNAL( triggered() ), this, SLOT( testFunction1() ) );
  3.2824 +
  3.2825 +	a = new QAction( "Test function 2" , this);
  3.2826 +	a->setStatusTip( "Call test function 2" );
  3.2827 +	a->setShortcut (Qt::SHIFT + Qt::Key_T);		// Test function 2
  3.2828 +	testMenu->addAction (a);
  3.2829 +	connect( a, SIGNAL( triggered() ), this, SLOT( testFunction2() ) );
  3.2830 +
  3.2831 +	a = new QAction( "Command" , this);
  3.2832 +	a->setStatusTip( "Enter command to call in editor" );
  3.2833 +	connect( a, SIGNAL( triggered() ), this, SLOT( testCommand() ) );
  3.2834 +	testMenu->addAction (a);
  3.2835  }
  3.2836  
  3.2837  // Help Actions
  3.2838  void Main::setupHelpActions()
  3.2839  {
  3.2840 -QMenu *helpMenu = menuBar()->addMenu ( tr( "&Help","Help menubar entry" ));
  3.2841 -
  3.2842 -QAction *a;
  3.2843 -a = new QAction(  tr( "Open VYM Documentation (pdf) ","Help action" ), this );
  3.2844 -a->setStatusTip( tr( "Open VYM Documentation (pdf)" ));
  3.2845 -connect( a, SIGNAL( triggered() ), this, SLOT( helpDoc() ) );
  3.2846 -helpMenu->addAction (a);
  3.2847 -
  3.2848 -a = new QAction(  tr( "Open VYM example maps ","Help action" ), this );
  3.2849 -a->setStatusTip( tr( "Open VYM example maps " ));
  3.2850 -connect( a, SIGNAL( triggered() ), this, SLOT( helpDemo() ) );
  3.2851 -helpMenu->addAction (a);
  3.2852 -
  3.2853 -a = new QAction( tr( "About VYM","Help action" ), this);
  3.2854 -a->setStatusTip( tr( "About VYM")+vymName);
  3.2855 -connect( a, SIGNAL( triggered() ), this, SLOT( helpAbout() ) );
  3.2856 -helpMenu->addAction (a);
  3.2857 -
  3.2858 -a = new QAction( tr( "About QT","Help action" ), this);
  3.2859 -a->setStatusTip( tr( "Information about QT toolkit" ));
  3.2860 -connect( a, SIGNAL( triggered() ), this, SLOT( helpAboutQT() ) );
  3.2861 -helpMenu->addAction (a);
  3.2862 +	QMenu *helpMenu = menuBar()->addMenu ( tr( "&Help","Help menubar entry" ));
  3.2863 +
  3.2864 +	QAction *a;
  3.2865 +	a = new QAction(  tr( "Open VYM Documentation (pdf) ","Help action" ), this );
  3.2866 +	a->setStatusTip( tr( "Open VYM Documentation (pdf)" ));
  3.2867 +	connect( a, SIGNAL( triggered() ), this, SLOT( helpDoc() ) );
  3.2868 +	helpMenu->addAction (a);
  3.2869 +
  3.2870 +	a = new QAction(  tr( "Open VYM example maps ","Help action" ), this );
  3.2871 +	a->setStatusTip( tr( "Open VYM example maps " ));
  3.2872 +	connect( a, SIGNAL( triggered() ), this, SLOT( helpDemo() ) );
  3.2873 +	helpMenu->addAction (a);
  3.2874 +
  3.2875 +	a = new QAction( tr( "About VYM","Help action" ), this);
  3.2876 +	a->setStatusTip( tr( "About VYM")+vymName);
  3.2877 +	connect( a, SIGNAL( triggered() ), this, SLOT( helpAbout() ) );
  3.2878 +	helpMenu->addAction (a);
  3.2879 +
  3.2880 +	a = new QAction( tr( "About QT","Help action" ), this);
  3.2881 +	a->setStatusTip( tr( "Information about QT toolkit" ));
  3.2882 +	connect( a, SIGNAL( triggered() ), this, SLOT( helpAboutQT() ) );
  3.2883 +	helpMenu->addAction (a);
  3.2884  }
  3.2885  
  3.2886  // Context Menus
  3.2887  void Main::setupContextMenus()
  3.2888  {
  3.2889 -QAction*a;
  3.2890 -
  3.2891 -// Context Menu for branch or mapcenter
  3.2892 -branchContextMenu =new QMenu (this);
  3.2893 -branchContextMenu->addAction (actionViewTogglePropertyWindow);
  3.2894 -branchContextMenu->addSeparator();	
  3.2895 -
  3.2896 -	// Submenu "Add"
  3.2897 -	branchAddContextMenu =branchContextMenu->addMenu (tr("Add"));
  3.2898 -	branchAddContextMenu->addAction (actionPaste );
  3.2899 -	branchAddContextMenu->addAction ( actionAddMapCenter );
  3.2900 -	branchAddContextMenu->addAction ( actionAddBranch );
  3.2901 -	branchAddContextMenu->addAction ( actionAddBranchBefore );
  3.2902 -	branchAddContextMenu->addAction ( actionAddBranchAbove);
  3.2903 -	branchAddContextMenu->addAction ( actionAddBranchBelow );
  3.2904 -	branchAddContextMenu->addSeparator();	
  3.2905 -	branchAddContextMenu->addAction ( actionImportAdd );
  3.2906 -	branchAddContextMenu->addAction ( actionImportReplace );
  3.2907 -
  3.2908 -	// Submenu "Remove"
  3.2909 -	branchRemoveContextMenu =branchContextMenu->addMenu (tr ("Remove","Context menu name"));
  3.2910 -	branchRemoveContextMenu->addAction (actionCut);
  3.2911 -	branchRemoveContextMenu->addAction ( actionDelete );
  3.2912 -	branchRemoveContextMenu->addAction ( actionDeleteKeepChildren );
  3.2913 -	branchRemoveContextMenu->addAction ( actionDeleteChildren );
  3.2914 -	
  3.2915 -
  3.2916 -actionSaveBranch->addTo( branchContextMenu );
  3.2917 -actionFileNewCopy->addTo (branchContextMenu );
  3.2918 -actionDetach->addTo (branchContextMenu );
  3.2919 -
  3.2920 -branchContextMenu->addSeparator();	
  3.2921 -branchContextMenu->addAction ( actionLoadImage);
  3.2922 -
  3.2923 -// Submenu for Links (URLs, vymLinks)
  3.2924 -branchLinksContextMenu =new QMenu (this);
  3.2925 -
  3.2926 +	QAction*a;
  3.2927 +
  3.2928 +	// Context Menu for branch or mapcenter
  3.2929 +	branchContextMenu =new QMenu (this);
  3.2930 +	branchContextMenu->addAction (actionViewTogglePropertyWindow);
  3.2931  	branchContextMenu->addSeparator();	
  3.2932 -	branchLinksContextMenu=branchContextMenu->addMenu(tr("References (URLs, vymLinks, ...)","Context menu name"));	
  3.2933 -	branchLinksContextMenu->addAction ( actionOpenURL );
  3.2934 -	branchLinksContextMenu->addAction ( actionOpenURLTab );
  3.2935 -	branchLinksContextMenu->addAction ( actionOpenMultipleURLTabs );
  3.2936 -	branchLinksContextMenu->addAction ( actionURL );
  3.2937 -	branchLinksContextMenu->addAction ( actionLocalURL );
  3.2938 -	branchLinksContextMenu->addAction ( actionHeading2URL );
  3.2939 -	branchLinksContextMenu->addAction ( actionBugzilla2URL );
  3.2940 -	if (settings.value( "/mainwindow/showTestMenu",false).toBool() )
  3.2941 +
  3.2942 +		// Submenu "Add"
  3.2943 +		branchAddContextMenu =branchContextMenu->addMenu (tr("Add"));
  3.2944 +		branchAddContextMenu->addAction (actionPaste );
  3.2945 +		branchAddContextMenu->addAction ( actionAddMapCenter );
  3.2946 +		branchAddContextMenu->addAction ( actionAddBranch );
  3.2947 +		branchAddContextMenu->addAction ( actionAddBranchBefore );
  3.2948 +		branchAddContextMenu->addAction ( actionAddBranchAbove);
  3.2949 +		branchAddContextMenu->addAction ( actionAddBranchBelow );
  3.2950 +		branchAddContextMenu->addSeparator();	
  3.2951 +		branchAddContextMenu->addAction ( actionImportAdd );
  3.2952 +		branchAddContextMenu->addAction ( actionImportReplace );
  3.2953 +
  3.2954 +		// Submenu "Remove"
  3.2955 +		branchRemoveContextMenu =branchContextMenu->addMenu (tr ("Remove","Context menu name"));
  3.2956 +		branchRemoveContextMenu->addAction (actionCut);
  3.2957 +		branchRemoveContextMenu->addAction ( actionDelete );
  3.2958 +		branchRemoveContextMenu->addAction ( actionDeleteKeepChildren );
  3.2959 +		branchRemoveContextMenu->addAction ( actionDeleteChildren );
  3.2960 +		
  3.2961 +
  3.2962 +	actionSaveBranch->addTo( branchContextMenu );
  3.2963 +	actionFileNewCopy->addTo (branchContextMenu );
  3.2964 +	actionDetach->addTo (branchContextMenu );
  3.2965 +
  3.2966 +	branchContextMenu->addSeparator();	
  3.2967 +	branchContextMenu->addAction ( actionLoadImage);
  3.2968 +
  3.2969 +	// Submenu for Links (URLs, vymLinks)
  3.2970 +	branchLinksContextMenu =new QMenu (this);
  3.2971 +
  3.2972 +		branchContextMenu->addSeparator();	
  3.2973 +		branchLinksContextMenu=branchContextMenu->addMenu(tr("References (URLs, vymLinks, ...)","Context menu name"));	
  3.2974 +		branchLinksContextMenu->addAction ( actionOpenURL );
  3.2975 +		branchLinksContextMenu->addAction ( actionOpenURLTab );
  3.2976 +		branchLinksContextMenu->addAction ( actionOpenMultipleURLTabs );
  3.2977 +		branchLinksContextMenu->addAction ( actionURL );
  3.2978 +		branchLinksContextMenu->addAction ( actionLocalURL );
  3.2979 +		branchLinksContextMenu->addAction ( actionHeading2URL );
  3.2980 +		branchLinksContextMenu->addAction ( actionBugzilla2URL );
  3.2981 +		if (settings.value( "/mainwindow/showTestMenu",false).toBool() )
  3.2982 +		{
  3.2983 +			branchLinksContextMenu->addAction ( actionFATE2URL );
  3.2984 +		}	
  3.2985 +		branchLinksContextMenu->addSeparator();	
  3.2986 +		branchLinksContextMenu->addAction ( actionOpenVymLink );
  3.2987 +		branchLinksContextMenu->addAction ( actionOpenMultipleVymLinks );
  3.2988 +		branchLinksContextMenu->addAction ( actionVymLink );
  3.2989 +		branchLinksContextMenu->addAction ( actionDeleteVymLink );
  3.2990 +		
  3.2991 +
  3.2992 +	// Context Menu for XLinks in a branch menu
  3.2993 +	// This will be populated "on demand" in MapEditor::updateActions
  3.2994 +	branchContextMenu->addSeparator();	
  3.2995 +	branchXLinksContextMenuEdit =branchContextMenu->addMenu (tr ("Edit XLink","Context menu name"));
  3.2996 +	branchXLinksContextMenuFollow =branchContextMenu->addMenu (tr ("Follow XLink","Context menu name"));
  3.2997 +	connect( branchXLinksContextMenuFollow, SIGNAL( triggered(QAction *) ), this, SLOT( editFollowXLink(QAction * ) ) );
  3.2998 +	connect( branchXLinksContextMenuEdit, SIGNAL( triggered(QAction *) ), this, SLOT( editEditXLink(QAction * ) ) );
  3.2999 +
  3.3000 +
  3.3001 +	// Context menu for floatimage
  3.3002 +	floatimageContextMenu =new QMenu (this);
  3.3003 +	a= new QAction (tr ("Save image","Context action"),this);
  3.3004 +	connect (a, SIGNAL (triggered()), this, SLOT (editSaveImage()));
  3.3005 +	floatimageContextMenu->addAction (a);
  3.3006 +
  3.3007 +	floatimageContextMenu->addSeparator();	
  3.3008 +	actionCopy->addTo( floatimageContextMenu );
  3.3009 +	actionCut->addTo( floatimageContextMenu );
  3.3010 +
  3.3011 +	floatimageContextMenu->addSeparator();	
  3.3012 +	floatimageContextMenu->addAction ( actionFormatHideLinkUnselected );
  3.3013 +
  3.3014 +
  3.3015 +	// Context menu for canvas
  3.3016 +	canvasContextMenu =new QMenu (this);
  3.3017 +	actionAddMapCenter->addTo( canvasContextMenu );
  3.3018 +	actionMapInfo->addTo( canvasContextMenu );
  3.3019 +	canvasContextMenu->insertSeparator();	
  3.3020 +	actionGroupFormatLinkStyles->addTo( canvasContextMenu );
  3.3021 +	canvasContextMenu->insertSeparator();	
  3.3022 +	actionFormatLinkColorHint->addTo( canvasContextMenu );
  3.3023 +	actionFormatLinkColor->addTo( canvasContextMenu );
  3.3024 +	actionFormatSelectionColor->addTo( canvasContextMenu );
  3.3025 +	actionFormatBackColor->addTo( canvasContextMenu );
  3.3026 +	// actionFormatBackImage->addTo( canvasContextMenu );  //FIXME-4 makes vym too slow: postponed for later version 
  3.3027 +
  3.3028 +	// Menu for last opened files
  3.3029 +	// Create actions
  3.3030 +	for (int i = 0; i < MaxRecentFiles; ++i) 
  3.3031  	{
  3.3032 -		branchLinksContextMenu->addAction ( actionFATE2URL );
  3.3033 -	}	
  3.3034 -	branchLinksContextMenu->addSeparator();	
  3.3035 -	branchLinksContextMenu->addAction ( actionOpenVymLink );
  3.3036 -	branchLinksContextMenu->addAction ( actionOpenMultipleVymLinks );
  3.3037 -	branchLinksContextMenu->addAction ( actionVymLink );
  3.3038 -	branchLinksContextMenu->addAction ( actionDeleteVymLink );
  3.3039 -	
  3.3040 -
  3.3041 -// Context Menu for XLinks in a branch menu
  3.3042 -// This will be populated "on demand" in MapEditor::updateActions
  3.3043 -branchContextMenu->addSeparator();	
  3.3044 -branchXLinksContextMenuEdit =branchContextMenu->addMenu (tr ("Edit XLink","Context menu name"));
  3.3045 -branchXLinksContextMenuFollow =branchContextMenu->addMenu (tr ("Follow XLink","Context menu name"));
  3.3046 -connect( branchXLinksContextMenuFollow, SIGNAL( triggered(QAction *) ), this, SLOT( editFollowXLink(QAction * ) ) );
  3.3047 -connect( branchXLinksContextMenuEdit, SIGNAL( triggered(QAction *) ), this, SLOT( editEditXLink(QAction * ) ) );
  3.3048 -
  3.3049 -
  3.3050 -// Context menu for floatimage
  3.3051 -floatimageContextMenu =new QMenu (this);
  3.3052 -a= new QAction (tr ("Save image","Context action"),this);
  3.3053 -connect (a, SIGNAL (triggered()), this, SLOT (editSaveImage()));
  3.3054 -floatimageContextMenu->addAction (a);
  3.3055 -
  3.3056 -floatimageContextMenu->addSeparator();	
  3.3057 -actionCopy->addTo( floatimageContextMenu );
  3.3058 -actionCut->addTo( floatimageContextMenu );
  3.3059 -
  3.3060 -floatimageContextMenu->addSeparator();	
  3.3061 -floatimageContextMenu->addAction ( actionFormatHideLinkUnselected );
  3.3062 -
  3.3063 -
  3.3064 -// Context menu for canvas
  3.3065 -canvasContextMenu =new QMenu (this);
  3.3066 -actionAddMapCenter->addTo( canvasContextMenu );
  3.3067 -actionMapInfo->addTo( canvasContextMenu );
  3.3068 -canvasContextMenu->insertSeparator();	
  3.3069 -actionGroupFormatLinkStyles->addTo( canvasContextMenu );
  3.3070 -canvasContextMenu->insertSeparator();	
  3.3071 -actionFormatLinkColorHint->addTo( canvasContextMenu );
  3.3072 -actionFormatLinkColor->addTo( canvasContextMenu );
  3.3073 -actionFormatSelectionColor->addTo( canvasContextMenu );
  3.3074 -actionFormatBackColor->addTo( canvasContextMenu );
  3.3075 -// actionFormatBackImage->addTo( canvasContextMenu );  //FIXME-4 makes vym too slow: postponed for later version 
  3.3076 -
  3.3077 -// Menu for last opened files
  3.3078 -// Create actions
  3.3079 -for (int i = 0; i < MaxRecentFiles; ++i) 
  3.3080 -{
  3.3081 -	recentFileActions[i] = new QAction(this);
  3.3082 -	recentFileActions[i]->setVisible(false);
  3.3083 -	fileLastMapsMenu->addAction(recentFileActions[i]);
  3.3084 -	connect(recentFileActions[i], SIGNAL(triggered()),
  3.3085 -			this, SLOT(fileLoadRecent()));
  3.3086 -}
  3.3087 -setupRecentMapsMenu();
  3.3088 +		recentFileActions[i] = new QAction(this);
  3.3089 +		recentFileActions[i]->setVisible(false);
  3.3090 +		fileLastMapsMenu->addAction(recentFileActions[i]);
  3.3091 +		connect(recentFileActions[i], SIGNAL(triggered()),
  3.3092 +				this, SLOT(fileLoadRecent()));
  3.3093 +	}
  3.3094 +	setupRecentMapsMenu();
  3.3095  }
  3.3096  
  3.3097  void Main::setupRecentMapsMenu()
  3.3098  {
  3.3099 -QStringList files = settings.value("/mainwindow/recentFileList").toStringList();
  3.3100 -
  3.3101 -int numRecentFiles = qMin(files.size(), (int)MaxRecentFiles);
  3.3102 -
  3.3103 -for (int i = 0; i < numRecentFiles; ++i) {
  3.3104 -	QString text = tr("&%1 %2").arg(i + 1).arg(files[i]);
  3.3105 -	recentFileActions[i]->setText(text);
  3.3106 -	recentFileActions[i]->setData(files[i]);
  3.3107 -	recentFileActions[i]->setVisible(true);
  3.3108 -}
  3.3109 -for (int j = numRecentFiles; j < MaxRecentFiles; ++j)
  3.3110 -	recentFileActions[j]->setVisible(false);
  3.3111 +	QStringList files = settings.value("/mainwindow/recentFileList").toStringList();
  3.3112 +
  3.3113 +	int numRecentFiles = qMin(files.size(), (int)MaxRecentFiles);
  3.3114 +
  3.3115 +	for (int i = 0; i < numRecentFiles; ++i) {
  3.3116 +		QString text = tr("&%1 %2").arg(i + 1).arg(files[i]);
  3.3117 +		recentFileActions[i]->setText(text);
  3.3118 +		recentFileActions[i]->setData(files[i]);
  3.3119 +		recentFileActions[i]->setVisible(true);
  3.3120 +	}
  3.3121 +	for (int j = numRecentFiles; j < MaxRecentFiles; ++j)
  3.3122 +		recentFileActions[j]->setVisible(false);
  3.3123  }
  3.3124  
  3.3125  void Main::setupMacros()
  3.3126  {
  3.3127 -for (int i = 0; i <= 11; i++) 
  3.3128 -{
  3.3129 -	macroActions[i] = new QAction(this);
  3.3130 -	macroActions[i]->setData(i);
  3.3131 -	addAction (macroActions[i]);
  3.3132 -	connect(macroActions[i], SIGNAL(triggered()),
  3.3133 -			this, SLOT(callMacro()));
  3.3134 -}			
  3.3135 -macroActions[0]->setShortcut ( Qt::Key_F1 );
  3.3136 -macroActions[1]->setShortcut ( Qt::Key_F2 );
  3.3137 -macroActions[2]->setShortcut ( Qt::Key_F3 );
  3.3138 -macroActions[3]->setShortcut ( Qt::Key_F4 );
  3.3139 -macroActions[4]->setShortcut ( Qt::Key_F5 );
  3.3140 -macroActions[5]->setShortcut ( Qt::Key_F6 );
  3.3141 -macroActions[6]->setShortcut ( Qt::Key_F7 );
  3.3142 -macroActions[7]->setShortcut ( Qt::Key_F8 );
  3.3143 -macroActions[8]->setShortcut ( Qt::Key_F9 );
  3.3144 -macroActions[9]->setShortcut ( Qt::Key_F10 );
  3.3145 -macroActions[10]->setShortcut ( Qt::Key_F11 );
  3.3146 -macroActions[11]->setShortcut ( Qt::Key_F12 );
  3.3147 +	for (int i = 0; i <= 11; i++) 
  3.3148 +	{
  3.3149 +		macroActions[i] = new QAction(this);
  3.3150 +		macroActions[i]->setData(i);
  3.3151 +		addAction (macroActions[i]);
  3.3152 +		connect(macroActions[i], SIGNAL(triggered()),
  3.3153 +				this, SLOT(callMacro()));
  3.3154 +	}			
  3.3155 +	macroActions[0]->setShortcut ( Qt::Key_F1 );
  3.3156 +	macroActions[1]->setShortcut ( Qt::Key_F2 );
  3.3157 +	macroActions[2]->setShortcut ( Qt::Key_F3 );
  3.3158 +	macroActions[3]->setShortcut ( Qt::Key_F4 );
  3.3159 +	macroActions[4]->setShortcut ( Qt::Key_F5 );
  3.3160 +	macroActions[5]->setShortcut ( Qt::Key_F6 );
  3.3161 +	macroActions[6]->setShortcut ( Qt::Key_F7 );
  3.3162 +	macroActions[7]->setShortcut ( Qt::Key_F8 );
  3.3163 +	macroActions[8]->setShortcut ( Qt::Key_F9 );
  3.3164 +	macroActions[9]->setShortcut ( Qt::Key_F10 );
  3.3165 +	macroActions[10]->setShortcut ( Qt::Key_F11 );
  3.3166 +	macroActions[11]->setShortcut ( Qt::Key_F12 );
  3.3167  }
  3.3168  
  3.3169  void Main::hideEvent (QHideEvent * )
  3.3170  {
  3.3171 -if (!textEditor->isMinimized() ) textEditor->hide();
  3.3172 +	if (!textEditor->isMinimized() ) textEditor->hide();
  3.3173  }
  3.3174  
  3.3175  void Main::showEvent (QShowEvent * )
  3.3176  {
  3.3177 -if (actionViewToggleNoteEditor->isOn()) textEditor->showNormal();
  3.3178 +	if (actionViewToggleNoteEditor->isOn()) textEditor->showNormal();
  3.3179  }
  3.3180  
  3.3181  
  3.3182  MapEditor* Main::currentMapEditor() const
  3.3183  {
  3.3184 -if ( tabWidget->currentPage())
  3.3185 -	return vymViews.at(tabWidget->currentIndex())->getMapEditor();
  3.3186 -return NULL;	
  3.3187 +	if ( tabWidget->currentPage())
  3.3188 +		return vymViews.at(tabWidget->currentIndex())->getMapEditor();
  3.3189 +	return NULL;	
  3.3190  }
  3.3191  
  3.3192  VymModel* Main::currentModel() const
  3.3193  {
  3.3194 -if ( tabWidget->currentPage())
  3.3195 -	return vymViews.at(tabWidget->currentIndex())->getModel();
  3.3196 -return NULL;	
  3.3197 +	if ( tabWidget->currentPage())
  3.3198 +		return vymViews.at(tabWidget->currentIndex())->getModel();
  3.3199 +	return NULL;	
  3.3200  }
  3.3201  
  3.3202  
  3.3203  void Main::editorChanged(QWidget *)
  3.3204  {
  3.3205 -// Unselect all possibly selected objects
  3.3206 -// (Important to update note editor)
  3.3207 -VymModel *m;
  3.3208 -for (int i=0;i<=tabWidget->count() -1;i++)
  3.3209 -{
  3.3210 -	m= vymViews.at(i)->getModel();
  3.3211 -	if (m) m->unselect();
  3.3212 -}
  3.3213 -m=currentModel();
  3.3214 -if (m) m->reselect();
  3.3215 -
  3.3216 -// Update actions to in menus and toolbars according to editor
  3.3217 -updateActions();
  3.3218 +	// Unselect all possibly selected objects
  3.3219 +	// (Important to update note editor)
  3.3220 +	VymModel *m;
  3.3221 +	for (int i=0;i<=tabWidget->count() -1;i++)
  3.3222 +	{
  3.3223 +		m= vymViews.at(i)->getModel();
  3.3224 +		if (m) m->unselect();
  3.3225 +	}
  3.3226 +	m=currentModel();
  3.3227 +	if (m) m->reselect();
  3.3228 +
  3.3229 +	// Update actions to in menus and toolbars according to editor
  3.3230 +	updateActions();
  3.3231  }
  3.3232  
  3.3233  void Main::fileNew()
  3.3234  {
  3.3235 -VymModel *vm=new VymModel;
  3.3236 -
  3.3237 -/////////////////////////////////////
  3.3238 -new ModelTest(vm, this);	//FIXME-3
  3.3239 -/////////////////////////////////////
  3.3240 -
  3.3241 -
  3.3242 -VymView *vv=new VymView (vm);
  3.3243 -vymViews.append (vv);
  3.3244 -tabWidget->addTab (vv,tr("unnamed","MainWindow: name for new and empty file"));
  3.3245 -tabWidget->setCurrentIndex (vymViews.count() );
  3.3246 -vv->initFocus();
  3.3247 -
  3.3248 -// Create MapCenter for empty map
  3.3249 -vm->addMapCenter();
  3.3250 -vm->makeDefault();
  3.3251 -
  3.3252 -// For the very first map we do not have flagrows yet...
  3.3253 -vm->select("mc:");
  3.3254 +	VymModel *vm=new VymModel;
  3.3255 +
  3.3256 +	/////////////////////////////////////
  3.3257 +	new ModelTest(vm, this);	//FIXME-3
  3.3258 +	/////////////////////////////////////
  3.3259 +
  3.3260 +	VymView *vv=new VymView (vm);
  3.3261 +	vymViews.append (vv);
  3.3262 +	tabWidget->addTab (vv,tr("unnamed","MainWindow: name for new and empty file"));
  3.3263 +	tabWidget->setCurrentIndex (vymViews.count() );
  3.3264 +	vv->initFocus();
  3.3265 +
  3.3266 +	// Create MapCenter for empty map
  3.3267 +	vm->addMapCenter();
  3.3268 +	vm->makeDefault();
  3.3269 +
  3.3270 +	// For the very first map we do not have flagrows yet...
  3.3271 +	vm->select("mc:");
  3.3272  }
  3.3273  
  3.3274  void Main::fileNewCopy()
  3.3275  {
  3.3276 -QString fn="unnamed";
  3.3277 -VymModel *srcModel=currentModel();
  3.3278 -if (srcModel)
  3.3279 -{
  3.3280 -	srcModel->copy();
  3.3281 -	fileNew();
  3.3282 -	VymModel *dstModel=vymViews.last()->getModel();
  3.3283 -	dstModel->select("mc:");
  3.3284 -	dstModel->load (clipboardDir+"/"+clipboardFile,ImportReplace, VymMap);
  3.3285 -}
  3.3286 +	QString fn="unnamed";
  3.3287 +	VymModel *srcModel=currentModel();
  3.3288 +	if (srcModel)
  3.3289 +	{
  3.3290 +		srcModel->copy();
  3.3291 +		fileNew();
  3.3292 +		VymModel *dstModel=vymViews.last()->getModel();
  3.3293 +		dstModel->select("mc:");
  3.3294 +		dstModel->load (clipboardDir+"/"+clipboardFile,ImportReplace, VymMap);
  3.3295 +	}
  3.3296  }
  3.3297  
  3.3298  ErrorCode Main::fileLoad(QString fn, const LoadMode &lmode, const FileType &ftype)
  3.3299  {
  3.3300 -ErrorCode err=success;
  3.3301 -
  3.3302 -// fn is usually the archive, mapfile the file after uncompressing
  3.3303 -QString mapfile;
  3.3304 -
  3.3305 -// Make fn absolute (needed for unzip)
  3.3306 -fn=QDir (fn).absPath();
  3.3307 -
  3.3308 -VymModel *vm;
  3.3309 -
  3.3310 -if (lmode==NewMap)
  3.3311 -{
  3.3312 -	// Check, if map is already loaded
  3.3313 -	int i=0;
  3.3314 -	while (i<=tabWidget->count() -1)
  3.3315 +	ErrorCode err=success;
  3.3316 +
  3.3317 +	// fn is usually the archive, mapfile the file after uncompressing
  3.3318 +	QString mapfile;
  3.3319 +
  3.3320 +	// Make fn absolute (needed for unzip)
  3.3321 +	fn=QDir (fn).absPath();
  3.3322 +
  3.3323 +	VymModel *vm;
  3.3324 +
  3.3325 +	if (lmode==NewMap)
  3.3326  	{
  3.3327 -		if (vymViews.at(i)->getModel()->getFilePath() == fn)
  3.3328 +		// Check, if map is already loaded
  3.3329 +		int i=0;
  3.3330 +		while (i<=tabWidget->count() -1)
  3.3331  		{
  3.3332 -			// Already there, ask for confirmation
  3.3333 -			QMessageBox mb( vymName,
  3.3334 -				tr("The map %1\nis already opened."
  3.3335 -				"Opening the same map in multiple editors may lead \n"
  3.3336 -				"to confusion when finishing working with vym."
  3.3337 -				"Do you want to").arg(fn),
  3.3338 -				QMessageBox::Warning,
  3.3339 -				QMessageBox::Yes | QMessageBox::Default,
  3.3340 -				QMessageBox::Cancel | QMessageBox::Escape,
  3.3341 -				QMessageBox::NoButton);
  3.3342 -			mb.setButtonText( QMessageBox::Yes, tr("Open anyway") );
  3.3343 -			mb.setButtonText( QMessageBox::Cancel, tr("Cancel"));
  3.3344 -			switch( mb.exec() ) 
  3.3345 +			if (vymViews.at(i)->getModel()->getFilePath() == fn)
  3.3346  			{
  3.3347 -				case QMessageBox::Yes:
  3.3348 -					// end loop and load anyway
  3.3349 -					i=tabWidget->count();
  3.3350 -					break;
  3.3351 -				case QMessageBox::Cancel:
  3.3352 -					// do nothing
  3.3353 -					return aborted;
  3.3354 -					break;
  3.3355 +				// Already there, ask for confirmation
  3.3356 +				QMessageBox mb( vymName,
  3.3357 +					tr("The map %1\nis already opened."
  3.3358 +					"Opening the same map in multiple editors may lead \n"
  3.3359 +					"to confusion when finishing working with vym."
  3.3360 +					"Do you want to").arg(fn),
  3.3361 +					QMessageBox::Warning,
  3.3362 +					QMessageBox::Yes | QMessageBox::Default,
  3.3363 +					QMessageBox::Cancel | QMessageBox::Escape,
  3.3364 +					QMessageBox::NoButton);
  3.3365 +				mb.setButtonText( QMessageBox::Yes, tr("Open anyway") );
  3.3366 +				mb.setButtonText( QMessageBox::Cancel, tr("Cancel"));
  3.3367 +				switch( mb.exec() ) 
  3.3368 +				{
  3.3369 +					case QMessageBox::Yes:
  3.3370 +						// end loop and load anyway
  3.3371 +						i=tabWidget->count();
  3.3372 +						break;
  3.3373 +					case QMessageBox::Cancel:
  3.3374 +						// do nothing
  3.3375 +						return aborted;
  3.3376 +						break;
  3.3377 +				}
  3.3378  			}
  3.3379 +			i++;
  3.3380  		}
  3.3381 -		i++;
  3.3382  	}
  3.3383 -}
  3.3384 -
  3.3385 -int tabIndex=tabWidget->currentPageIndex();
  3.3386 +
  3.3387 +	int tabIndex=tabWidget->currentPageIndex();
  3.3388  
  3.3389  	// Try to load map
  3.3390      if ( !fn.isEmpty() )
  3.3391 @@ -2489,35 +2479,10 @@
  3.3392  	if (m) m->cut();
  3.3393  }
  3.3394  
  3.3395 -void Main::editOpenFindWindow()
  3.3396 -{
  3.3397 -	findWindow->popup();
  3.3398 -	findWindow->raise();
  3.3399 -	findWindow->setActiveWindow();
  3.3400 -}
  3.3401 -
  3.3402 -void Main::editFind(QString s)
  3.3403 +void Main::editOpenFindWidget()
  3.3404  {
  3.3405  	VymModel *m=currentModel();
  3.3406 -	if (m)
  3.3407 -	{
  3.3408 -		bool cs=false;
  3.3409 -		BranchItem *bi=m->findText(s, cs);
  3.3410 -		if (bi)
  3.3411 -		{	
  3.3412 -			statusBar()->message( "Found: " + bi->getHeading(), statusbarTime );
  3.3413 -		} else
  3.3414 -		{
  3.3415 -			QMessageBox::information( findWindow, tr( "VYM -Information:" ),
  3.3416 -								   tr("No matches found for \"%1\"").arg(s));
  3.3417 -		}	
  3.3418 -	}
  3.3419 -}
  3.3420 -
  3.3421 -void Main::editFindChanged()
  3.3422 -{	// Notify editor, to abort the current find process
  3.3423 -	VymModel *m=currentModel();
  3.3424 -	if (m) m->findReset();
  3.3425 +	if (m) m->emitShowFindWidget();
  3.3426  }
  3.3427  
  3.3428  void Main::openTabs(QStringList urls)
     4.1 --- a/mainwindow.h	Wed Nov 25 10:58:21 2009 +0000
     4.2 +++ b/mainwindow.h	Wed Nov 25 15:27:22 2009 +0000
     4.3 @@ -9,7 +9,6 @@
     4.4  #include "extrainfodialog.h"
     4.5  #include "flag.h"
     4.6  #include "file.h"
     4.7 -#include "findwindow.h"
     4.8  #include "historywindow.h"
     4.9  #include "mapeditor.h"
    4.10  #include "simplescripteditor.h"
    4.11 @@ -117,9 +116,7 @@
    4.12      void editCopy();	
    4.13      void editPaste();	
    4.14      void editCut();	
    4.15 -    void editOpenFindWindow();
    4.16 -	void editFind(QString);
    4.17 -	void editFindChanged();
    4.18 +    void editOpenFindWidget();
    4.19  private:
    4.20  	void openTabs(QStringList);
    4.21  public slots:
    4.22 @@ -248,7 +245,6 @@
    4.23  
    4.24  private:
    4.25  	QTabWidget *tabWidget;
    4.26 -	FindWindow *findWindow;
    4.27  	QProcess *procBrowser;		//FIXME-2 remove this...
    4.28  	qint64 *browserPID;
    4.29  
     5.1 --- a/version.h	Wed Nov 25 10:58:21 2009 +0000
     5.2 +++ b/version.h	Wed Nov 25 15:27:22 2009 +0000
     5.3 @@ -7,7 +7,7 @@
     5.4  #define __VYM_VERSION "1.13.0"
     5.5  //#define __VYM_CODENAME "Codename: RC-1"
     5.6  #define __VYM_CODENAME "Codename: development version, not for production!"
     5.7 -#define __VYM_BUILD_DATE "2009-11-24"
     5.8 +#define __VYM_BUILD_DATE "2009-11-25"
     5.9  
    5.10  
    5.11  bool checkVersion(const QString &);
     6.1 --- a/vym.pro	Wed Nov 25 10:58:21 2009 +0000
     6.2 +++ b/vym.pro	Wed Nov 25 15:27:22 2009 +0000
     6.3 @@ -48,7 +48,7 @@
     6.4  	exports.h \
     6.5  	extrainfodialog.h \
     6.6  	file.h \
     6.7 -	findwindow.h \
     6.8 +	findwidget.h \
     6.9  	flag.h \
    6.10  	flagobj.h \
    6.11  	flagrowobj.h \
    6.12 @@ -113,7 +113,7 @@
    6.13  	exportxhtmldialog.cpp \
    6.14  	extrainfodialog.cpp \
    6.15  	file.cpp \
    6.16 -	findwindow.cpp \
    6.17 +	findwidget.cpp \
    6.18  	flag.cpp \
    6.19  	flagobj.cpp \
    6.20  	flagrow.cpp \
     7.1 --- a/vymmodel.cpp	Wed Nov 25 10:58:21 2009 +0000
     7.2 +++ b/vymmodel.cpp	Wed Nov 25 15:27:22 2009 +0000
     7.3 @@ -1630,6 +1630,11 @@
     7.4  	EOFind=false;
     7.5  }
     7.6  
     7.7 +void VymModel::emitShowFindWidget()
     7.8 +{
     7.9 +	emit (showFindWidget());
    7.10 +}
    7.11 +
    7.12  void VymModel::setScene (QGraphicsScene *s)
    7.13  {
    7.14  	mapScene=s;	
     8.1 --- a/vymmodel.h	Wed Nov 25 10:58:21 2009 +0000
     8.2 +++ b/vymmodel.h	Wed Nov 25 15:27:22 2009 +0000
     8.3 @@ -265,7 +265,11 @@
     8.4  public:
     8.5      BranchItem* findText(QString,bool);		// Find object
     8.6      void findReset();						// Reset Search
     8.7 +	void emitShowFindWidget();				// Tell views to show FindWidget
     8.8 +signals:
     8.9 +	void showFindWidget();				
    8.10  
    8.11 +public:
    8.12  	void setURL(const QString &url);
    8.13  	QString getURL();						// returns URL of selection or ""
    8.14  	QStringList getURLs();					// returns URLs of subtree
     9.1 --- a/vymview.cpp	Wed Nov 25 10:58:21 2009 +0000
     9.2 +++ b/vymview.cpp	Wed Nov 25 15:27:22 2009 +0000
     9.3 @@ -4,6 +4,7 @@
     9.4  using namespace std;
     9.5  
     9.6  #include "branchitem.h"
     9.7 +#include "findwidget.h"
     9.8  #include "mainwindow.h"
     9.9  #include "mapeditor.h"
    9.10  #include "treeeditor.h"
    9.11 @@ -15,6 +16,9 @@
    9.12  {
    9.13  	model=m;
    9.14  
    9.15 +	// Create findWidget
    9.16 +	findWidget=new FindWidget (this);
    9.17 +
    9.18  	// Create TreeView
    9.19  	treeEditor=new TreeEditor (model);
    9.20  	//treeEditor->setModel ((QAbstractItemModel*)model);
    9.21 @@ -34,6 +38,18 @@
    9.22  	mapEditor=model->getMapEditor();
    9.23  	if (!mapEditor) mapEditor=new MapEditor (model);
    9.24  
    9.25 +	// Create Layout 
    9.26 +	QVBoxLayout* mainLayout = new QVBoxLayout (this);
    9.27 +	QSplitter *splitter= new QSplitter;
    9.28 +
    9.29 +	QSizePolicy sizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
    9.30 +    //sizePolicy.setHorizontalStretch(0);
    9.31 +    //sizePolicy.setVerticalStretch(0);
    9.32 +    //sizePolicy.setHeightForWidth(this->sizePolicy().hasHeightForWidth());
    9.33 +    splitter->setSizePolicy(sizePolicy);
    9.34 +	mainLayout->addWidget (splitter);
    9.35 +	mainLayout->addWidget (findWidget);
    9.36 +
    9.37  	// Connect selections
    9.38  
    9.39  		// Proxymodel changed
    9.40 @@ -89,18 +105,27 @@
    9.41  		model, SIGNAL (showSelection() ),
    9.42  		this, SLOT (showSelection() ) );
    9.43  		
    9.44 +	// Find	
    9.45 +	connect (
    9.46 +		model, SIGNAL (showFindWidget() ),
    9.47 +		this, SLOT (showFindWidget() ) );
    9.48 +		
    9.49 +	connect (
    9.50 +		findWidget, SIGNAL (nextButton (QString) ),
    9.51 +		this, SLOT (findNext(QString) ) );
    9.52 +		
    9.53  
    9.54  	mapEditor->setAntiAlias (mainWindow->isAliased());
    9.55  	mapEditor->setSmoothPixmap(mainWindow->hasSmoothPixmapTransform());
    9.56  
    9.57 -	addWidget (treeEditor);
    9.58 -	addWidget (mapEditor);
    9.59 +	splitter->addWidget (treeEditor);
    9.60 +	splitter->addWidget (mapEditor);
    9.61  
    9.62  	// Set geometry
    9.63  	QList <int> widths;
    9.64  	widths<<200;
    9.65  	widths<<600;
    9.66 -	setSizes(widths);
    9.67 +	splitter->setSizes(widths);
    9.68  }
    9.69  
    9.70  VymView::~VymView()
    9.71 @@ -262,3 +287,24 @@
    9.72  	mapEditor->scrollTo ( ix);	// FIXME-3 also called from MapEditor::updateSelection...
    9.73  }
    9.74  
    9.75 +void VymView::showFindWidget()
    9.76 +{
    9.77 +	findWidget->show();
    9.78 +}
    9.79 +
    9.80 +void VymView::findNext (QString s)
    9.81 +{
    9.82 +	bool cs=false;
    9.83 +	BranchItem *bi=model->findText(s, cs);
    9.84 +	if (bi)
    9.85 +	{	
    9.86 +		//statusBar()->message( "Found: " + bi->getHeading(), statusbarTime );
    9.87 +		cout << "VV::Found!\n";
    9.88 +	} else
    9.89 +	{
    9.90 +		cout << "VV::Nothing found!\n";
    9.91 +		//QMessageBox::information( findWindow, tr( "VYM -Information:" ),
    9.92 +		//					   tr("No matches found for \"%1\"").arg(s));
    9.93 +	}	
    9.94 +
    9.95 +}
    10.1 --- a/vymview.h	Wed Nov 25 10:58:21 2009 +0000
    10.2 +++ b/vymview.h	Wed Nov 25 15:27:22 2009 +0000
    10.3 @@ -2,16 +2,16 @@
    10.4  #define VYMVIEW_H
    10.5  
    10.6  #include <QItemSelectionModel>
    10.7 -#include <QSplitter>
    10.8 -
    10.9 +#include <QWidget>
   10.10  
   10.11  class VymModel;
   10.12  class MapEditor;
   10.13  class TreeEditor;
   10.14 +class FindWidget;
   10.15  
   10.16  class QTreeView;
   10.17  
   10.18 -class VymView : public QSplitter 
   10.19 +class VymView:public QWidget
   10.20  {
   10.21  	Q_OBJECT
   10.22  public:
   10.23 @@ -28,6 +28,8 @@
   10.24  	void expandOneLevel ();
   10.25  	void collapseOneLevel ();
   10.26  	void showSelection ();
   10.27 +	void showFindWidget();
   10.28 +	void findNext (QString s);
   10.29  
   10.30  private:
   10.31  	VymModel *model;
   10.32 @@ -35,6 +37,7 @@
   10.33  	QItemSelectionModel *proxySelModel;
   10.34  	QItemSelectionModel *selModel;
   10.35  	MapEditor *mapEditor;
   10.36 +	FindWidget *findWidget;
   10.37  };
   10.38  
   10.39