Added dialog for HTML export. Grouping in Switchboard shortcuts
authorinsilmaril
Thu, 25 Feb 2010 11:03:52 +0000
changeset 82436eb4b8f409e
parent 823 0bba81dde1bc
child 825 1ad892c1a709
Added dialog for HTML export. Grouping in Switchboard shortcuts
exporthtmldialog.cpp
exporthtmldialog.h
exporthtmldialog.ui
exports.cpp
exports.h
exportxhtmldialog.ui
flagrow.cpp
geometry.cpp
geometry.h
main.cpp
mainwindow.cpp
mainwindow.h
mapeditor.cpp
shortcuts.cpp
shortcuts.h
version.h
vym.pro
vymmodel.cpp
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/exporthtmldialog.cpp	Thu Feb 25 11:03:52 2010 +0000
     1.3 @@ -0,0 +1,368 @@
     1.4 +#include "exporthtmldialog.h"
     1.5 +
     1.6 +#include <QFileDialog>
     1.7 +#include <QMessageBox>
     1.8 +#include <QTextStream>
     1.9 +
    1.10 +#include "options.h"
    1.11 +#include "settings.h"
    1.12 +#include "warningdialog.h"
    1.13 +
    1.14 +
    1.15 +extern Options options;
    1.16 +extern QDir vymBaseDir;
    1.17 +extern Settings settings;
    1.18 +extern bool debug;
    1.19 +
    1.20 +ExportHTMLDialog::ExportHTMLDialog(QWidget* parent) : QDialog(parent)
    1.21 +{
    1.22 +    ui.setupUi(this);
    1.23 +
    1.24 +	filepath="";
    1.25 +	settingsChanged=false;
    1.26 +	scriptProc=new Process;
    1.27 +
    1.28 +    // signals and slots connections
    1.29 +    connect(ui.browseExportDirButton, SIGNAL(pressed()), this, SLOT(browseDirectoryPressed()));
    1.30 +    connect(ui.outputButton, SIGNAL(toggled(bool)), this, SLOT(outputButtonPressed(bool)));
    1.31 +    connect(ui.browseCSSButton, SIGNAL(pressed()), this, SLOT(browseCSSPressed()));
    1.32 +    connect(ui.imageButton, SIGNAL(toggled(bool)), this, SLOT(imageButtonPressed(bool)));
    1.33 +    connect(ui.textColorButton, SIGNAL(toggled(bool)), this, SLOT(textcolorButtonPressed(bool)));
    1.34 +    connect(ui.lineEditDir, SIGNAL(textChanged(const QString&)), this, SLOT(dirChanged()));
    1.35 +    connect(ui.lineEditCSS, SIGNAL(textChanged(const QString&)), this, SLOT(cssChanged()));
    1.36 +    connect(ui.saveSettingsInMapButton, SIGNAL(toggled(bool)), this, SLOT(saveSettingsInMapButtonPressed(bool)));
    1.37 +    connect(ui.browsePreExportButton, SIGNAL(pressed()), this, SLOT(browsePreExportButtonPressed()));
    1.38 +    connect(ui.lineEditPreScript, SIGNAL(textChanged(const QString&)), this, SLOT(prescriptChanged()));
    1.39 +    connect(ui.lineEditPostScript, SIGNAL(textChanged(const QString&)), this, SLOT(postscriptChanged()));
    1.40 +    connect(ui.browsePostExportButton, SIGNAL(pressed()), this, SLOT(browsePostExportButtonPressed()));
    1.41 +}	
    1.42 +
    1.43 +
    1.44 +void ExportHTMLDialog::readSettings()
    1.45 +{
    1.46 +
    1.47 +	dir=settings.readLocalEntry (filepath,"/export/html/exportDir",vymBaseDir.currentDirPath() );
    1.48 +	ui.lineEditDir->setText(dir);
    1.49 +	
    1.50 +    if ( settings.readLocalEntry (filepath,"/export/html/useImage","yes")=="yes")
    1.51 +		useImage=true;
    1.52 +	else	
    1.53 +		useImage=false;
    1.54 +	ui.imageButton->setChecked(useImage);
    1.55 +		
    1.56 +	if ( settings.readLocalEntry (filepath,"/export/html/useTextColor","no")=="yes")
    1.57 +		useTextColor=true;
    1.58 +	else	
    1.59 +		useTextColor=false;
    1.60 +	ui.textColorButton->setChecked(useTextColor);
    1.61 +	
    1.62 +/* TODO this was used in old html export, is not yet in new stylesheet
    1.63 +	if ( settings.readEntry ("/export/html/useHeading","no")=="yes")
    1.64 +		useHeading=true;
    1.65 +	else	
    1.66 +		useHeading=false;
    1.67 +	checkBox4_2->setChecked(useHeading);
    1.68 +*/		
    1.69 +
    1.70 +	if ( settings.readLocalEntry (filepath,"/export/html/saveSettingsInMap","no")=="yes")
    1.71 +		saveSettingsInMap=true;
    1.72 +	else	
    1.73 +		saveSettingsInMap=false;
    1.74 +	ui.saveSettingsInMapButton->setChecked(saveSettingsInMap);
    1.75 +
    1.76 +	if ( settings.readEntry ("/export/html/showOutput","no")=="yes")
    1.77 +		showOutput=true;
    1.78 +	else	
    1.79 +		showOutput=false;
    1.80 +	ui.outputButton->setChecked(showOutput);
    1.81 +
    1.82 +	// For testing better use local styles
    1.83 +    const QString defcss(vymBaseDir.path() + "/styles/vym.css");
    1.84 +	if (options.isOn ("local"))
    1.85 +	{
    1.86 +		css=defcss;
    1.87 +	} else
    1.88 +	{
    1.89 +		css=settings.readLocalEntry 
    1.90 +			(filepath,"/export/html/css",defcss);	
    1.91 +	}
    1.92 +	ui.lineEditCSS->setText(css);
    1.93 +	
    1.94 +	prescript=settings.readLocalEntry
    1.95 +		(filepath,"/export/html/prescript","");
    1.96 +	ui.lineEditPreScript->setText (prescript);	
    1.97 +	
    1.98 +	postscript=settings.readLocalEntry
    1.99 +		(filepath,"/export/html/postscript","");
   1.100 +	ui.lineEditPostScript->setText (postscript);	
   1.101 +
   1.102 +	if (!prescript.isEmpty() || !postscript.isEmpty())
   1.103 +	{
   1.104 +		QMessageBox::warning( 0, tr( "Warning" ),tr(
   1.105 +		"The settings saved in the map "
   1.106 +		"would like to run scripts:\n\n"
   1.107 +		"%1\n\n"
   1.108 +		"Please check, if you really\n"
   1.109 +		"want to allow this in your system!").arg(prescript+"  "+postscript));
   1.110 +		
   1.111 +	}
   1.112 +}
   1.113 +
   1.114 +void ExportHTMLDialog::setDir(const QString &d)
   1.115 +{
   1.116 +	dir=d;
   1.117 +	if (dir.right(1)!="/") dir+="/";
   1.118 +}
   1.119 +
   1.120 +void ExportHTMLDialog::dirChanged()
   1.121 +{
   1.122 +	setDir (ui.lineEditDir->text());
   1.123 +	settingsChanged=true;
   1.124 +}
   1.125 +
   1.126 +void ExportHTMLDialog::browseDirectoryPressed()
   1.127 +{
   1.128 +   	QFileDialog fd( this);
   1.129 +	fd.setMode (QFileDialog::DirectoryOnly);
   1.130 +	fd.setCaption(tr("VYM - Export HTML to directory"));
   1.131 +	fd.setModal (true);
   1.132 +	fd.setDirectory (QDir::current());
   1.133 +	fd.show();
   1.134 +
   1.135 +	if ( fd.exec() == QDialog::Accepted )
   1.136 +	{
   1.137 +		QDir dir=fd.selectedFile();
   1.138 +		ui.lineEditDir->setText (dir.path() );
   1.139 +		settingsChanged=true;
   1.140 +	}
   1.141 +}
   1.142 +
   1.143 +void ExportHTMLDialog::imageButtonPressed(bool b)
   1.144 +{
   1.145 +	useImage=b;
   1.146 +	settingsChanged=true;
   1.147 +}
   1.148 +
   1.149 +void ExportHTMLDialog::textcolorButtonPressed(bool b)
   1.150 +{
   1.151 +	useTextColor=b;	
   1.152 +	settingsChanged=true;
   1.153 +}
   1.154 +
   1.155 +void ExportHTMLDialog::saveSettingsInMapButtonPressed(bool b)
   1.156 +{
   1.157 +	saveSettingsInMap=b;	
   1.158 +	settingsChanged=true;
   1.159 +}
   1.160 +
   1.161 +void ExportHTMLDialog::warningsButtonPressed(bool b)
   1.162 +{
   1.163 +	showWarnings=b;
   1.164 +	settingsChanged=true;
   1.165 +}
   1.166 +
   1.167 +
   1.168 +void ExportHTMLDialog::outputButtonPressed(bool b)
   1.169 +{
   1.170 +	showOutput=b;
   1.171 +	settingsChanged=true;
   1.172 +}
   1.173 +
   1.174 +void ExportHTMLDialog::cssChanged()
   1.175 +{
   1.176 +	css=ui.lineEditCSS->text();
   1.177 +	settingsChanged=true;
   1.178 +}
   1.179 +
   1.180 +QString ExportHTMLDialog::getCSSPath()
   1.181 +{
   1.182 +	return css;
   1.183 +}
   1.184 +
   1.185 +void ExportHTMLDialog::browseCSSPressed()
   1.186 +{
   1.187 +   	QFileDialog fd( this);
   1.188 +	fd.setModal (true);
   1.189 +	fd.setFilter ("Cascading Stylesheet (*.css)");
   1.190 +	fd.setDirectory (QDir::current());
   1.191 +	fd.show();
   1.192 +
   1.193 +	if ( fd.exec() == QDialog::Accepted )
   1.194 +	{
   1.195 +		css=fd.selectedFile();
   1.196 +		ui.lineEditCSS->setText (css );
   1.197 +		settingsChanged=true;
   1.198 +	}
   1.199 +}
   1.200 +
   1.201 +void ExportHTMLDialog::prescriptChanged()
   1.202 +{
   1.203 +	prescript=ui.lineEditPreScript->text();
   1.204 +	settingsChanged=true;
   1.205 +}
   1.206 +
   1.207 +void ExportHTMLDialog::postscriptChanged()
   1.208 +{
   1.209 +	postscript=ui.lineEditPostScript->text();
   1.210 +	settingsChanged=true;
   1.211 +}
   1.212 +
   1.213 +void ExportHTMLDialog::browsePreExportButtonPressed()
   1.214 +{
   1.215 +	QFileDialog fd( this);
   1.216 +	fd.setModal (true);
   1.217 +	fd.setFilter ("Scripts (*.sh *.pl *.py *.php)");
   1.218 +	fd.setDirectory (QDir::current());
   1.219 +	fd.show();
   1.220 +
   1.221 +	if ( fd.exec() == QDialog::Accepted )
   1.222 +	{
   1.223 +		prescript=fd.selectedFile();
   1.224 +		ui.lineEditPreScript->setText (prescript );
   1.225 +		settingsChanged=true;
   1.226 +	}
   1.227 +
   1.228 +}
   1.229 +
   1.230 +void ExportHTMLDialog::browsePostExportButtonPressed()
   1.231 +{
   1.232 +	QFileDialog fd( this);
   1.233 +	fd.setModal (true);
   1.234 +	fd.setFilter ("Scripts (*.sh *.pl *.py *.php)");
   1.235 +	fd.setDirectory (QDir::current());
   1.236 +	fd.show();
   1.237 +
   1.238 +	if ( fd.exec() == QDialog::Accepted )
   1.239 +	{
   1.240 +		postscript=fd.selectedFile();
   1.241 +		ui.lineEditPostScript->setText (postscript );
   1.242 +		settingsChanged=true;
   1.243 +	}
   1.244 +}
   1.245 +
   1.246 +
   1.247 +void ExportHTMLDialog::doExport (const QString &mapname)
   1.248 +{
   1.249 +
   1.250 +	// Save options to settings file 
   1.251 +	// (but don't save at destructor, which
   1.252 +	// is called for "cancel", too)
   1.253 +	settings.setLocalEntry (filepath,"/export/html/exportDir",dir);
   1.254 +	settings.setLocalEntry (filepath,"/export/html/prescript",prescript);
   1.255 +	settings.setLocalEntry (filepath,"/export/html/postscript",postscript);
   1.256 +
   1.257 +    if (useImage)
   1.258 +		settings.setLocalEntry (filepath,"/export/html/useImage","yes");
   1.259 +    else
   1.260 +		settings.setLocalEntry (filepath,"/export/html/useImage","no");	
   1.261 +	
   1.262 +  if (useTextColor)
   1.263 +		settings.setLocalEntry (filepath,"/export/html/useTextColor","yes");
   1.264 +    else
   1.265 +		settings.setLocalEntry (filepath,"/export/html/useTextColor","no");	
   1.266 +	
   1.267 +   if (showWarnings)
   1.268 +		settings.writeEntry ("/export/html/showWarnings","yes");
   1.269 +    else
   1.270 +		settings.writeEntry ("/export/html/showWarnings","no");	
   1.271 +			
   1.272 +	if (showOutput)
   1.273 +		settings.writeEntry ("/export/html/showOutput","yes");
   1.274 +	else
   1.275 +		settings.writeEntry ("/export/html/showOutput","no");	
   1.276 +
   1.277 +	QString ipath;	
   1.278 +	ipath=vymBaseDir.path()+"/flags/flag-url-16x16.png";
   1.279 +	if (!options.isOn ("local"))
   1.280 +	{
   1.281 +		settings.setLocalEntry 
   1.282 +			(filepath,"/export/html/css",css);	
   1.283 +	}
   1.284 +
   1.285 +	if (!saveSettingsInMap)
   1.286 +		settings.clearLocal("/export/html");
   1.287 +	else	
   1.288 +		settings.setLocalEntry 
   1.289 +			(filepath,"/export/html/saveSettingsInMap","yes");
   1.290 +
   1.291 +	// Provide a smaller URL-icon to improve Layout //FIXME-1
   1.292 +	QPixmap pm;
   1.293 +	if (!pm.load(ipath,"PNG") )
   1.294 +		QMessageBox::warning( 0, tr( "Warning" ),tr("Could not open %1").arg(ipath));
   1.295 +		
   1.296 +		
   1.297 +	if(!pm.save (dir + "flags/flag-url-16x16.png","PNG"))
   1.298 +		QMessageBox::warning( 0, tr( "Warning" ),tr("Could not write %1").arg(ipath));
   1.299 +
   1.300 +	if (!prescript.isEmpty()) runScript (prescript,dir+mapname+".xml");
   1.301 +	
   1.302 +	/* FIXME-1
   1.303 +	if (useImage)
   1.304 +		p.addStringParam ("imagemap","images/"+mapname+".png");
   1.305 +	if (useTextColor)
   1.306 +		p.addStringParam ("use.textcolor","1");
   1.307 +	p.addStringParam ("mapname",mapname+".vym");
   1.308 +	
   1.309 +	p.setOutputFile (dir+mapname+".html");
   1.310 +	p.setInputFile (dir+mapname+".xml");
   1.311 +	p.process();
   1.312 +	*/
   1.313 +
   1.314 +	if (!postscript.isEmpty()) runScript (postscript,dir+mapname+".html");
   1.315 +
   1.316 +}
   1.317 +
   1.318 +void ExportHTMLDialog::setFilePath(const QString &s)
   1.319 +{
   1.320 +	filepath=s;
   1.321 +}
   1.322 +
   1.323 +void ExportHTMLDialog::setMapName(const QString &s)
   1.324 +{
   1.325 +	mapname=s;
   1.326 +}
   1.327 +
   1.328 +QString ExportHTMLDialog::getDir()
   1.329 +{
   1.330 +	return dir;
   1.331 +}
   1.332 +
   1.333 +bool ExportHTMLDialog::warnings()
   1.334 +{
   1.335 +	return showWarnings;
   1.336 +}
   1.337 +
   1.338 +bool ExportHTMLDialog::hasChanged()
   1.339 +{
   1.340 +	return settingsChanged;
   1.341 +}
   1.342 +
   1.343 +
   1.344 +void ExportHTMLDialog::runScript(QString spath, QString fpath)
   1.345 +{
   1.346 +	spath.replace ("%f",fpath);
   1.347 +	QStringList args=QStringList::split (' ',spath,false);
   1.348 +		
   1.349 +	//FIXME-1 p.addOutput ("vym is executing: \n" + spath+" "+args.join(" ") );	
   1.350 +	scriptProc->start (spath,args);
   1.351 +	if (!scriptProc->waitForStarted() )
   1.352 +	{
   1.353 +		QMessageBox::critical( 0, tr( "Critical Error" ),
   1.354 +					   tr("Could not start %1").arg(spath) );
   1.355 +	} else
   1.356 +	{
   1.357 +		if (!scriptProc->waitForFinished())
   1.358 +			QMessageBox::critical( 0, tr( "Critical Error" ),
   1.359 +			   tr("%1 didn't exit normally").arg(spath) +
   1.360 +			   scriptProc->getErrout() );
   1.361 +		else
   1.362 +			if (scriptProc->exitStatus()>0) showOutput=true;
   1.363 +			
   1.364 +	}	
   1.365 +	/* FIXME-1
   1.366 +	p.addOutput ("\n");
   1.367 +	p.addOutput (scriptProc->getErrout());
   1.368 +	p.addOutput (scriptProc->getStdout());
   1.369 +	*/
   1.370 +}
   1.371 +
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/exporthtmldialog.h	Thu Feb 25 11:03:52 2010 +0000
     2.3 @@ -0,0 +1,66 @@
     2.4 +#ifndef EXPORTHTMLDIALOG_H
     2.5 +#define EXPORTHTMLDIALOG_H
     2.6 +
     2.7 +#include "ui_exporthtmldialog.h"
     2.8 +
     2.9 +/*! \brief Dialog to export a map as HTML document
    2.10 +
    2.11 +This is an overloaded QDialog with various settings needed to call
    2.12 +convert the vym.xml to a HTML document. 
    2.13 +*/
    2.14 +
    2.15 +class ExportHTMLDialog:public QDialog
    2.16 +{
    2.17 +	Q_OBJECT
    2.18 +public:
    2.19 +    ExportHTMLDialog(QWidget* parent = 0);
    2.20 +
    2.21 +    virtual QString getDir();
    2.22 +    virtual bool warnings();
    2.23 +    virtual bool hasChanged();
    2.24 +
    2.25 +public slots:
    2.26 +    virtual void readSettings();
    2.27 +    virtual void setDir (const QString&);
    2.28 +    virtual void dirChanged();
    2.29 +    virtual void browseDirectoryPressed();
    2.30 +    virtual void imageButtonPressed( bool b );
    2.31 +    virtual void textcolorButtonPressed( bool b );
    2.32 +    virtual void saveSettingsInMapButtonPressed( bool b );
    2.33 +    virtual void warningsButtonPressed( bool b );
    2.34 +    virtual void outputButtonPressed( bool b );
    2.35 +    virtual void cssChanged();
    2.36 +	virtual QString getCSSPath();
    2.37 +    virtual void browseCSSPressed();
    2.38 +    virtual void prescriptChanged();
    2.39 +    virtual void postscriptChanged();
    2.40 +    virtual void browsePreExportButtonPressed();
    2.41 +    virtual void browsePostExportButtonPressed();
    2.42 +    virtual void doExport( const QString & mapname );
    2.43 +    virtual void setFilePath( const QString & s );
    2.44 +    virtual void setMapName( const QString & s );
    2.45 +
    2.46 +protected:
    2.47 +    bool useTextColor;
    2.48 +    bool showWarnings;
    2.49 +    QString css;
    2.50 +    bool useImage;
    2.51 +    bool showOutput;
    2.52 +    QString dir;
    2.53 +    QString filepath;
    2.54 +    QString prescript;
    2.55 +    QString postscript;
    2.56 +    bool settingsChanged;
    2.57 +    QString mapname;
    2.58 +    bool saveSettingsInMap;
    2.59 +    Process *scriptProc;
    2.60 +
    2.61 +private:
    2.62 +	Ui::ExportHTMLDialog ui;
    2.63 +    void init();
    2.64 +    void destroy();
    2.65 +    void runScript( QString spath, QString fpath );
    2.66 +
    2.67 +};
    2.68 +
    2.69 +#endif // EXPORTHTMLDIALOG_H
     3.1 --- a/exporthtmldialog.ui	Fri Feb 19 13:47:03 2010 +0000
     3.2 +++ b/exporthtmldialog.ui	Thu Feb 25 11:03:52 2010 +0000
     3.3 @@ -1,321 +1,457 @@
     3.4 -<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
     3.5 -<class>ExportHTMLDialog</class>
     3.6 -<author>Uwe Drechsel</author>
     3.7 -<widget class="QDialog">
     3.8 -    <property name="name">
     3.9 -        <cstring>ExportHTMLDialog</cstring>
    3.10 -    </property>
    3.11 -    <property name="geometry">
    3.12 -        <rect>
    3.13 -            <x>0</x>
    3.14 -            <y>0</y>
    3.15 -            <width>375</width>
    3.16 -            <height>346</height>
    3.17 -        </rect>
    3.18 -    </property>
    3.19 -    <property name="caption">
    3.20 -        <string>Export HTML</string>
    3.21 -    </property>
    3.22 -    <property name="modal">
    3.23 -        <bool>false</bool>
    3.24 -    </property>
    3.25 -    <vbox>
    3.26 -        <property name="name">
    3.27 -            <cstring>unnamed</cstring>
    3.28 +<?xml version="1.0" encoding="UTF-8"?>
    3.29 +<ui version="4.0">
    3.30 + <class>ExportHTMLDialog</class>
    3.31 + <widget class="QDialog" name="ExportHTMLDialog">
    3.32 +  <property name="geometry">
    3.33 +   <rect>
    3.34 +    <x>0</x>
    3.35 +    <y>0</y>
    3.36 +    <width>684</width>
    3.37 +    <height>471</height>
    3.38 +   </rect>
    3.39 +  </property>
    3.40 +  <property name="sizePolicy">
    3.41 +   <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
    3.42 +    <horstretch>0</horstretch>
    3.43 +    <verstretch>0</verstretch>
    3.44 +   </sizepolicy>
    3.45 +  </property>
    3.46 +  <property name="minimumSize">
    3.47 +   <size>
    3.48 +    <width>0</width>
    3.49 +    <height>130</height>
    3.50 +   </size>
    3.51 +  </property>
    3.52 +  <property name="windowTitle">
    3.53 +   <string>Export HTML</string>
    3.54 +  </property>
    3.55 +  <layout class="QVBoxLayout" name="verticalLayout_2">
    3.56 +   <item>
    3.57 +    <layout class="QHBoxLayout">
    3.58 +     <property name="spacing">
    3.59 +      <number>6</number>
    3.60 +     </property>
    3.61 +     <property name="margin">
    3.62 +      <number>0</number>
    3.63 +     </property>
    3.64 +     <item>
    3.65 +      <widget class="QLabel" name="textLabel1">
    3.66 +       <property name="sizePolicy">
    3.67 +        <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
    3.68 +         <horstretch>0</horstretch>
    3.69 +         <verstretch>0</verstretch>
    3.70 +        </sizepolicy>
    3.71 +       </property>
    3.72 +       <property name="text">
    3.73 +        <string>Export to directory:</string>
    3.74 +       </property>
    3.75 +      </widget>
    3.76 +     </item>
    3.77 +     <item>
    3.78 +      <widget class="QLineEdit" name="lineEditDir">
    3.79 +       <property name="sizePolicy">
    3.80 +        <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
    3.81 +         <horstretch>0</horstretch>
    3.82 +         <verstretch>0</verstretch>
    3.83 +        </sizepolicy>
    3.84 +       </property>
    3.85 +      </widget>
    3.86 +     </item>
    3.87 +     <item>
    3.88 +      <widget class="QPushButton" name="browseExportDirButton">
    3.89 +       <property name="sizePolicy">
    3.90 +        <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
    3.91 +         <horstretch>0</horstretch>
    3.92 +         <verstretch>0</verstretch>
    3.93 +        </sizepolicy>
    3.94 +       </property>
    3.95 +       <property name="text">
    3.96 +        <string>Browse</string>
    3.97 +       </property>
    3.98 +      </widget>
    3.99 +     </item>
   3.100 +    </layout>
   3.101 +   </item>
   3.102 +   <item>
   3.103 +    <widget class="QGroupBox" name="groupBox">
   3.104 +     <property name="sizePolicy">
   3.105 +      <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
   3.106 +       <horstretch>0</horstretch>
   3.107 +       <verstretch>0</verstretch>
   3.108 +      </sizepolicy>
   3.109 +     </property>
   3.110 +     <property name="minimumSize">
   3.111 +      <size>
   3.112 +       <width>0</width>
   3.113 +       <height>200</height>
   3.114 +      </size>
   3.115 +     </property>
   3.116 +     <property name="title">
   3.117 +      <string>Options</string>
   3.118 +     </property>
   3.119 +     <widget class="QWidget" name="">
   3.120 +      <property name="geometry">
   3.121 +       <rect>
   3.122 +        <x>20</x>
   3.123 +        <y>20</y>
   3.124 +        <width>220</width>
   3.125 +        <height>106</height>
   3.126 +       </rect>
   3.127 +      </property>
   3.128 +      <layout class="QVBoxLayout" name="verticalLayout">
   3.129 +       <item>
   3.130 +        <widget class="QCheckBox" name="imageButton">
   3.131 +         <property name="sizePolicy">
   3.132 +          <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
   3.133 +           <horstretch>0</horstretch>
   3.134 +           <verstretch>0</verstretch>
   3.135 +          </sizepolicy>
   3.136 +         </property>
   3.137 +         <property name="text">
   3.138 +          <string>Include image</string>
   3.139 +         </property>
   3.140 +        </widget>
   3.141 +       </item>
   3.142 +       <item>
   3.143 +        <widget class="QCheckBox" name="textColorButton">
   3.144 +         <property name="sizePolicy">
   3.145 +          <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
   3.146 +           <horstretch>0</horstretch>
   3.147 +           <verstretch>0</verstretch>
   3.148 +          </sizepolicy>
   3.149 +         </property>
   3.150 +         <property name="text">
   3.151 +          <string>Colored headings in text</string>
   3.152 +         </property>
   3.153 +        </widget>
   3.154 +       </item>
   3.155 +       <item>
   3.156 +        <widget class="QCheckBox" name="saveSettingsInMapButton">
   3.157 +         <property name="sizePolicy">
   3.158 +          <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
   3.159 +           <horstretch>0</horstretch>
   3.160 +           <verstretch>0</verstretch>
   3.161 +          </sizepolicy>
   3.162 +         </property>
   3.163 +         <property name="text">
   3.164 +          <string>Save settings in map</string>
   3.165 +         </property>
   3.166 +        </widget>
   3.167 +       </item>
   3.168 +       <item>
   3.169 +        <widget class="QCheckBox" name="outputButton">
   3.170 +         <property name="sizePolicy">
   3.171 +          <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
   3.172 +           <horstretch>0</horstretch>
   3.173 +           <verstretch>0</verstretch>
   3.174 +          </sizepolicy>
   3.175 +         </property>
   3.176 +         <property name="text">
   3.177 +          <string>show output of external scripts</string>
   3.178 +         </property>
   3.179 +        </widget>
   3.180 +       </item>
   3.181 +      </layout>
   3.182 +     </widget>
   3.183 +    </widget>
   3.184 +   </item>
   3.185 +   <item>
   3.186 +    <widget class="Q3GroupBox" name="groupBox2">
   3.187 +     <property name="sizePolicy">
   3.188 +      <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
   3.189 +       <horstretch>0</horstretch>
   3.190 +       <verstretch>0</verstretch>
   3.191 +      </sizepolicy>
   3.192 +     </property>
   3.193 +     <property name="title">
   3.194 +      <string>Stylesheets</string>
   3.195 +     </property>
   3.196 +     <property name="orientation">
   3.197 +      <enum>Qt::Vertical</enum>
   3.198 +     </property>
   3.199 +     <layout class="QGridLayout">
   3.200 +      <property name="margin">
   3.201 +       <number>11</number>
   3.202 +      </property>
   3.203 +      <property name="spacing">
   3.204 +       <number>6</number>
   3.205 +      </property>
   3.206 +      <item row="0" column="0">
   3.207 +       <layout class="QHBoxLayout">
   3.208 +        <property name="spacing">
   3.209 +         <number>6</number>
   3.210          </property>
   3.211 -        <widget class="QLayoutWidget">
   3.212 -            <property name="name">
   3.213 -                <cstring>layout33</cstring>
   3.214 -            </property>
   3.215 -            <hbox>
   3.216 -                <property name="name">
   3.217 -                    <cstring>unnamed</cstring>
   3.218 -                </property>
   3.219 -                <widget class="QLabel">
   3.220 -                    <property name="name">
   3.221 -                        <cstring>textLabel1</cstring>
   3.222 -                    </property>
   3.223 -                    <property name="text">
   3.224 -                        <string>Directory:</string>
   3.225 -                    </property>
   3.226 -                </widget>
   3.227 -                <widget class="QLineEdit">
   3.228 -                    <property name="name">
   3.229 -                        <cstring>lineEdit1</cstring>
   3.230 -                    </property>
   3.231 -                </widget>
   3.232 -                <widget class="QPushButton">
   3.233 -                    <property name="name">
   3.234 -                        <cstring>browseButton</cstring>
   3.235 -                    </property>
   3.236 -                    <property name="text">
   3.237 -                        <string>Browse</string>
   3.238 -                    </property>
   3.239 -                </widget>
   3.240 -            </hbox>
   3.241 -        </widget>
   3.242 -        <widget class="QButtonGroup">
   3.243 -            <property name="name">
   3.244 -                <cstring>buttonGroup2</cstring>
   3.245 -            </property>
   3.246 -            <property name="sizePolicy">
   3.247 -                <sizepolicy>
   3.248 -                    <hsizetype>3</hsizetype>
   3.249 -                    <vsizetype>5</vsizetype>
   3.250 -                    <horstretch>0</horstretch>
   3.251 -                    <verstretch>0</verstretch>
   3.252 -                </sizepolicy>
   3.253 -            </property>
   3.254 -            <property name="minimumSize">
   3.255 -                <size>
   3.256 -                    <width>0</width>
   3.257 -                    <height>230</height>
   3.258 -                </size>
   3.259 -            </property>
   3.260 -            <property name="title">
   3.261 -                <string>Options</string>
   3.262 -            </property>
   3.263 -            <vbox>
   3.264 -                <property name="name">
   3.265 -                    <cstring>unnamed</cstring>
   3.266 -                </property>
   3.267 -                <widget class="QCheckBox">
   3.268 -                    <property name="name">
   3.269 -                        <cstring>checkBox4</cstring>
   3.270 -                    </property>
   3.271 -                    <property name="text">
   3.272 -                        <string>Include image of map</string>
   3.273 -                    </property>
   3.274 -                </widget>
   3.275 -                <widget class="QCheckBox">
   3.276 -                    <property name="name">
   3.277 -                        <cstring>checkBox5_2</cstring>
   3.278 -                    </property>
   3.279 -                    <property name="text">
   3.280 -                        <string>create image only</string>
   3.281 -                    </property>
   3.282 -                </widget>
   3.283 -                <widget class="QCheckBox">
   3.284 -                    <property name="name">
   3.285 -                        <cstring>checkBox5</cstring>
   3.286 -                    </property>
   3.287 -                    <property name="text">
   3.288 -                        <string>use WIKI style</string>
   3.289 -                    </property>
   3.290 -                </widget>
   3.291 -                <widget class="QCheckBox">
   3.292 -                    <property name="name">
   3.293 -                        <cstring>checkBox4_2</cstring>
   3.294 -                    </property>
   3.295 -                    <property name="text">
   3.296 -                        <string>use heading for URLs (instead of link target)</string>
   3.297 -                    </property>
   3.298 -                </widget>
   3.299 -                <widget class="QCheckBox">
   3.300 -                    <property name="name">
   3.301 -                        <cstring>checkBox6</cstring>
   3.302 -                    </property>
   3.303 -                    <property name="text">
   3.304 -                        <string>use image of earth to mark URLs in text</string>
   3.305 -                    </property>
   3.306 -                </widget>
   3.307 -                <widget class="QCheckBox">
   3.308 -                    <property name="name">
   3.309 -                        <cstring>checkBox7</cstring>
   3.310 -                    </property>
   3.311 -                    <property name="text">
   3.312 -                        <string>use default CSS file</string>
   3.313 -                    </property>
   3.314 -                </widget>
   3.315 -                <widget class="QCheckBox">
   3.316 -                    <property name="name">
   3.317 -                        <cstring>checkBox3</cstring>
   3.318 -                    </property>
   3.319 -                    <property name="sizePolicy">
   3.320 -                        <sizepolicy>
   3.321 -                            <hsizetype>1</hsizetype>
   3.322 -                            <vsizetype>0</vsizetype>
   3.323 -                            <horstretch>0</horstretch>
   3.324 -                            <verstretch>0</verstretch>
   3.325 -                        </sizepolicy>
   3.326 -                    </property>
   3.327 -                    <property name="text">
   3.328 -                        <string>show output of external scripts</string>
   3.329 -                    </property>
   3.330 -                </widget>
   3.331 -            </vbox>
   3.332 -        </widget>
   3.333 -        <spacer>
   3.334 -            <property name="name">
   3.335 -                <cstring>spacer6</cstring>
   3.336 -            </property>
   3.337 -            <property name="orientation">
   3.338 -                <enum>Vertical</enum>
   3.339 -            </property>
   3.340 -            <property name="sizeType">
   3.341 -                <enum>Expanding</enum>
   3.342 -            </property>
   3.343 -            <property name="sizeHint">
   3.344 -                <size>
   3.345 -                    <width>21</width>
   3.346 -                    <height>60</height>
   3.347 -                </size>
   3.348 -            </property>
   3.349 -        </spacer>
   3.350 -        <widget class="QLayoutWidget">
   3.351 -            <property name="name">
   3.352 -                <cstring>layout17</cstring>
   3.353 -            </property>
   3.354 -            <hbox>
   3.355 -                <property name="name">
   3.356 -                    <cstring>unnamed</cstring>
   3.357 -                </property>
   3.358 -                <spacer>
   3.359 -                    <property name="name">
   3.360 -                        <cstring>spacer5</cstring>
   3.361 -                    </property>
   3.362 -                    <property name="orientation">
   3.363 -                        <enum>Horizontal</enum>
   3.364 -                    </property>
   3.365 -                    <property name="sizeType">
   3.366 -                        <enum>Expanding</enum>
   3.367 -                    </property>
   3.368 -                    <property name="sizeHint">
   3.369 -                        <size>
   3.370 -                            <width>61</width>
   3.371 -                            <height>21</height>
   3.372 -                        </size>
   3.373 -                    </property>
   3.374 -                </spacer>
   3.375 -                <widget class="QPushButton">
   3.376 -                    <property name="name">
   3.377 -                        <cstring>pushButton4</cstring>
   3.378 -                    </property>
   3.379 -                    <property name="text">
   3.380 -                        <string>Export</string>
   3.381 -                    </property>
   3.382 -                    <property name="default">
   3.383 -                        <bool>true</bool>
   3.384 -                    </property>
   3.385 -                </widget>
   3.386 -                <widget class="QPushButton">
   3.387 -                    <property name="name">
   3.388 -                        <cstring>pushButton5</cstring>
   3.389 -                    </property>
   3.390 -                    <property name="text">
   3.391 -                        <string>Cancel</string>
   3.392 -                    </property>
   3.393 -                </widget>
   3.394 -            </hbox>
   3.395 -        </widget>
   3.396 -    </vbox>
   3.397 -</widget>
   3.398 -<connections>
   3.399 -    <connection>
   3.400 -        <sender>pushButton5</sender>
   3.401 -        <signal>pressed()</signal>
   3.402 -        <receiver>ExportHTMLDialog</receiver>
   3.403 -        <slot>reject()</slot>
   3.404 -    </connection>
   3.405 -    <connection>
   3.406 -        <sender>pushButton4</sender>
   3.407 -        <signal>clicked()</signal>
   3.408 -        <receiver>ExportHTMLDialog</receiver>
   3.409 -        <slot>accept()</slot>
   3.410 -    </connection>
   3.411 -    <connection>
   3.412 -        <sender>browseButton</sender>
   3.413 -        <signal>pressed()</signal>
   3.414 -        <receiver>ExportHTMLDialog</receiver>
   3.415 -        <slot>browseDirectory()</slot>
   3.416 -    </connection>
   3.417 -    <connection>
   3.418 -        <sender>checkBox4</sender>
   3.419 -        <signal>toggled(bool)</signal>
   3.420 -        <receiver>ExportHTMLDialog</receiver>
   3.421 -        <slot>includeImage(bool)</slot>
   3.422 -    </connection>
   3.423 -    <connection>
   3.424 -        <sender>checkBox5</sender>
   3.425 -        <signal>toggled(bool)</signal>
   3.426 -        <receiver>ExportHTMLDialog</receiver>
   3.427 -        <slot>useWIKIpressed(bool)</slot>
   3.428 -    </connection>
   3.429 -    <connection>
   3.430 -        <sender>lineEdit1</sender>
   3.431 -        <signal>textChanged(const QString&amp;)</signal>
   3.432 -        <receiver>ExportHTMLDialog</receiver>
   3.433 -        <slot>dirChanged()</slot>
   3.434 -    </connection>
   3.435 -    <connection>
   3.436 -        <sender>checkBox3</sender>
   3.437 -        <signal>toggled(bool)</signal>
   3.438 -        <receiver>ExportHTMLDialog</receiver>
   3.439 -        <slot>showOut(bool)</slot>
   3.440 -    </connection>
   3.441 -    <connection>
   3.442 -        <sender>checkBox4_2</sender>
   3.443 -        <signal>toggled(bool)</signal>
   3.444 -        <receiver>ExportHTMLDialog</receiver>
   3.445 -        <slot>useHeadingPressed(bool)</slot>
   3.446 -    </connection>
   3.447 -    <connection>
   3.448 -        <sender>checkBox5_2</sender>
   3.449 -        <signal>toggled(bool)</signal>
   3.450 -        <receiver>ExportHTMLDialog</receiver>
   3.451 -        <slot>imgOnly(bool)</slot>
   3.452 -    </connection>
   3.453 -    <connection>
   3.454 -        <sender>checkBox6</sender>
   3.455 -        <signal>toggled(bool)</signal>
   3.456 -        <receiver>ExportHTMLDialog</receiver>
   3.457 -        <slot>useURLImagePressed(bool)</slot>
   3.458 -    </connection>
   3.459 -</connections>
   3.460 -<includes>
   3.461 -    <include location="local" impldecl="in declaration">showtextdialog.h</include>
   3.462 -    <include location="global" impldecl="in declaration">qprocess.h</include>
   3.463 -    <include location="global" impldecl="in implementation">iostream</include>
   3.464 -    <include location="local" impldecl="in implementation">settings.h</include>
   3.465 -    <include location="global" impldecl="in implementation">qfiledialog.h</include>
   3.466 -    <include location="global" impldecl="in implementation">qmessagebox.h</include>
   3.467 -    <include location="local" impldecl="in implementation">file.h</include>
   3.468 -    <include location="local" impldecl="in implementation">icons/flag-url.xpm</include>
   3.469 -    <include location="local" impldecl="in implementation">exporthtmldialog.ui.h</include>
   3.470 -</includes>
   3.471 -<variables>
   3.472 -    <variable>QString css;</variable>
   3.473 -    <variable>QString xsl;</variable>
   3.474 -    <variable>QString scriptpath;</variable>
   3.475 -    <variable>QString stylepath;</variable>
   3.476 -    <variable>QString dir;</variable>
   3.477 -    <variable>bool image;</variable>
   3.478 -    <variable>bool wikistyle;</variable>
   3.479 -    <variable>QString script;</variable>
   3.480 -    <variable>bool showOutput;</variable>
   3.481 -    <variable>QProcess *proc;</variable>
   3.482 -    <variable>ShowTextDialog *dia;</variable>
   3.483 -    <variable>bool imageOnly;</variable>
   3.484 -    <variable>bool useHeading;</variable>
   3.485 -    <variable>bool useURLImage;</variable>
   3.486 -</variables>
   3.487 -<slots>
   3.488 -    <slot>browseDirectory()</slot>
   3.489 -    <slot>useWIKIpressed( bool b )</slot>
   3.490 -    <slot>includeImage( bool b )</slot>
   3.491 -    <slot>imgOnly( bool b )</slot>
   3.492 -    <slot>useHeadingPressed( bool b )</slot>
   3.493 -    <slot>useURLImagePressed( bool b )</slot>
   3.494 -    <slot>showOut( bool b )</slot>
   3.495 -    <slot>dirChanged()</slot>
   3.496 -    <slot>doExport( const QString &amp; mapname )</slot>
   3.497 -    <slot returnType="QString">getDir()</slot>
   3.498 -    <slot>readOutput()</slot>
   3.499 -</slots>
   3.500 -<functions>
   3.501 -    <function access="private" specifier="non virtual">init()</function>
   3.502 -    <function access="private" specifier="non virtual">destroy()</function>
   3.503 -</functions>
   3.504 -<pixmapinproject/>
   3.505 -<layoutdefaults spacing="6" margin="11"/>
   3.506 -</UI>
   3.507 +        <property name="margin">
   3.508 +         <number>0</number>
   3.509 +        </property>
   3.510 +        <item>
   3.511 +         <widget class="QLabel" name="textLabel1_2">
   3.512 +          <property name="sizePolicy">
   3.513 +           <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
   3.514 +            <horstretch>0</horstretch>
   3.515 +            <verstretch>0</verstretch>
   3.516 +           </sizepolicy>
   3.517 +          </property>
   3.518 +          <property name="minimumSize">
   3.519 +           <size>
   3.520 +            <width>125</width>
   3.521 +            <height>0</height>
   3.522 +           </size>
   3.523 +          </property>
   3.524 +          <property name="text">
   3.525 +           <string>CSS:</string>
   3.526 +          </property>
   3.527 +          <property name="alignment">
   3.528 +           <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
   3.529 +          </property>
   3.530 +         </widget>
   3.531 +        </item>
   3.532 +        <item>
   3.533 +         <widget class="QLineEdit" name="lineEditCSS"/>
   3.534 +        </item>
   3.535 +        <item>
   3.536 +         <widget class="QPushButton" name="browseCSSButton">
   3.537 +          <property name="sizePolicy">
   3.538 +           <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
   3.539 +            <horstretch>0</horstretch>
   3.540 +            <verstretch>0</verstretch>
   3.541 +           </sizepolicy>
   3.542 +          </property>
   3.543 +          <property name="text">
   3.544 +           <string>Browse</string>
   3.545 +          </property>
   3.546 +         </widget>
   3.547 +        </item>
   3.548 +       </layout>
   3.549 +      </item>
   3.550 +     </layout>
   3.551 +    </widget>
   3.552 +   </item>
   3.553 +   <item>
   3.554 +    <widget class="Q3GroupBox" name="groupBox1">
   3.555 +     <property name="sizePolicy">
   3.556 +      <sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
   3.557 +       <horstretch>0</horstretch>
   3.558 +       <verstretch>0</verstretch>
   3.559 +      </sizepolicy>
   3.560 +     </property>
   3.561 +     <property name="title">
   3.562 +      <string>Scripts</string>
   3.563 +     </property>
   3.564 +     <property name="orientation">
   3.565 +      <enum>Qt::Vertical</enum>
   3.566 +     </property>
   3.567 +     <layout class="QGridLayout">
   3.568 +      <property name="margin">
   3.569 +       <number>11</number>
   3.570 +      </property>
   3.571 +      <property name="spacing">
   3.572 +       <number>6</number>
   3.573 +      </property>
   3.574 +      <item row="0" column="0">
   3.575 +       <layout class="QHBoxLayout">
   3.576 +        <property name="spacing">
   3.577 +         <number>6</number>
   3.578 +        </property>
   3.579 +        <property name="margin">
   3.580 +         <number>0</number>
   3.581 +        </property>
   3.582 +        <item>
   3.583 +         <widget class="QLabel" name="textLabel1_3">
   3.584 +          <property name="sizePolicy">
   3.585 +           <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
   3.586 +            <horstretch>0</horstretch>
   3.587 +            <verstretch>0</verstretch>
   3.588 +           </sizepolicy>
   3.589 +          </property>
   3.590 +          <property name="minimumSize">
   3.591 +           <size>
   3.592 +            <width>125</width>
   3.593 +            <height>0</height>
   3.594 +           </size>
   3.595 +          </property>
   3.596 +          <property name="text">
   3.597 +           <string>Before export:</string>
   3.598 +          </property>
   3.599 +          <property name="alignment">
   3.600 +           <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
   3.601 +          </property>
   3.602 +         </widget>
   3.603 +        </item>
   3.604 +        <item>
   3.605 +         <widget class="QLineEdit" name="lineEditPreScript"/>
   3.606 +        </item>
   3.607 +        <item>
   3.608 +         <widget class="QPushButton" name="browsePreExportButton">
   3.609 +          <property name="sizePolicy">
   3.610 +           <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
   3.611 +            <horstretch>0</horstretch>
   3.612 +            <verstretch>0</verstretch>
   3.613 +           </sizepolicy>
   3.614 +          </property>
   3.615 +          <property name="text">
   3.616 +           <string>Browse</string>
   3.617 +          </property>
   3.618 +         </widget>
   3.619 +        </item>
   3.620 +       </layout>
   3.621 +      </item>
   3.622 +      <item row="1" column="0">
   3.623 +       <layout class="QHBoxLayout">
   3.624 +        <property name="spacing">
   3.625 +         <number>6</number>
   3.626 +        </property>
   3.627 +        <property name="margin">
   3.628 +         <number>0</number>
   3.629 +        </property>
   3.630 +        <item>
   3.631 +         <widget class="QLabel" name="textLabel2_2">
   3.632 +          <property name="sizePolicy">
   3.633 +           <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
   3.634 +            <horstretch>0</horstretch>
   3.635 +            <verstretch>0</verstretch>
   3.636 +           </sizepolicy>
   3.637 +          </property>
   3.638 +          <property name="minimumSize">
   3.639 +           <size>
   3.640 +            <width>125</width>
   3.641 +            <height>0</height>
   3.642 +           </size>
   3.643 +          </property>
   3.644 +          <property name="frameShape">
   3.645 +           <enum>QFrame::NoFrame</enum>
   3.646 +          </property>
   3.647 +          <property name="text">
   3.648 +           <string>After Export:</string>
   3.649 +          </property>
   3.650 +          <property name="alignment">
   3.651 +           <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
   3.652 +          </property>
   3.653 +         </widget>
   3.654 +        </item>
   3.655 +        <item>
   3.656 +         <widget class="QLineEdit" name="lineEditPostScript"/>
   3.657 +        </item>
   3.658 +        <item>
   3.659 +         <widget class="QPushButton" name="browsePostExportButton">
   3.660 +          <property name="sizePolicy">
   3.661 +           <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
   3.662 +            <horstretch>0</horstretch>
   3.663 +            <verstretch>0</verstretch>
   3.664 +           </sizepolicy>
   3.665 +          </property>
   3.666 +          <property name="text">
   3.667 +           <string>Browse</string>
   3.668 +          </property>
   3.669 +         </widget>
   3.670 +        </item>
   3.671 +       </layout>
   3.672 +      </item>
   3.673 +     </layout>
   3.674 +    </widget>
   3.675 +   </item>
   3.676 +   <item>
   3.677 +    <spacer>
   3.678 +     <property name="orientation">
   3.679 +      <enum>Qt::Vertical</enum>
   3.680 +     </property>
   3.681 +     <property name="sizeType">
   3.682 +      <enum>QSizePolicy::MinimumExpanding</enum>
   3.683 +     </property>
   3.684 +     <property name="sizeHint" stdset="0">
   3.685 +      <size>
   3.686 +       <width>20</width>
   3.687 +       <height>41</height>
   3.688 +      </size>
   3.689 +     </property>
   3.690 +    </spacer>
   3.691 +   </item>
   3.692 +   <item>
   3.693 +    <layout class="QHBoxLayout">
   3.694 +     <item>
   3.695 +      <spacer>
   3.696 +       <property name="orientation">
   3.697 +        <enum>Qt::Horizontal</enum>
   3.698 +       </property>
   3.699 +       <property name="sizeType">
   3.700 +        <enum>QSizePolicy::Expanding</enum>
   3.701 +       </property>
   3.702 +       <property name="sizeHint" stdset="0">
   3.703 +        <size>
   3.704 +         <width>61</width>
   3.705 +         <height>21</height>
   3.706 +        </size>
   3.707 +       </property>
   3.708 +      </spacer>
   3.709 +     </item>
   3.710 +     <item>
   3.711 +      <widget class="QPushButton" name="cancelButton">
   3.712 +       <property name="text">
   3.713 +        <string>Cancel</string>
   3.714 +       </property>
   3.715 +      </widget>
   3.716 +     </item>
   3.717 +     <item>
   3.718 +      <widget class="QPushButton" name="exportButton">
   3.719 +       <property name="text">
   3.720 +        <string>Export</string>
   3.721 +       </property>
   3.722 +       <property name="default">
   3.723 +        <bool>true</bool>
   3.724 +       </property>
   3.725 +      </widget>
   3.726 +     </item>
   3.727 +    </layout>
   3.728 +   </item>
   3.729 +  </layout>
   3.730 + </widget>
   3.731 + <layoutdefault spacing="6" margin="11"/>
   3.732 + <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
   3.733 + <customwidgets>
   3.734 +  <customwidget>
   3.735 +   <class>Q3GroupBox</class>
   3.736 +   <extends>QGroupBox</extends>
   3.737 +   <header>Qt3Support/Q3GroupBox</header>
   3.738 +   <container>1</container>
   3.739 +  </customwidget>
   3.740 + </customwidgets>
   3.741 + <includes>
   3.742 +  <include location="local">xsltproc.h</include>
   3.743 +  <include location="local">process.h</include>
   3.744 + </includes>
   3.745 + <resources/>
   3.746 + <connections>
   3.747 +  <connection>
   3.748 +   <sender>cancelButton</sender>
   3.749 +   <signal>clicked()</signal>
   3.750 +   <receiver>ExportHTMLDialog</receiver>
   3.751 +   <slot>reject()</slot>
   3.752 +   <hints>
   3.753 +    <hint type="sourcelabel">
   3.754 +     <x>459</x>
   3.755 +     <y>443</y>
   3.756 +    </hint>
   3.757 +    <hint type="destinationlabel">
   3.758 +     <x>256</x>
   3.759 +     <y>233</y>
   3.760 +    </hint>
   3.761 +   </hints>
   3.762 +  </connection>
   3.763 +  <connection>
   3.764 +   <sender>exportButton</sender>
   3.765 +   <signal>clicked()</signal>
   3.766 +   <receiver>ExportHTMLDialog</receiver>
   3.767 +   <slot>accept()</slot>
   3.768 +   <hints>
   3.769 +    <hint type="sourcelabel">
   3.770 +     <x>368</x>
   3.771 +     <y>443</y>
   3.772 +    </hint>
   3.773 +    <hint type="destinationlabel">
   3.774 +     <x>256</x>
   3.775 +     <y>233</y>
   3.776 +    </hint>
   3.777 +   </hints>
   3.778 +  </connection>
   3.779 + </connections>
   3.780 +</ui>
     4.1 --- a/exports.cpp	Fri Feb 19 13:47:03 2010 +0000
     4.2 +++ b/exports.cpp	Thu Feb 25 11:03:52 2010 +0000
     4.3 @@ -8,6 +8,7 @@
     4.4  #include "warningdialog.h"
     4.5  #include "xsltproc.h"
     4.6  
     4.7 +
     4.8  extern Main *mainWindow;
     4.9  extern QDir vymBaseDir;
    4.10  extern QString vymName;
    4.11 @@ -344,14 +345,11 @@
    4.12  	QString s;
    4.13  	QString curIndent("");
    4.14  	int i;
    4.15 -	BranchObj *bo;  //FIXME-3 still needed?
    4.16  	BranchItem *cur=NULL;
    4.17  	BranchItem *prev=NULL;
    4.18  	cur=model->nextBranch (cur,prev);
    4.19  	while (cur) 
    4.20  	{
    4.21 -		bo=(BranchObj*)(cur->getLMO());
    4.22 -
    4.23  		if (!cur->hasHiddenExportParent() )
    4.24  		{
    4.25  			// If necessary, write note
    4.26 @@ -487,6 +485,8 @@
    4.27  	noSingulars=true;	
    4.28  	frameURLs=true;
    4.29  	useMapColors=true;
    4.30 +	cssFileName="vym.css";
    4.31 +	cssOriginalPath="";	// Is set in VymModel, based on default setting in ExportHTMLDialog
    4.32  
    4.33  	if (model &&model->getMapEditor()) 
    4.34  		offset=model->getMapEditor()->getTotalBBox().topLeft();
    4.35 @@ -590,8 +590,37 @@
    4.36      return r;
    4.37  }
    4.38  
    4.39 +void ExportHTML::setCSSPath(const QString &p)
    4.40 +{
    4.41 +	cssOriginalPath=p;
    4.42 +}
    4.43 +
    4.44  void ExportHTML::doExport() 
    4.45  {
    4.46 +	//FIXME-1  check for errors// Copy CSS file
    4.47 +	QFile css_src (cssOriginalPath);
    4.48 +	QFile css_dst (outDir.path()+"/"+cssFileName);
    4.49 +	if (!css_src.open ( QIODevice::ReadOnly))
    4.50 +		QMessageBox::warning( 0, QObject::tr( "Warning","ExportHTML" ),QObject::tr("Could not open %1","ExportHTML").arg(cssOriginalPath));
    4.51 +	else
    4.52 +	{
    4.53 +		if (!css_dst.open( QIODevice::WriteOnly))
    4.54 +			QMessageBox::warning( 0, QObject::tr( "Warning" ), QObject::tr("Could not open %1").arg(css_dst.fileName()));
    4.55 +		else
    4.56 +		{	
    4.57 +		
    4.58 +			QTextStream tsout( &css_dst);
    4.59 +			QTextStream tsin ( &css_src);
    4.60 +			QString s= tsin.read();
    4.61 +			tsout << s;
    4.62 +			css_dst.close();
    4.63 +		}	
    4.64 +		css_src.close();
    4.65 +	}
    4.66 +
    4.67 +
    4.68 +
    4.69 +	// Open file for writing
    4.70  	QFile file (outputFile);
    4.71  	if ( !file.open( QIODevice::WriteOnly ) ) 
    4.72  	{
    4.73 @@ -604,7 +633,7 @@
    4.74  
    4.75  	// Write header
    4.76  	ts<<"<html><title>"+model->getMapName()<<"</title><body>";
    4.77 -	ts<<" <link rel='stylesheet' id='css.stylesheet' href='vym.css' />\n";
    4.78 +	ts<<" <link rel='stylesheet' id='css.stylesheet' href='"<<cssFileName<<"' />\n";
    4.79  
    4.80  	// Include image
    4.81  	ts<<"<center><img src=\""<<model->getMapName()<<".png\" usemap='#imagemap'></center>\n";
     5.1 --- a/exports.h	Fri Feb 19 13:47:03 2010 +0000
     5.2 +++ b/exports.h	Thu Feb 25 11:03:52 2010 +0000
     5.3 @@ -100,11 +100,14 @@
     5.4  	ExportHTML();
     5.5  	ExportHTML(VymModel *m);
     5.6  	virtual void init();
     5.7 +	virtual void setCSSPath(const QString &path);
     5.8  	virtual void doExport();
     5.9  private:
    5.10  	QString getBranchText(BranchItem *);
    5.11  	QString buildList (BranchItem *);
    5.12  	QString imageMap;
    5.13 +	QString cssFileName;
    5.14 +	QString cssOriginalPath;
    5.15  
    5.16  	bool frameURLs;
    5.17  	bool noSingulars;
     6.1 --- a/exportxhtmldialog.ui	Fri Feb 19 13:47:03 2010 +0000
     6.2 +++ b/exportxhtmldialog.ui	Thu Feb 25 11:03:52 2010 +0000
     6.3 @@ -1,7 +1,8 @@
     6.4 -<ui version="4.0" >
     6.5 +<?xml version="1.0" encoding="UTF-8"?>
     6.6 +<ui version="4.0">
     6.7   <class>ExportXHTMLDialog</class>
     6.8 - <widget class="QDialog" name="ExportXHTMLDialog" >
     6.9 -  <property name="geometry" >
    6.10 + <widget class="QDialog" name="ExportXHTMLDialog">
    6.11 +  <property name="geometry">
    6.12     <rect>
    6.13      <x>0</x>
    6.14      <y>0</y>
    6.15 @@ -9,50 +10,41 @@
    6.16      <height>523</height>
    6.17     </rect>
    6.18    </property>
    6.19 -  <property name="minimumSize" >
    6.20 +  <property name="minimumSize">
    6.21     <size>
    6.22      <width>0</width>
    6.23      <height>130</height>
    6.24     </size>
    6.25    </property>
    6.26 -  <property name="windowTitle" >
    6.27 +  <property name="windowTitle">
    6.28     <string>Export XHTML</string>
    6.29    </property>
    6.30 -  <layout class="QVBoxLayout" >
    6.31 +  <layout class="QVBoxLayout">
    6.32     <item>
    6.33 -    <layout class="QHBoxLayout" >
    6.34 -     <property name="spacing" >
    6.35 +    <layout class="QHBoxLayout">
    6.36 +     <property name="spacing">
    6.37        <number>6</number>
    6.38       </property>
    6.39 -     <property name="leftMargin" >
    6.40 -      <number>0</number>
    6.41 -     </property>
    6.42 -     <property name="topMargin" >
    6.43 -      <number>0</number>
    6.44 -     </property>
    6.45 -     <property name="rightMargin" >
    6.46 -      <number>0</number>
    6.47 -     </property>
    6.48 -     <property name="bottomMargin" >
    6.49 +     <property name="margin">
    6.50        <number>0</number>
    6.51       </property>
    6.52       <item>
    6.53 -      <widget class="QLabel" name="textLabel1" >
    6.54 -       <property name="sizePolicy" >
    6.55 -        <sizepolicy vsizetype="Preferred" hsizetype="Minimum" >
    6.56 +      <widget class="QLabel" name="textLabel1">
    6.57 +       <property name="sizePolicy">
    6.58 +        <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
    6.59           <horstretch>0</horstretch>
    6.60           <verstretch>0</verstretch>
    6.61          </sizepolicy>
    6.62         </property>
    6.63 -       <property name="text" >
    6.64 +       <property name="text">
    6.65          <string>Export to directory:</string>
    6.66         </property>
    6.67        </widget>
    6.68       </item>
    6.69       <item>
    6.70 -      <widget class="QLineEdit" name="lineEditDir" >
    6.71 -       <property name="sizePolicy" >
    6.72 -        <sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
    6.73 +      <widget class="QLineEdit" name="lineEditDir">
    6.74 +       <property name="sizePolicy">
    6.75 +        <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
    6.76           <horstretch>0</horstretch>
    6.77           <verstretch>0</verstretch>
    6.78          </sizepolicy>
    6.79 @@ -60,14 +52,14 @@
    6.80        </widget>
    6.81       </item>
    6.82       <item>
    6.83 -      <widget class="QPushButton" name="browseExportDirButton" >
    6.84 -       <property name="sizePolicy" >
    6.85 -        <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
    6.86 +      <widget class="QPushButton" name="browseExportDirButton">
    6.87 +       <property name="sizePolicy">
    6.88 +        <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
    6.89           <horstretch>0</horstretch>
    6.90           <verstretch>0</verstretch>
    6.91          </sizepolicy>
    6.92         </property>
    6.93 -       <property name="text" >
    6.94 +       <property name="text">
    6.95          <string>Browse</string>
    6.96         </property>
    6.97        </widget>
    6.98 @@ -75,46 +67,27 @@
    6.99      </layout>
   6.100     </item>
   6.101     <item>
   6.102 -    <widget class="Q3ButtonGroup" name="buttonGroup2" >
   6.103 -     <property name="sizePolicy" >
   6.104 -      <sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
   6.105 +    <widget class="Q3ButtonGroup" name="buttonGroup2">
   6.106 +     <property name="sizePolicy">
   6.107 +      <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
   6.108         <horstretch>0</horstretch>
   6.109         <verstretch>0</verstretch>
   6.110        </sizepolicy>
   6.111       </property>
   6.112 -     <property name="minimumSize" >
   6.113 +     <property name="minimumSize">
   6.114        <size>
   6.115         <width>0</width>
   6.116         <height>160</height>
   6.117        </size>
   6.118       </property>
   6.119 -     <property name="title" >
   6.120 +     <property name="title">
   6.121        <string>Options</string>
   6.122       </property>
   6.123 -     <property name="orientation" >
   6.124 +     <property name="orientation">
   6.125        <enum>Qt::Vertical</enum>
   6.126       </property>
   6.127 -     <widget class="QCheckBox" name="outputButton" >
   6.128 -      <property name="geometry" >
   6.129 -       <rect>
   6.130 -        <x>22</x>
   6.131 -        <y>156</y>
   6.132 -        <width>521</width>
   6.133 -        <height>21</height>
   6.134 -       </rect>
   6.135 -      </property>
   6.136 -      <property name="sizePolicy" >
   6.137 -       <sizepolicy vsizetype="Fixed" hsizetype="Minimum" >
   6.138 -        <horstretch>0</horstretch>
   6.139 -        <verstretch>0</verstretch>
   6.140 -       </sizepolicy>
   6.141 -      </property>
   6.142 -      <property name="text" >
   6.143 -       <string>show output of external scripts</string>
   6.144 -      </property>
   6.145 -     </widget>
   6.146 -     <widget class="QWidget" name="layoutWidget" >
   6.147 -      <property name="geometry" >
   6.148 +     <widget class="QWidget" name="layoutWidget">
   6.149 +      <property name="geometry">
   6.150         <rect>
   6.151          <x>20</x>
   6.152          <y>30</y>
   6.153 @@ -122,189 +95,166 @@
   6.154          <height>104</height>
   6.155         </rect>
   6.156        </property>
   6.157 -      <layout class="QVBoxLayout" >
   6.158 -       <property name="spacing" >
   6.159 +      <layout class="QVBoxLayout">
   6.160 +       <property name="spacing">
   6.161          <number>6</number>
   6.162         </property>
   6.163 -       <property name="leftMargin" >
   6.164 -        <number>0</number>
   6.165 -       </property>
   6.166 -       <property name="topMargin" >
   6.167 -        <number>0</number>
   6.168 -       </property>
   6.169 -       <property name="rightMargin" >
   6.170 -        <number>0</number>
   6.171 -       </property>
   6.172 -       <property name="bottomMargin" >
   6.173 +       <property name="margin">
   6.174          <number>0</number>
   6.175         </property>
   6.176         <item>
   6.177 -        <widget class="QCheckBox" name="imageButton" >
   6.178 -         <property name="text" >
   6.179 +        <widget class="QCheckBox" name="imageButton">
   6.180 +         <property name="text">
   6.181            <string>Include image</string>
   6.182           </property>
   6.183          </widget>
   6.184         </item>
   6.185         <item>
   6.186 -        <widget class="QCheckBox" name="textColorButton" >
   6.187 -         <property name="text" >
   6.188 +        <widget class="QCheckBox" name="textColorButton">
   6.189 +         <property name="text">
   6.190            <string>Colored headings in text</string>
   6.191           </property>
   6.192          </widget>
   6.193         </item>
   6.194         <item>
   6.195 -        <widget class="QCheckBox" name="saveSettingsInMapButton" >
   6.196 -         <property name="text" >
   6.197 +        <widget class="QCheckBox" name="saveSettingsInMapButton">
   6.198 +         <property name="text">
   6.199            <string>Save settings in map</string>
   6.200           </property>
   6.201          </widget>
   6.202         </item>
   6.203         <item>
   6.204 -        <widget class="QCheckBox" name="warningsButton" >
   6.205 -         <property name="text" >
   6.206 +        <widget class="QCheckBox" name="warningsButton">
   6.207 +         <property name="text">
   6.208            <string>show warnings of xslt processor</string>
   6.209           </property>
   6.210          </widget>
   6.211         </item>
   6.212 +       <item>
   6.213 +        <widget class="QCheckBox" name="outputButton">
   6.214 +         <property name="sizePolicy">
   6.215 +          <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
   6.216 +           <horstretch>0</horstretch>
   6.217 +           <verstretch>0</verstretch>
   6.218 +          </sizepolicy>
   6.219 +         </property>
   6.220 +         <property name="text">
   6.221 +          <string>show output of external scripts</string>
   6.222 +         </property>
   6.223 +         <attribute name="buttonGroup">
   6.224 +          <string/>
   6.225 +         </attribute>
   6.226 +        </widget>
   6.227 +       </item>
   6.228        </layout>
   6.229       </widget>
   6.230      </widget>
   6.231     </item>
   6.232     <item>
   6.233 -    <widget class="Q3GroupBox" name="groupBox2" >
   6.234 -     <property name="title" >
   6.235 +    <widget class="Q3GroupBox" name="groupBox2">
   6.236 +     <property name="title">
   6.237        <string>Stylesheets</string>
   6.238       </property>
   6.239 -     <property name="orientation" >
   6.240 +     <property name="orientation">
   6.241        <enum>Qt::Vertical</enum>
   6.242       </property>
   6.243 -     <layout class="QGridLayout" >
   6.244 -      <property name="leftMargin" >
   6.245 +     <layout class="QGridLayout">
   6.246 +      <property name="margin">
   6.247         <number>11</number>
   6.248        </property>
   6.249 -      <property name="topMargin" >
   6.250 -       <number>11</number>
   6.251 -      </property>
   6.252 -      <property name="rightMargin" >
   6.253 -       <number>11</number>
   6.254 -      </property>
   6.255 -      <property name="bottomMargin" >
   6.256 -       <number>11</number>
   6.257 -      </property>
   6.258 -      <property name="horizontalSpacing" >
   6.259 +      <property name="spacing">
   6.260         <number>6</number>
   6.261        </property>
   6.262 -      <property name="verticalSpacing" >
   6.263 -       <number>6</number>
   6.264 -      </property>
   6.265 -      <item row="1" column="0" >
   6.266 -       <layout class="QHBoxLayout" >
   6.267 -        <property name="spacing" >
   6.268 +      <item row="1" column="0">
   6.269 +       <layout class="QHBoxLayout">
   6.270 +        <property name="spacing">
   6.271           <number>6</number>
   6.272          </property>
   6.273 -        <property name="leftMargin" >
   6.274 -         <number>0</number>
   6.275 -        </property>
   6.276 -        <property name="topMargin" >
   6.277 -         <number>0</number>
   6.278 -        </property>
   6.279 -        <property name="rightMargin" >
   6.280 -         <number>0</number>
   6.281 -        </property>
   6.282 -        <property name="bottomMargin" >
   6.283 +        <property name="margin">
   6.284           <number>0</number>
   6.285          </property>
   6.286          <item>
   6.287 -         <widget class="QLabel" name="textLabel2" >
   6.288 -          <property name="sizePolicy" >
   6.289 -           <sizepolicy vsizetype="Preferred" hsizetype="Fixed" >
   6.290 +         <widget class="QLabel" name="textLabel2">
   6.291 +          <property name="sizePolicy">
   6.292 +           <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
   6.293              <horstretch>0</horstretch>
   6.294              <verstretch>0</verstretch>
   6.295             </sizepolicy>
   6.296            </property>
   6.297 -          <property name="minimumSize" >
   6.298 +          <property name="minimumSize">
   6.299             <size>
   6.300              <width>125</width>
   6.301              <height>0</height>
   6.302             </size>
   6.303            </property>
   6.304 -          <property name="text" >
   6.305 +          <property name="text">
   6.306             <string>XSL:</string>
   6.307            </property>
   6.308 -          <property name="alignment" >
   6.309 +          <property name="alignment">
   6.310             <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
   6.311            </property>
   6.312           </widget>
   6.313          </item>
   6.314          <item>
   6.315 -         <widget class="QLineEdit" name="lineEditXSL" />
   6.316 +         <widget class="QLineEdit" name="lineEditXSL"/>
   6.317          </item>
   6.318          <item>
   6.319 -         <widget class="QPushButton" name="browseXSLButton" >
   6.320 -          <property name="sizePolicy" >
   6.321 -           <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
   6.322 +         <widget class="QPushButton" name="browseXSLButton">
   6.323 +          <property name="sizePolicy">
   6.324 +           <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
   6.325              <horstretch>0</horstretch>
   6.326              <verstretch>0</verstretch>
   6.327             </sizepolicy>
   6.328            </property>
   6.329 -          <property name="text" >
   6.330 +          <property name="text">
   6.331             <string>Browse</string>
   6.332            </property>
   6.333           </widget>
   6.334          </item>
   6.335         </layout>
   6.336        </item>
   6.337 -      <item row="0" column="0" >
   6.338 -       <layout class="QHBoxLayout" >
   6.339 -        <property name="spacing" >
   6.340 +      <item row="0" column="0">
   6.341 +       <layout class="QHBoxLayout">
   6.342 +        <property name="spacing">
   6.343           <number>6</number>
   6.344          </property>
   6.345 -        <property name="leftMargin" >
   6.346 -         <number>0</number>
   6.347 -        </property>
   6.348 -        <property name="topMargin" >
   6.349 -         <number>0</number>
   6.350 -        </property>
   6.351 -        <property name="rightMargin" >
   6.352 -         <number>0</number>
   6.353 -        </property>
   6.354 -        <property name="bottomMargin" >
   6.355 +        <property name="margin">
   6.356           <number>0</number>
   6.357          </property>
   6.358          <item>
   6.359 -         <widget class="QLabel" name="textLabel1_2" >
   6.360 -          <property name="sizePolicy" >
   6.361 -           <sizepolicy vsizetype="Preferred" hsizetype="Fixed" >
   6.362 +         <widget class="QLabel" name="textLabel1_2">
   6.363 +          <property name="sizePolicy">
   6.364 +           <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
   6.365              <horstretch>0</horstretch>
   6.366              <verstretch>0</verstretch>
   6.367             </sizepolicy>
   6.368            </property>
   6.369 -          <property name="minimumSize" >
   6.370 +          <property name="minimumSize">
   6.371             <size>
   6.372              <width>125</width>
   6.373              <height>0</height>
   6.374             </size>
   6.375            </property>
   6.376 -          <property name="text" >
   6.377 +          <property name="text">
   6.378             <string>CSS:</string>
   6.379            </property>
   6.380 -          <property name="alignment" >
   6.381 +          <property name="alignment">
   6.382             <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
   6.383            </property>
   6.384           </widget>
   6.385          </item>
   6.386          <item>
   6.387 -         <widget class="QLineEdit" name="lineEditCSS" />
   6.388 +         <widget class="QLineEdit" name="lineEditCSS"/>
   6.389          </item>
   6.390          <item>
   6.391 -         <widget class="QPushButton" name="browseCSSButton" >
   6.392 -          <property name="sizePolicy" >
   6.393 -           <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
   6.394 +         <widget class="QPushButton" name="browseCSSButton">
   6.395 +          <property name="sizePolicy">
   6.396 +           <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
   6.397              <horstretch>0</horstretch>
   6.398              <verstretch>0</verstretch>
   6.399             </sizepolicy>
   6.400            </property>
   6.401 -          <property name="text" >
   6.402 +          <property name="text">
   6.403             <string>Browse</string>
   6.404            </property>
   6.405           </widget>
   6.406 @@ -315,143 +265,113 @@
   6.407      </widget>
   6.408     </item>
   6.409     <item>
   6.410 -    <widget class="Q3GroupBox" name="groupBox1" >
   6.411 -     <property name="title" >
   6.412 +    <widget class="Q3GroupBox" name="groupBox1">
   6.413 +     <property name="title">
   6.414        <string>Scripts</string>
   6.415       </property>
   6.416 -     <property name="orientation" >
   6.417 +     <property name="orientation">
   6.418        <enum>Qt::Vertical</enum>
   6.419       </property>
   6.420 -     <layout class="QGridLayout" >
   6.421 -      <property name="leftMargin" >
   6.422 +     <layout class="QGridLayout">
   6.423 +      <property name="margin">
   6.424         <number>11</number>
   6.425        </property>
   6.426 -      <property name="topMargin" >
   6.427 -       <number>11</number>
   6.428 -      </property>
   6.429 -      <property name="rightMargin" >
   6.430 -       <number>11</number>
   6.431 -      </property>
   6.432 -      <property name="bottomMargin" >
   6.433 -       <number>11</number>
   6.434 -      </property>
   6.435 -      <property name="horizontalSpacing" >
   6.436 +      <property name="spacing">
   6.437         <number>6</number>
   6.438        </property>
   6.439 -      <property name="verticalSpacing" >
   6.440 -       <number>6</number>
   6.441 -      </property>
   6.442 -      <item row="0" column="0" >
   6.443 -       <layout class="QHBoxLayout" >
   6.444 -        <property name="spacing" >
   6.445 +      <item row="0" column="0">
   6.446 +       <layout class="QHBoxLayout">
   6.447 +        <property name="spacing">
   6.448           <number>6</number>
   6.449          </property>
   6.450 -        <property name="leftMargin" >
   6.451 -         <number>0</number>
   6.452 -        </property>
   6.453 -        <property name="topMargin" >
   6.454 -         <number>0</number>
   6.455 -        </property>
   6.456 -        <property name="rightMargin" >
   6.457 -         <number>0</number>
   6.458 -        </property>
   6.459 -        <property name="bottomMargin" >
   6.460 +        <property name="margin">
   6.461           <number>0</number>
   6.462          </property>
   6.463          <item>
   6.464 -         <widget class="QLabel" name="textLabel1_3" >
   6.465 -          <property name="sizePolicy" >
   6.466 -           <sizepolicy vsizetype="Preferred" hsizetype="Fixed" >
   6.467 +         <widget class="QLabel" name="textLabel1_3">
   6.468 +          <property name="sizePolicy">
   6.469 +           <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
   6.470              <horstretch>0</horstretch>
   6.471              <verstretch>0</verstretch>
   6.472             </sizepolicy>
   6.473            </property>
   6.474 -          <property name="minimumSize" >
   6.475 +          <property name="minimumSize">
   6.476             <size>
   6.477              <width>125</width>
   6.478              <height>0</height>
   6.479             </size>
   6.480            </property>
   6.481 -          <property name="text" >
   6.482 +          <property name="text">
   6.483             <string>Before export:</string>
   6.484            </property>
   6.485 -          <property name="alignment" >
   6.486 +          <property name="alignment">
   6.487             <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
   6.488            </property>
   6.489           </widget>
   6.490          </item>
   6.491          <item>
   6.492 -         <widget class="QLineEdit" name="lineEditPreScript" />
   6.493 +         <widget class="QLineEdit" name="lineEditPreScript"/>
   6.494          </item>
   6.495          <item>
   6.496 -         <widget class="QPushButton" name="browsePreExportButton" >
   6.497 -          <property name="sizePolicy" >
   6.498 -           <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
   6.499 +         <widget class="QPushButton" name="browsePreExportButton">
   6.500 +          <property name="sizePolicy">
   6.501 +           <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
   6.502              <horstretch>0</horstretch>
   6.503              <verstretch>0</verstretch>
   6.504             </sizepolicy>
   6.505            </property>
   6.506 -          <property name="text" >
   6.507 +          <property name="text">
   6.508             <string>Browse</string>
   6.509            </property>
   6.510           </widget>
   6.511          </item>
   6.512         </layout>
   6.513        </item>
   6.514 -      <item row="1" column="0" >
   6.515 -       <layout class="QHBoxLayout" >
   6.516 -        <property name="spacing" >
   6.517 +      <item row="1" column="0">
   6.518 +       <layout class="QHBoxLayout">
   6.519 +        <property name="spacing">
   6.520           <number>6</number>
   6.521          </property>
   6.522 -        <property name="leftMargin" >
   6.523 -         <number>0</number>
   6.524 -        </property>
   6.525 -        <property name="topMargin" >
   6.526 -         <number>0</number>
   6.527 -        </property>
   6.528 -        <property name="rightMargin" >
   6.529 -         <number>0</number>
   6.530 -        </property>
   6.531 -        <property name="bottomMargin" >
   6.532 +        <property name="margin">
   6.533           <number>0</number>
   6.534          </property>
   6.535          <item>
   6.536 -         <widget class="QLabel" name="textLabel2_2" >
   6.537 -          <property name="sizePolicy" >
   6.538 -           <sizepolicy vsizetype="Preferred" hsizetype="Fixed" >
   6.539 +         <widget class="QLabel" name="textLabel2_2">
   6.540 +          <property name="sizePolicy">
   6.541 +           <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
   6.542              <horstretch>0</horstretch>
   6.543              <verstretch>0</verstretch>
   6.544             </sizepolicy>
   6.545            </property>
   6.546 -          <property name="minimumSize" >
   6.547 +          <property name="minimumSize">
   6.548             <size>
   6.549              <width>125</width>
   6.550              <height>0</height>
   6.551             </size>
   6.552            </property>
   6.553 -          <property name="frameShape" >
   6.554 +          <property name="frameShape">
   6.555             <enum>QFrame::NoFrame</enum>
   6.556            </property>
   6.557 -          <property name="text" >
   6.558 +          <property name="text">
   6.559             <string>After Export:</string>
   6.560            </property>
   6.561 -          <property name="alignment" >
   6.562 +          <property name="alignment">
   6.563             <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
   6.564            </property>
   6.565           </widget>
   6.566          </item>
   6.567          <item>
   6.568 -         <widget class="QLineEdit" name="lineEditPostScript" />
   6.569 +         <widget class="QLineEdit" name="lineEditPostScript"/>
   6.570          </item>
   6.571          <item>
   6.572 -         <widget class="QPushButton" name="browsePostExportButton" >
   6.573 -          <property name="sizePolicy" >
   6.574 -           <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
   6.575 +         <widget class="QPushButton" name="browsePostExportButton">
   6.576 +          <property name="sizePolicy">
   6.577 +           <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
   6.578              <horstretch>0</horstretch>
   6.579              <verstretch>0</verstretch>
   6.580             </sizepolicy>
   6.581            </property>
   6.582 -          <property name="text" >
   6.583 +          <property name="text">
   6.584             <string>Browse</string>
   6.585            </property>
   6.586           </widget>
   6.587 @@ -463,13 +383,13 @@
   6.588     </item>
   6.589     <item>
   6.590      <spacer>
   6.591 -     <property name="orientation" >
   6.592 +     <property name="orientation">
   6.593        <enum>Qt::Vertical</enum>
   6.594       </property>
   6.595 -     <property name="sizeType" >
   6.596 +     <property name="sizeType">
   6.597        <enum>QSizePolicy::MinimumExpanding</enum>
   6.598       </property>
   6.599 -     <property name="sizeHint" >
   6.600 +     <property name="sizeHint" stdset="0">
   6.601        <size>
   6.602         <width>20</width>
   6.603         <height>41</height>
   6.604 @@ -478,16 +398,16 @@
   6.605      </spacer>
   6.606     </item>
   6.607     <item>
   6.608 -    <layout class="QHBoxLayout" >
   6.609 +    <layout class="QHBoxLayout">
   6.610       <item>
   6.611        <spacer>
   6.612 -       <property name="orientation" >
   6.613 +       <property name="orientation">
   6.614          <enum>Qt::Horizontal</enum>
   6.615         </property>
   6.616 -       <property name="sizeType" >
   6.617 +       <property name="sizeType">
   6.618          <enum>QSizePolicy::Expanding</enum>
   6.619         </property>
   6.620 -       <property name="sizeHint" >
   6.621 +       <property name="sizeHint" stdset="0">
   6.622          <size>
   6.623           <width>61</width>
   6.624           <height>21</height>
   6.625 @@ -496,18 +416,18 @@
   6.626        </spacer>
   6.627       </item>
   6.628       <item>
   6.629 -      <widget class="QPushButton" name="cancelButton" >
   6.630 -       <property name="text" >
   6.631 +      <widget class="QPushButton" name="cancelButton">
   6.632 +       <property name="text">
   6.633          <string>Cancel</string>
   6.634         </property>
   6.635        </widget>
   6.636       </item>
   6.637       <item>
   6.638 -      <widget class="QPushButton" name="exportButton" >
   6.639 -       <property name="text" >
   6.640 +      <widget class="QPushButton" name="exportButton">
   6.641 +       <property name="text">
   6.642          <string>Export</string>
   6.643         </property>
   6.644 -       <property name="default" >
   6.645 +       <property name="default">
   6.646          <bool>true</bool>
   6.647         </property>
   6.648        </widget>
   6.649 @@ -516,7 +436,7 @@
   6.650     </item>
   6.651    </layout>
   6.652   </widget>
   6.653 - <layoutdefault spacing="6" margin="11" />
   6.654 + <layoutdefault spacing="6" margin="11"/>
   6.655   <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
   6.656   <customwidgets>
   6.657    <customwidget>
   6.658 @@ -533,8 +453,8 @@
   6.659    </customwidget>
   6.660   </customwidgets>
   6.661   <includes>
   6.662 -  <include location="local" >xsltproc.h</include>
   6.663 -  <include location="local" >process.h</include>
   6.664 +  <include location="local">xsltproc.h</include>
   6.665 +  <include location="local">process.h</include>
   6.666   </includes>
   6.667   <resources/>
   6.668   <connections>
   6.669 @@ -544,11 +464,11 @@
   6.670     <receiver>ExportXHTMLDialog</receiver>
   6.671     <slot>reject()</slot>
   6.672     <hints>
   6.673 -    <hint type="sourcelabel" >
   6.674 +    <hint type="sourcelabel">
   6.675       <x>459</x>
   6.676       <y>443</y>
   6.677      </hint>
   6.678 -    <hint type="destinationlabel" >
   6.679 +    <hint type="destinationlabel">
   6.680       <x>256</x>
   6.681       <y>233</y>
   6.682      </hint>
   6.683 @@ -560,11 +480,11 @@
   6.684     <receiver>ExportXHTMLDialog</receiver>
   6.685     <slot>accept()</slot>
   6.686     <hints>
   6.687 -    <hint type="sourcelabel" >
   6.688 +    <hint type="sourcelabel">
   6.689       <x>368</x>
   6.690       <y>443</y>
   6.691      </hint>
   6.692 -    <hint type="destinationlabel" >
   6.693 +    <hint type="destinationlabel">
   6.694       <x>256</x>
   6.695       <y>233</y>
   6.696      </hint>
     7.1 --- a/flagrow.cpp	Fri Feb 19 13:47:03 2010 +0000
     7.2 +++ b/flagrow.cpp	Thu Feb 25 11:03:52 2010 +0000
     7.3 @@ -46,7 +46,7 @@
     7.4  }
     7.5  
     7.6  
     7.7 -bool FlagRow::isActive (const QString &name)	//FIXME-2 regression
     7.8 +bool FlagRow::isActive (const QString &name)
     7.9  {
    7.10  	QString n;
    7.11  	foreach (n,activeNames)
     8.1 --- a/geometry.cpp	Fri Feb 19 13:47:03 2010 +0000
     8.2 +++ b/geometry.cpp	Thu Feb 25 11:03:52 2010 +0000
     8.3 @@ -48,6 +48,11 @@
     8.4      return false;	
     8.5  }
     8.6  
     8.7 +qreal distance (const QPointF &p, const QPointF &q)
     8.8 +{
     8.9 +	return sqrt (p.x()*q.x() + p.y()*q.y());
    8.10 +}
    8.11 +
    8.12  Vector::Vector ():QPointF ()
    8.13  {
    8.14  }
     9.1 --- a/geometry.h	Fri Feb 19 13:47:03 2010 +0000
     9.2 +++ b/geometry.h	Thu Feb 25 11:03:52 2010 +0000
     9.3 @@ -5,6 +5,7 @@
     9.4  
     9.5  QRectF addBBox(QRectF r1, QRectF r2);
     9.6  bool isInBox(const QPointF &p, const QRectF &box);
     9.7 +qreal distance (const QPointF &p, const QPointF &q);
     9.8  
     9.9  
    9.10  class Vector:public QPointF
    10.1 --- a/main.cpp	Fri Feb 19 13:47:03 2010 +0000
    10.2 +++ b/main.cpp	Thu Feb 25 11:03:52 2010 +0000
    10.3 @@ -202,7 +202,7 @@
    10.4  #endif
    10.5  
    10.6  	//m.resize(m.sizeHint());
    10.7 -	m.setIcon (QPixmap (iconPath+"vym-48x48.png"));
    10.8 +	m.setIcon (QPixmap (iconPath+"vym.png"));
    10.9  	m.show();
   10.10  	m.fileNew();
   10.11  	// Paint Mainwindow first time
    11.1 --- a/mainwindow.cpp	Fri Feb 19 13:47:03 2010 +0000
    11.2 +++ b/mainwindow.cpp	Thu Feb 25 11:03:52 2010 +0000
    11.3 @@ -205,6 +205,8 @@
    11.4  	setupSettingsActions();
    11.5  	setupContextMenus();
    11.6  	setupMacros();
    11.7 +	if (debug) switchboard.print();
    11.8 +
    11.9  	if (settings.value( "/mainwindow/showTestMenu",false).toBool()) setupTestActions();
   11.10  	setupHelpActions();
   11.11  
   11.12 @@ -341,6 +343,7 @@
   11.13  	a = new QAction(QPixmap( iconPath+"filenew.png"), tr( "&New map","File menu" ),this);
   11.14  	a->setStatusTip ( tr( "New map","Status tip File menu" ) );
   11.15  	a->setShortcut ( Qt::CTRL + Qt::Key_N );		//New map
   11.16 +	switchboard.addConnection(a,tr("File","Shortcut group"));
   11.17  	a->addTo( tb );
   11.18  	fileMenu->addAction (a);
   11.19  	connect( a, SIGNAL( triggered() ), this, SLOT( fileNew() ) );
   11.20 @@ -348,6 +351,7 @@
   11.21  	a = new QAction(QPixmap( iconPath+"filenewcopy.png"), tr( "&Copy to new map","File menu" ),this);
   11.22  	a->setStatusTip ( tr( "Copy selection to mapcenter of a new map","Status tip File menu" ) );
   11.23  	a->setShortcut ( Qt::CTRL +Qt::SHIFT + Qt::Key_N );		//New map
   11.24 +	switchboard.addConnection(a,tr("File","Shortcut group"));
   11.25  	fileMenu->addAction (a);
   11.26  	connect( a, SIGNAL( triggered() ), this, SLOT( fileNewCopy() ) );
   11.27  	actionFileNewCopy=a;
   11.28 @@ -355,6 +359,7 @@
   11.29  	a = new QAction( QPixmap( iconPath+"fileopen.png"), tr( "&Open..." ,"File menu"),this);
   11.30  	a->setStatusTip (tr( "Open","Status tip File menu" ) );
   11.31  	a->setShortcut ( Qt::CTRL + Qt::Key_O );		//Open map
   11.32 +	switchboard.addConnection(a,tr("File","Shortcut group"));
   11.33  	a->addTo( tb );
   11.34  	fileMenu->addAction (a);
   11.35  	connect( a, SIGNAL( triggered() ), this, SLOT( fileLoad() ) );
   11.36 @@ -365,6 +370,7 @@
   11.37  	a = new QAction( QPixmap( iconPath+"filesave.png"), tr( "&Save...","File menu" ), this);
   11.38  	a->setStatusTip ( tr( "Save","Status tip file menu" ));
   11.39  	a->setShortcut (Qt::CTRL + Qt::Key_S );			//Save map
   11.40 +	switchboard.addConnection(a,tr("File","Shortcut group"));
   11.41  	a->addTo( tb );
   11.42  	fileMenu->addAction (a);
   11.43  	connect( a, SIGNAL( triggered() ), this, SLOT( fileSave() ) );
   11.44 @@ -372,6 +378,7 @@
   11.45  
   11.46  	a = new QAction( QPixmap(iconPath+"filesaveas.png"), tr( "Save &As...","File menu" ), this);
   11.47  	a->setStatusTip (tr( "Save &As","Status tip file menu" ) );
   11.48 +	switchboard.addConnection(a,tr("File","Shortcut group"));
   11.49  	fileMenu->addAction (a);
   11.50  	connect( a, SIGNAL( triggered() ), this, SLOT( fileSaveAs() ) );
   11.51  
   11.52 @@ -381,12 +388,14 @@
   11.53  
   11.54  	a = new QAction(tr("KDE 3 Bookmarks"), this);
   11.55  	a->setStatusTip ( tr( "Import %1","Status tip file menu" ).arg(tr("KDE 3 bookmarks")));
   11.56 +	switchboard.addConnection(a,tr("File","Shortcut group"));
   11.57  	a->addTo (fileImportMenu);
   11.58  	connect( a, SIGNAL( triggered() ), this, SLOT( fileImportKDE3Bookmarks() ) );
   11.59  
   11.60  	a = new QAction(tr("KDE 4 Bookmarks"), this);
   11.61  	a->setStatusTip ( tr( "Import %1","Status tip file menu" ).arg(tr("KDE 4 bookmarks")));
   11.62  	a->addTo (fileImportMenu);
   11.63 +	switchboard.addConnection(a,tr("File","Shortcut group"));
   11.64  	connect( a, SIGNAL( triggered() ), this, SLOT( fileImportKDE4Bookmarks() ) );
   11.65  
   11.66  	if (settings.value( "/mainwindow/showTestMenu",false).toBool()) 
   11.67 @@ -394,21 +403,25 @@
   11.68  		a = new QAction( QPixmap(), tr("Firefox Bookmarks","File menu"),this);
   11.69  		a->setStatusTip (tr( "Import %1","Status tip file menu").arg(tr("Firefox Bookmarks" ) ));
   11.70  		a->addTo (fileImportMenu);
   11.71 +		switchboard.addConnection(a,tr("File","Shortcut group"));
   11.72  		connect( a, SIGNAL( triggered() ), this, SLOT( fileImportFirefoxBookmarks() ) );
   11.73  	}	
   11.74  
   11.75  	a = new QAction("Freemind...",this);
   11.76  	a->setStatusTip ( tr( "Import %1","status tip file menu").arg(" Freemind")  );
   11.77 +	switchboard.addConnection(a,tr("File","Shortcut group"));
   11.78  	fileImportMenu->addAction (a);
   11.79  	connect( a, SIGNAL( triggered() ), this, SLOT( fileImportFreemind() ) );
   11.80  
   11.81  	a = new QAction("Mind Manager...",this);
   11.82  	a->setStatusTip ( tr( "Import %1","status tip file menu").arg(" Mind Manager")  );
   11.83 +	switchboard.addConnection(a,tr("File","Shortcut group"));
   11.84  	fileImportMenu->addAction (a);
   11.85  	connect( a, SIGNAL( triggered() ), this, SLOT( fileImportMM() ) );
   11.86  
   11.87  	a = new QAction( tr( "Import Dir%1","File menu").arg("..."), this);
   11.88  	a->setStatusTip (tr( "Import directory structure (experimental)","status tip file menu" ) );
   11.89 +	switchboard.addConnection(a,tr("File","Shortcut group"));
   11.90  	fileImportMenu->addAction (a);
   11.91  	connect( a, SIGNAL( triggered() ), this, SLOT( fileImportDir() ) );
   11.92  
   11.93 @@ -416,17 +429,20 @@
   11.94  
   11.95  	a = new QAction( tr("Image%1","File export menu").arg("..."), this);
   11.96  	a->setStatusTip( tr( "Export map as image","status tip file menu" ));
   11.97 +	switchboard.addConnection(a,tr("File","Shortcut group"));
   11.98  	connect( a, SIGNAL( triggered() ), this, SLOT( fileExportImage() ) );
   11.99  	fileExportMenu->addAction (a);
  11.100  
  11.101  	a = new QAction( "Open Office...", this);
  11.102  	a->setStatusTip( tr( "Export in Open Document Format used e.g. in Open Office ","status tip file menu" ));
  11.103 +	switchboard.addConnection(a,tr("File","Shortcut group"));
  11.104  	connect( a, SIGNAL( triggered() ), this, SLOT( fileExportOOPresentation() ) );
  11.105  	fileExportMenu->addAction (a);
  11.106  
  11.107  	a = new QAction(  "Webpage (HTML)...",this );
  11.108  	a->setShortcut (Qt::ALT + Qt::Key_X);			//Export HTML
  11.109  	a->setStatusTip ( tr( "Export as %1","status tip file menu").arg(tr(" webpage (XHTML)","status tip file menu")));
  11.110 +	switchboard.addConnection(a,tr("File","Shortcut group"));
  11.111  	connect( a, SIGNAL( triggered() ), this, SLOT( fileExportHTML() ) );
  11.112  	fileExportMenu->addAction (a);
  11.113  
  11.114 @@ -438,41 +454,49 @@
  11.115  
  11.116  	a = new QAction( "Text (A&O report)...", this);
  11.117  	a->setStatusTip ( tr( "Export as %1").arg("A&O report "+tr("(still experimental)" )));
  11.118 +	switchboard.addConnection(a,tr("File","Shortcut group"));
  11.119  	connect( a, SIGNAL( triggered() ), this, SLOT( fileExportAO() ) );
  11.120  	fileExportMenu->addAction (a);
  11.121  
  11.122  	a = new QAction( "Text (ASCII)...", this);
  11.123  	a->setStatusTip ( tr( "Export as %1").arg("ASCII "+tr("(still experimental)" )));
  11.124 +	switchboard.addConnection(a,tr("File","Shortcut group"));
  11.125  	connect( a, SIGNAL( triggered() ), this, SLOT( fileExportASCII() ) );
  11.126  	fileExportMenu->addAction (a);
  11.127  
  11.128  	a = new QAction( "Spreadsheet (CSV)...", this);
  11.129  	a->setStatusTip ( tr( "Export as %1").arg("CSV "+tr("(still experimental)" )));
  11.130 +	switchboard.addConnection(a,tr("File","Shortcut group"));
  11.131  	connect( a, SIGNAL( triggered() ), this, SLOT( fileExportCSV() ) );
  11.132  	fileExportMenu->addAction (a);
  11.133  
  11.134  	a = new QAction( tr("KDE 3 Bookmarks","File menu"), this);
  11.135  	a->setStatusTip( tr( "Export as %1").arg(tr("KDE 3 Bookmarks" )));
  11.136 +	switchboard.addConnection(a,tr("File","Shortcut group"));
  11.137  	connect( a, SIGNAL( triggered() ), this, SLOT( fileExportKDE3Bookmarks() ) );
  11.138  	fileExportMenu->addAction (a);
  11.139  
  11.140  	a = new QAction( tr("KDE 4 Bookmarks","File menu"), this);
  11.141  	a->setStatusTip( tr( "Export as %1").arg(tr("KDE 4 Bookmarks" )));
  11.142 +	switchboard.addConnection(a,tr("File","Shortcut group"));
  11.143  	connect( a, SIGNAL( triggered() ), this, SLOT( fileExportKDE4Bookmarks() ) );
  11.144  	fileExportMenu->addAction (a);
  11.145  
  11.146  	a = new QAction( "Taskjuggler...", this );
  11.147  	a->setStatusTip( tr( "Export as %1").arg("Taskjuggler "+tr("(still experimental)" )));
  11.148 +	switchboard.addConnection(a,tr("File","Shortcut group"));
  11.149  	connect( a, SIGNAL( triggered() ), this, SLOT( fileExportTaskjuggler() ) );
  11.150  	fileExportMenu->addAction (a);
  11.151  
  11.152  	a = new QAction( "LaTeX...", this);
  11.153  	a->setStatusTip( tr( "Export as %1").arg("LaTeX "+tr("(still experimental)" )));
  11.154 +	switchboard.addConnection(a,tr("File","Shortcut group"));
  11.155  	connect( a, SIGNAL( triggered() ), this, SLOT( fileExportLaTeX() ) );
  11.156  	fileExportMenu->addAction (a);
  11.157  
  11.158  	a = new QAction( "XML..." , this );
  11.159  	a->setStatusTip (tr( "Export as %1").arg("XML"));
  11.160 +	switchboard.addConnection(a,tr("File","Shortcut group"));
  11.161  	connect( a, SIGNAL( triggered() ), this, SLOT( fileExportXML() ) );
  11.162  	fileExportMenu->addAction (a);
  11.163  
  11.164 @@ -482,6 +506,7 @@
  11.165  	a->setStatusTip ( tr( "Print" ,"File menu") );
  11.166  	a->setShortcut (Qt::CTRL + Qt::Key_P );			//Print map
  11.167  	a->addTo( tb );
  11.168 +	switchboard.addConnection(a,tr("File","Shortcut group"));
  11.169  	fileMenu->addAction (a);
  11.170  	connect( a, SIGNAL( triggered() ), this, SLOT( filePrint() ) );
  11.171  	actionFilePrint=a;
  11.172 @@ -489,12 +514,14 @@
  11.173  	a = new QAction( QPixmap(iconPath+"fileclose.png"), tr( "&Close Map","File menu" ), this);
  11.174  	a->setStatusTip (tr( "Close Map" ) );
  11.175  	a->setShortcut (Qt::CTRL + Qt::Key_W );			//Close map
  11.176 +	switchboard.addConnection(a,tr("File","Shortcut group"));
  11.177  	fileMenu->addAction (a);
  11.178  	connect( a, SIGNAL( triggered() ), this, SLOT( fileCloseMap() ) );
  11.179  
  11.180  	a = new QAction(QPixmap(iconPath+"exit.png"), tr( "E&xit","File menu")+" "+vymName, this);
  11.181  	a->setStatusTip ( tr( "Exit")+" "+vymName );
  11.182  	a->setShortcut (Qt::CTRL + Qt::Key_Q );			//Quit vym
  11.183 +	switchboard.addConnection(a,tr("File","Shortcut group"));
  11.184  	fileMenu->addAction (a);
  11.185  	connect( a, SIGNAL( triggered() ), this, SLOT( fileExitVYM() ) );
  11.186  }
  11.187 @@ -515,6 +542,7 @@
  11.188  	a->setStatusTip (tr( "Undo" ) );
  11.189  	a->setShortcut ( Qt::CTRL + Qt::Key_Z );		//Undo last action
  11.190  	a->setEnabled (false);
  11.191 +	switchboard.addConnection(a,tr("Edit","Shortcut group"));
  11.192  	tb->addAction (a);
  11.193  	editMenu->addAction (a);
  11.194  	actionUndo=a;
  11.195 @@ -522,6 +550,7 @@
  11.196  	a = new QAction( QPixmap( iconPath+"redo.png"), tr( "&Redo","Edit menu" ), this); 
  11.197  	a->setStatusTip (tr( "Redo" ));
  11.198  	a->setShortcut (Qt::CTRL + Qt::Key_Y );			//Redo last action
  11.199 +	switchboard.addConnection(a,tr("Edit","Shortcut group"));
  11.200  	tb->addAction (a);
  11.201  	editMenu->addAction (a);
  11.202  	connect( a, SIGNAL( triggered() ), this, SLOT( editRedo() ) );
  11.203 @@ -532,6 +561,7 @@
  11.204  	a->setStatusTip ( tr( "Copy" ) );
  11.205  	a->setShortcut (Qt::CTRL + Qt::Key_C );			//Copy
  11.206  	a->setEnabled (false);
  11.207 +	switchboard.addConnection(a,tr("Edit","Shortcut group"));
  11.208  	tb->addAction (a);
  11.209  	editMenu->addAction (a);
  11.210  	connect( a, SIGNAL( triggered() ), this, SLOT( editCopy() ) );
  11.211 @@ -542,6 +572,7 @@
  11.212  	a->setShortcut (Qt::CTRL + Qt::Key_X );			//Cut
  11.213  	a->setEnabled (false);
  11.214  	tb->addAction (a);
  11.215 +	switchboard.addConnection(a,tr("Edit","Shortcut group"));
  11.216  	editMenu->addAction (a);
  11.217  	actionCut=a;
  11.218  	connect( a, SIGNAL( triggered() ), this, SLOT( editCut() ) );
  11.219 @@ -552,6 +583,7 @@
  11.220  	a->setShortcut ( Qt::CTRL + Qt::Key_V );		//Paste
  11.221  	a->setEnabled (false);
  11.222  	tb->addAction (a);
  11.223 +	switchboard.addConnection(a,tr("Edit","Shortcut group"));
  11.224  	editMenu->addAction (a);
  11.225  	actionPaste=a;
  11.226  
  11.227 @@ -560,6 +592,7 @@
  11.228  	a->setStatusTip (tr( "Delete Selection" ));
  11.229  	a->setShortcut ( Qt::Key_Delete);				//Delete selection
  11.230  	a->setShortcutContext (Qt::WindowShortcut);
  11.231 +	switchboard.addConnection(a,tr("Edit","Shortcut group"));
  11.232  	addAction (a);
  11.233  	connect( a, SIGNAL( triggered() ), this, SLOT( editDeleteSelection() ) );
  11.234  	actionDelete=a;
  11.235 @@ -568,6 +601,7 @@
  11.236  	a= new QAction(tr( "Add attribute" ), this);
  11.237  	a->setShortcut ( Qt::Key_Q);	
  11.238  	a->setShortcutContext (Qt::WindowShortcut);
  11.239 +	switchboard.addConnection(a,tr("Edit","Shortcut group"));
  11.240  	addAction (a);
  11.241  	connect( a, SIGNAL( triggered() ), this, SLOT( editAddAttribute() ) );
  11.242  	actionAddAttribute= a;
  11.243 @@ -577,6 +611,7 @@
  11.244  	a= new QAction(QPixmap(iconPath+"newmapcenter.png"),tr( "Add mapcenter","Canvas context menu" ), this);
  11.245  	a->setShortcut ( Qt::Key_M);	
  11.246  	a->setShortcutContext (Qt::WindowShortcut);
  11.247 +	switchboard.addConnection(a,tr("Edit","Shortcut group"));
  11.248  	connect( a, SIGNAL( triggered() ), this, SLOT( editAddMapCenter() ) );
  11.249  	//actionListBranches.append(a);
  11.250  	tb->addAction (a);
  11.251 @@ -588,11 +623,13 @@
  11.252  	alt->setStatusTip ( tr( "Add a branch as child of selection" ));
  11.253  	alt->setShortcut (Qt::Key_A);					//Add branch
  11.254  	alt->setShortcutContext (Qt::WindowShortcut);
  11.255 +	switchboard.addConnection(alt,tr("Edit","Shortcut group"));
  11.256  	addAction (alt);
  11.257  	connect( alt, SIGNAL( triggered() ), this, SLOT( editNewBranch() ) );
  11.258  	a = new QAction(QPixmap(iconPath+"newbranch.png"), tr( "Add branch as child","Edit menu" ), this);
  11.259  	a->setStatusTip ( tr( "Add a branch as child of selection" ));
  11.260  	a->setShortcut (Qt::Key_Insert);				//Add branch
  11.261 +	switchboard.addConnection(a,tr("Edit","Shortcut group"));
  11.262  	connect( a, SIGNAL( triggered() ), this, SLOT( editNewBranch() ) );
  11.263  	actionListBranches.append(a);
  11.264  	#if defined (Q_OS_MACX)
  11.265 @@ -610,6 +647,7 @@
  11.266  	a->setStatusTip ( tr( "Add a branch by inserting and making selection its child" ));
  11.267  	a->setShortcut (Qt::ALT + Qt::Key_Insert );		//Insert branch
  11.268  	a->setShortcutContext (Qt::WindowShortcut);
  11.269 +	switchboard.addConnection(a,tr("Edit","Shortcut group"));
  11.270  	addAction (a);
  11.271  	connect( a, SIGNAL( triggered() ), this, SLOT( editNewBranchBefore() ) );
  11.272  	a->setEnabled (false);
  11.273 @@ -619,6 +657,7 @@
  11.274  	a->setStatusTip ( tr( "Add a branch by inserting and making selection its child" ));
  11.275  	a->setShortcut ( Qt::ALT + Qt::Key_A );			//Insert branch
  11.276  	a->setShortcutContext (Qt::WindowShortcut);
  11.277 +	switchboard.addConnection(a,tr("Edit","Shortcut group"));
  11.278  	addAction (a);
  11.279  	connect( a, SIGNAL( triggered() ), this, SLOT( editNewBranchBefore() ) );
  11.280  	actionListBranches.append(a);
  11.281 @@ -628,6 +667,7 @@
  11.282  	a->setStatusTip ( tr( "Add a branch above selection" ));
  11.283  	a->setShortcut (Qt::SHIFT+Qt::Key_Insert );		//Add branch above
  11.284  	a->setShortcutContext (Qt::WindowShortcut);
  11.285 +	switchboard.addConnection(a,tr("Edit","Shortcut group"));
  11.286  	addAction (a);
  11.287  	connect( a, SIGNAL( triggered() ), this, SLOT( editNewBranchAbove() ) );
  11.288  	a->setEnabled (false);
  11.289 @@ -637,6 +677,7 @@
  11.290  	a->setStatusTip ( tr( "Add a branch above selection" ));
  11.291  	a->setShortcut (Qt::SHIFT+Qt::Key_A );			//Add branch above
  11.292  	a->setShortcutContext (Qt::WindowShortcut);
  11.293 +	switchboard.addConnection(a,tr("Edit","Shortcut group"));
  11.294  	addAction (a);
  11.295  	connect( a, SIGNAL( triggered() ), this, SLOT( editNewBranchAbove() ) );
  11.296  	actionListBranches.append(a);
  11.297 @@ -646,6 +687,7 @@
  11.298  	a->setStatusTip ( tr( "Add a branch below selection" ));
  11.299  	a->setShortcut (Qt::CTRL +Qt::Key_Insert );		//Add branch below
  11.300  	a->setShortcutContext (Qt::WindowShortcut);
  11.301 +	switchboard.addConnection(a,tr("Edit","Shortcut group"));
  11.302  	addAction (a);
  11.303  	connect( a, SIGNAL( triggered() ), this, SLOT( editNewBranchBelow() ) );
  11.304  	a->setEnabled (false);
  11.305 @@ -655,6 +697,7 @@
  11.306  	a->setStatusTip ( tr( "Add a branch below selection" ));
  11.307  	a->setShortcut (Qt::CTRL +Qt::Key_A );			// Add branch below
  11.308  	a->setShortcutContext (Qt::WindowShortcut);
  11.309 +	switchboard.addConnection(a,tr("Edit","Shortcut group"));
  11.310  	addAction (a);
  11.311  	connect( a, SIGNAL( triggered() ), this, SLOT( editNewBranchBelow() ) );
  11.312  	actionListBranches.append(a);
  11.313 @@ -663,6 +706,7 @@
  11.314  	a->setStatusTip ( tr( "Move branch up" ) );
  11.315  	a->setShortcut (Qt::Key_PageUp );				// Move branch up
  11.316  	a->setEnabled (false);
  11.317 +	switchboard.addConnection(a,tr("Edit","Shortcut group"));
  11.318  	tb->addAction (a);
  11.319  	editMenu->addAction (a);
  11.320  	connect( a, SIGNAL( triggered() ), this, SLOT( editMoveUp() ) );
  11.321 @@ -673,6 +717,7 @@
  11.322  	a->setStatusTip (tr( "Move branch down" ) );
  11.323  	a->setShortcut ( Qt::Key_PageDown );			// Move branch down
  11.324  	a->setEnabled (false);
  11.325 +	switchboard.addConnection(a,tr("Edit","Shortcut group"));
  11.326  	tb->addAction (a);
  11.327  	editMenu->addAction (a);
  11.328  	actionMoveDown=a;
  11.329 @@ -680,6 +725,7 @@
  11.330  	a = new QAction(QPixmap(), tr( "&Detach","Context menu" ),this);
  11.331  	a->setStatusTip ( tr( "Detach branch and use as mapcenter","Context menu" ) );
  11.332  	a->setShortcut ( Qt::Key_D );					// Detach branch
  11.333 +	switchboard.addConnection(a,tr("Edit","Shortcut group"));
  11.334  	editMenu->addAction (a);
  11.335  	connect( a, SIGNAL( triggered() ), this, SLOT( editDetach() ) );
  11.336  	actionDetach=a;
  11.337 @@ -688,6 +734,7 @@
  11.338  	connect( a, SIGNAL( activated() ), this, SLOT( editSortChildren() ) );
  11.339  	a->setEnabled (true);
  11.340  	a->addTo( tb );
  11.341 +	switchboard.addConnection(a,tr("Edit","Shortcut group"));
  11.342  	editMenu->addAction (a);
  11.343  	actionSortChildren=a;
  11.344  
  11.345 @@ -695,12 +742,14 @@
  11.346  	connect( a, SIGNAL( activated() ), this, SLOT( editSortBackChildren() ) );
  11.347  	a->setEnabled (true);
  11.348  	a->addTo( tb );
  11.349 +	switchboard.addConnection(a,tr("Edit","Shortcut group"));
  11.350  	editMenu->addAction (a);
  11.351  	actionSortBackChildren=a;
  11.352  
  11.353  	alt = new QAction( QPixmap(flagsPath+"flag-scrolled-right.png"), tr( "Scroll branch","Edit menu" ), this);
  11.354  	alt->setShortcut ( Qt::Key_S );					// Scroll branch
  11.355  	alt->setStatusTip (tr( "Scroll branch" )); 
  11.356 +	switchboard.addConnection(alt,tr("Edit","Shortcut group"));
  11.357  	connect( alt, SIGNAL( triggered() ), this, SLOT( editToggleScroll() ) );
  11.358  	#if defined(Q_OS_MACX)
  11.359  		actionToggleScroll=alt;
  11.360 @@ -719,6 +768,7 @@
  11.361  	a = new QAction( QPixmap(), tr( "Expand all branches","Edit menu" ), this);
  11.362  	a->setShortcut ( Qt::SHIFT + Qt::Key_X );		// Expand all branches 
  11.363  	a->setStatusTip (tr( "Expand all branches" )); 
  11.364 +	switchboard.addConnection(a,tr("Edit","Shortcut group"));
  11.365  	connect( a, SIGNAL( triggered() ), this, SLOT( editExpandAll() ) );
  11.366  	actionExpandAll=a;
  11.367  	actionExpandAll->setEnabled (false);
  11.368 @@ -730,6 +780,7 @@
  11.369  
  11.370  	a = new QAction( QPixmap(), tr( "Expand one level","Edit menu" ), this);
  11.371  	a->setShortcut ( Qt::Key_Greater );		// Expand one level in tree editor
  11.372 +	switchboard.addConnection(a,tr("Edit","Shortcut group"));
  11.373  	a->setStatusTip (tr( "Expand one level in tree editor" )); 
  11.374  	connect( a, SIGNAL( triggered() ), this, SLOT( editExpandOneLevel() ) );
  11.375  	a->setEnabled (false);
  11.376 @@ -742,6 +793,7 @@
  11.377  
  11.378  	a = new QAction( QPixmap(), tr( "Collapse one level","Edit menu" ), this);
  11.379  	a->setShortcut ( Qt::Key_Less);			// Collapse one level in tree editor
  11.380 +	switchboard.addConnection(a,tr("Edit","Shortcut group"));
  11.381  	a->setStatusTip (tr( "Collapse one level in tree editor" )); 
  11.382  	connect( a, SIGNAL( triggered() ), this, SLOT( editCollapseOneLevel() ) );
  11.383  	a->setEnabled (false);
  11.384 @@ -754,6 +806,7 @@
  11.385  
  11.386  	a = new QAction( tr( "Unscroll children","Edit menu" ), this);
  11.387  	a->setStatusTip (tr( "Unscroll all scrolled branches in selected subtree" ));
  11.388 +	switchboard.addConnection(a,tr("Edit","Shortcut group"));
  11.389  	editMenu->addAction (a);
  11.390  	connect( a, SIGNAL( triggered() ), this, SLOT( editUnscrollChildren() ) );
  11.391  
  11.392 @@ -762,12 +815,14 @@
  11.393  	a = new QAction( QPixmap(iconPath+"find.png"), tr( "Find...","Edit menu"), this);
  11.394  	a->setStatusTip (tr( "Find" ) );
  11.395  	a->setShortcut (Qt::CTRL + Qt::Key_F );				//Find
  11.396 +	switchboard.addConnection(a,tr("Edit","Shortcut group"));
  11.397  	editMenu->addAction (a);
  11.398  	connect( a, SIGNAL( triggered() ), this, SLOT( editOpenFindWidget() ) );
  11.399  
  11.400  	a = new QAction( tr( "Find duplicate URLs","Edit menu"), this);
  11.401  	//a->setStatusTip (tr( "Find" ) );
  11.402  	a->setShortcut (Qt::SHIFT + Qt::Key_F);				//Find duplicate URLs
  11.403 +	switchboard.addConnection(a,tr("Edit","Shortcut group"));
  11.404  	if (settings.value( "/mainwindow/showTestMenu",false).toBool() ) 
  11.405  		editMenu->addAction (a);
  11.406  	connect( a, SIGNAL( triggered() ), this, SLOT( editFindDuplicateURLs() ) );
  11.407 @@ -776,7 +831,7 @@
  11.408  
  11.409  	a = new QAction( QPixmap(flagsPath+"flag-url.png"), tr( "Open URL","Edit menu" ), this);
  11.410  	a->setShortcut (Qt::SHIFT + Qt::Key_U );
  11.411 -	a->setShortcut (tr( "Open URL" ));
  11.412 +	switchboard.addConnection(a,tr("Edit","Shortcut group"));
  11.413  	tb->addAction (a);
  11.414  	addAction(a);
  11.415  	connect( a, SIGNAL( triggered() ), this, SLOT( editOpenURL() ) );
  11.416 @@ -785,6 +840,7 @@
  11.417  	a = new QAction( tr( "Open URL in new tab","Edit menu" ), this);
  11.418  	a->setStatusTip (tr( "Open URL in new tab" ));
  11.419  	//a->setShortcut (Qt::CTRL+Qt::Key_U );
  11.420 +	switchboard.addConnection(a,tr("Edit","Shortcut group"));
  11.421  	addAction(a);
  11.422  	connect( a, SIGNAL( triggered() ), this, SLOT( editOpenURLTab() ) );
  11.423  	actionOpenURLTab=a;
  11.424 @@ -792,6 +848,7 @@
  11.425  	a = new QAction( tr( "Open all URLs in subtree (including scrolled branches)","Edit menu" ), this);
  11.426  	a->setStatusTip (tr( "Open all URLs in subtree (including scrolled branches)" ));
  11.427  	a->setShortcut ( Qt::CTRL + Qt::Key_U );
  11.428 +	switchboard.addConnection(a,tr("Edit","Shortcut group"));
  11.429  	addAction(a);
  11.430  	actionListBranches.append(a);
  11.431  	connect( a, SIGNAL( triggered() ), this, SLOT( editOpenMultipleVisURLTabs() ) );
  11.432 @@ -799,6 +856,7 @@
  11.433  
  11.434  	a = new QAction( tr( "Open all URLs in subtree","Edit menu" ), this);
  11.435  	a->setStatusTip (tr( "Open all URLs in subtree" ));
  11.436 +	switchboard.addConnection(a,tr("Edit","Shortcut group"));
  11.437  	addAction(a);
  11.438  	actionListBranches.append(a);
  11.439  	connect( a, SIGNAL( triggered() ), this, SLOT( editOpenMultipleURLTabs() ) );
  11.440 @@ -808,6 +866,7 @@
  11.441  	a->setStatusTip ( tr( "Edit URL" ) );
  11.442  	a->setShortcut ( Qt::Key_U );
  11.443  	a->setShortcutContext (Qt::WindowShortcut);
  11.444 +	switchboard.addConnection(a,tr("Edit","Shortcut group"));
  11.445  	actionListBranches.append(a);
  11.446  	addAction(a);
  11.447  	connect( a, SIGNAL( triggered() ), this, SLOT( editURL() ) );
  11.448 @@ -817,6 +876,7 @@
  11.449  	a->setStatusTip ( tr( "Edit local URL" ) );
  11.450  	//a->setShortcut (Qt::SHIFT +  Qt::Key_U );
  11.451  	a->setShortcutContext (Qt::WindowShortcut);
  11.452 +	switchboard.addConnection(a,tr("Edit","Shortcut group"));
  11.453  	actionListBranches.append(a);
  11.454  	addAction(a);
  11.455  	connect( a, SIGNAL( triggered() ), this, SLOT( editLocalURL() ) );
  11.456 @@ -825,6 +885,7 @@
  11.457  	a = new QAction( tr( "Use heading for URL","Edit menu" ), this);
  11.458  	a->setStatusTip ( tr( "Use heading of selected branch as URL" ));
  11.459  	a->setEnabled (false);
  11.460 +	switchboard.addConnection(a,tr("Edit","Shortcut group"));
  11.461  	actionListBranches.append(a);
  11.462  	connect( a, SIGNAL( triggered() ), this, SLOT( editHeading2URL() ) );
  11.463  	actionHeading2URL=a;
  11.464 @@ -835,6 +896,7 @@
  11.465  	actionListBranches.append(a);
  11.466  	a->setShortcut ( Qt::Key_B );
  11.467  	a->setShortcutContext (Qt::WindowShortcut);
  11.468 +	switchboard.addConnection(a,tr("Edit","Shortcut group"));
  11.469  	addAction(a);
  11.470  	connect( a, SIGNAL( triggered() ), this, SLOT( editBugzilla2URL() ) );
  11.471  	actionBugzilla2URL=a;
  11.472 @@ -845,6 +907,7 @@
  11.473  	actionListBranches.append(a);
  11.474  	a->setShortcut ( Qt::Key_B + Qt::SHIFT);
  11.475  	a->setShortcutContext (Qt::WindowShortcut);
  11.476 +	switchboard.addConnection(a,tr("Edit","Shortcut group"));
  11.477  	addAction(a);
  11.478  	connect( a, SIGNAL( triggered() ), this, SLOT( getBugzillaData() ) );
  11.479  	actionGetBugzillaData=a;
  11.480 @@ -852,6 +915,7 @@
  11.481  	a = new QAction(tr( "Create URL to Novell FATE","Edit menu" ), this);
  11.482  	a->setStatusTip ( tr( "Create URL to Novell FATE" ));
  11.483  	a->setEnabled (false);
  11.484 +	switchboard.addConnection(a,tr("Edit","Shortcut group"));
  11.485  	actionListBranches.append(a);
  11.486  	connect( a, SIGNAL( triggered() ), this, SLOT( editFATE2URL() ) );
  11.487  	actionFATE2URL=a;
  11.488 @@ -860,12 +924,14 @@
  11.489  	a->setStatusTip ( tr( "Jump to another vym map, if needed load it first" ));
  11.490  	tb->addAction (a);
  11.491  	a->setEnabled (false);
  11.492 +	switchboard.addConnection(a,tr("Edit","Shortcut group"));
  11.493  	connect( a, SIGNAL( triggered() ), this, SLOT( editOpenVymLink() ) );
  11.494  	actionOpenVymLink=a;
  11.495  
  11.496  	a = new QAction(QPixmap(), tr( "Open all vym links in subtree","Edit menu" ), this);
  11.497  	a->setStatusTip ( tr( "Open all vym links in subtree" ));
  11.498  	a->setEnabled (false);
  11.499 +	switchboard.addConnection(a,tr("Edit","Shortcut group"));
  11.500  	actionListBranches.append(a);
  11.501  	connect( a, SIGNAL( triggered() ), this, SLOT( editOpenMultipleVymLinks() ) );
  11.502  	actionOpenMultipleVymLinks=a;
  11.503 @@ -874,6 +940,7 @@
  11.504  	a = new QAction(tr( "Edit vym link...","Edit menu" ), this);
  11.505  	a->setEnabled (false);
  11.506  	a->setStatusTip ( tr( "Edit link to another vym map" ));
  11.507 +	switchboard.addConnection(a,tr("Edit","Shortcut group"));
  11.508  	connect( a, SIGNAL( triggered() ), this, SLOT( editVymLink() ) );
  11.509  	actionListBranches.append(a);
  11.510  	actionVymLink=a;
  11.511 @@ -881,6 +948,7 @@
  11.512  	a = new QAction(tr( "Delete vym link","Edit menu" ),this);
  11.513  	a->setStatusTip ( tr( "Delete link to another vym map" ));
  11.514  	a->setEnabled (false);
  11.515 +	switchboard.addConnection(a,tr("Edit","Shortcut group"));
  11.516  	connect( a, SIGNAL( triggered() ), this, SLOT( editDeleteVymLink() ) );
  11.517  	actionDeleteVymLink=a;
  11.518  
  11.519 @@ -890,6 +958,7 @@
  11.520  	a->setToggleAction(true);
  11.521  	tb->addAction (a);
  11.522  	a->setEnabled (false);
  11.523 +	switchboard.addConnection(a,tr("Edit","Shortcut group"));
  11.524  	connect( a, SIGNAL( triggered() ), this, SLOT( editToggleHideExport() ) );
  11.525  	actionToggleHideExport=a;
  11.526  
  11.527 @@ -899,6 +968,7 @@
  11.528  	actionListBranches.append(a);
  11.529  	a->setShortcut ( Qt::Key_T );	// Add timestamp
  11.530  	a->setShortcutContext (Qt::WindowShortcut);
  11.531 +	switchboard.addConnection(a,tr("Edit","Shortcut group"));
  11.532  	addAction(a);
  11.533  	connect( a, SIGNAL( triggered() ), this, SLOT( editAddTimestamp() ) );
  11.534  	actionAddTimestamp=a;
  11.535 @@ -906,6 +976,7 @@
  11.536  	a = new QAction(tr( "Edit Map Info...","Edit menu" ),this);
  11.537  	a->setStatusTip ( tr( "Edit Map Info" ));
  11.538  	a->setEnabled (true);
  11.539 +	switchboard.addConnection(a,tr("Edit","Shortcut group"));
  11.540  	connect( a, SIGNAL( triggered() ), this, SLOT( editMapInfo() ) );
  11.541  	actionMapInfo=a;
  11.542  
  11.543 @@ -914,12 +985,14 @@
  11.544  	a->setStatusTip (tr( "Add map at selection" ));
  11.545  	connect( a, SIGNAL( triggered() ), this, SLOT( editImportAdd() ) );
  11.546  	a->setEnabled (false);
  11.547 +	switchboard.addConnection(a,tr("Edit","Shortcut group"));
  11.548  	actionListBranches.append(a);
  11.549  	actionImportAdd=a;
  11.550  
  11.551  	// Import at selection (replacing selection)
  11.552  	a = new QAction( tr( "Add map (replace)","Edit menu" ), this);
  11.553  	a->setStatusTip (tr( "Replace selection with map" ));
  11.554 +	switchboard.addConnection(a,tr("Edit","Shortcut group"));
  11.555  	connect( a, SIGNAL( triggered() ), this, SLOT( editImportReplace() ) );
  11.556  	a->setEnabled (false);
  11.557  	actionListBranches.append(a);
  11.558 @@ -930,6 +1003,7 @@
  11.559  	a->setStatusTip (tr( "Save selection" ));
  11.560  	connect( a, SIGNAL( triggered() ), this, SLOT( editSaveBranch() ) );
  11.561  	a->setEnabled (false);
  11.562 +	switchboard.addConnection(a,tr("Edit","Shortcut group"));
  11.563  	actionListBranches.append(a);
  11.564  	actionSaveBranch=a;
  11.565  
  11.566 @@ -939,6 +1013,7 @@
  11.567  	a->setShortcut (Qt::ALT + Qt::Key_Delete );
  11.568  	connect( a, SIGNAL( triggered() ), this, SLOT( editDeleteKeepChildren() ) );
  11.569  	a->setEnabled (false);
  11.570 +	switchboard.addConnection(a,tr("Edit","Shortcut group"));
  11.571  	addAction (a);
  11.572  	actionListBranches.append(a);
  11.573  	actionDeleteKeepChildren=a;
  11.574 @@ -947,6 +1022,7 @@
  11.575  	a = new QAction( tr( "Remove children","Edit menu" ), this);
  11.576  	a->setStatusTip (tr( "Remove children of branch" ));
  11.577  	a->setShortcut (Qt::SHIFT + Qt::Key_Delete );
  11.578 +	switchboard.addConnection(a,tr("Edit","Shortcut group"));
  11.579  	connect( a, SIGNAL( triggered() ), this, SLOT( editDeleteChildren() ) );
  11.580  	a->setEnabled (false);
  11.581  	actionListBranches.append(a);
  11.582 @@ -954,6 +1030,7 @@
  11.583  
  11.584  	a = new QAction( tr( "Add Image...","Edit menu" ), this);
  11.585  	a->setStatusTip (tr( "Add Image" ));
  11.586 +	switchboard.addConnection(a,tr("Edit","Shortcut group"));
  11.587  	connect( a, SIGNAL( triggered() ), this, SLOT( editLoadImage() ) );
  11.588  	actionLoadImage=a;
  11.589  
  11.590 @@ -962,6 +1039,7 @@
  11.591  	a->setShortcut ( Qt::CTRL + Qt::Key_I );		//Property window
  11.592  	a->setShortcutContext (Qt::WindowShortcut);
  11.593  	a->setToggleAction (true);
  11.594 +	switchboard.addConnection(a,tr("View shortcuts","Shortcut group"));
  11.595  	addAction (a);
  11.596  	connect( a, SIGNAL( triggered() ), this, SLOT( windowToggleProperty() ) );
  11.597  	actionViewTogglePropertyWindow=a;
  11.598 @@ -1090,34 +1168,36 @@
  11.599  	tb->setObjectName ("viewTB");
  11.600  	QMenu *viewMenu = menuBar()->addMenu ( tr( "&View" ));
  11.601  
  11.602 -	Switchboard switchboard;	//FIXME-2 testing...
  11.603  
  11.604  	QAction *a;
  11.605  	a = new QAction(QPixmap(iconPath+"viewmag-reset.png"), tr( "reset Zoom","View action" ), this);
  11.606  	a->setStatusTip ( tr( "Zoom reset" ) );
  11.607  	a->setShortcut (Qt::CTRL + Qt::Key_0);	// Reset zoom
  11.608 -	switchboard.addConnection(a,"CTRL+0");
  11.609 +	switchboard.addConnection(a,tr("View shortcuts","Shortcut group"));
  11.610  	a->addTo( tb );
  11.611  	viewMenu->addAction (a);
  11.612  	connect( a, SIGNAL( triggered() ), this, SLOT(viewZoomReset() ) );
  11.613  
  11.614  	a = new QAction( QPixmap(iconPath+"viewmag+.png"), tr( "Zoom in","View action" ), this);
  11.615  	a->setStatusTip (tr( "Zoom in" ));
  11.616 -	switchboard.addConnection(a,"CTRL++");
  11.617 +	a->setShortcut(Qt::CTRL + Qt::Key_Plus);
  11.618 +	switchboard.addConnection(a,tr("View shortcuts","Shortcut group"));
  11.619  	a->addTo( tb );
  11.620  	viewMenu->addAction (a);
  11.621  	connect( a, SIGNAL( triggered() ), this, SLOT(viewZoomIn() ) );
  11.622  
  11.623  	a = new QAction( QPixmap(iconPath+"viewmag-.png"), tr( "Zoom out","View action" ), this);
  11.624  	a->setStatusTip (tr( "Zoom out" ));
  11.625 -	switchboard.addConnection(a,"CTRL+-");
  11.626 +	a->setShortcut(Qt::CTRL + Qt::Key_Minus);
  11.627 +	switchboard.addConnection(a,tr("View shortcuts","Shortcut group"));
  11.628  	a->addTo( tb );
  11.629  	viewMenu->addAction (a);
  11.630  	connect( a, SIGNAL( triggered() ), this, SLOT( viewZoomOut() ) );
  11.631  
  11.632  	a = new QAction( QPixmap(iconPath+"viewshowsel.png"), tr( "Show selection","View action" ), this);
  11.633  	a->setStatusTip (tr( "Show selection" ));
  11.634 -	switchboard.addConnection(a,".");
  11.635 +	a->setShortcut(Qt::CTRL + Qt::Key_Period);
  11.636 +	switchboard.addConnection(a,tr("View shortcuts","Shortcut group"));
  11.637  	a->addTo( tb );
  11.638  	viewMenu->addAction (a);
  11.639  	connect( a, SIGNAL( triggered() ), this, SLOT( viewCenter() ) );
  11.640 @@ -1127,6 +1207,7 @@
  11.641  	a = new QAction(QPixmap(flagsPath+"flag-note.png"), tr( "Show Note Editor","View action" ),this);
  11.642  	a->setStatusTip ( tr( "Show Note Editor" ));
  11.643  	a->setShortcut ( Qt::CTRL + Qt::Key_E );	// Toggle Note Editor
  11.644 +	switchboard.addConnection(a,tr("View shortcuts","Shortcut group"));
  11.645  	a->setToggleAction(true);
  11.646  	a->addTo( tb );
  11.647  	viewMenu->addAction (a);
  11.648 @@ -1135,7 +1216,8 @@
  11.649  
  11.650  	a = new QAction(QPixmap(), tr( "Show tree editor","View action" ),this);
  11.651  	a->setStatusTip ( tr( "Show tree editor" ));
  11.652 -	a->setShortcut ( Qt::CTRL + Qt::Key_T );	// Toggle Note Editor // FIXME-3 originally: color subtree
  11.653 +	a->setShortcut ( Qt::CTRL + Qt::Key_T );	// Toggle Tree Editor // FIXME-3 originally: color subtree
  11.654 +	switchboard.addConnection(a,tr("View shortcuts","Shortcut group"));
  11.655  	a->setToggleAction(true);
  11.656  	a->addTo( tb );
  11.657  	viewMenu->addAction (a);
  11.658 @@ -1145,6 +1227,7 @@
  11.659  	a = new QAction(QPixmap(iconPath+"history.png"),  tr( "History Window","View action" ),this );
  11.660  	a->setStatusTip ( tr( "Show History Window" ));
  11.661  	a->setShortcut ( Qt::CTRL + Qt::Key_H  );	// Toggle history window
  11.662 +	switchboard.addConnection(a,tr("View shortcuts","Shortcut group"));
  11.663  	a->setToggleAction(true);
  11.664  	a->addTo( tb );
  11.665  	viewMenu->addAction (a);
  11.666 @@ -1159,6 +1242,7 @@
  11.667  	a->setStatusTip ( tr( "Antialiasing" ));
  11.668  	a->setToggleAction(true);
  11.669  	a->setChecked (settings.value("/mainwindow/view/AntiAlias",true).toBool());
  11.670 +	switchboard.addConnection(a,tr("View shortcuts","Shortcut group"));
  11.671  	viewMenu->addAction (a);
  11.672  	connect( a, SIGNAL( triggered() ), this, SLOT(windowToggleAntiAlias() ) );
  11.673  	actionViewToggleAntiAlias=a;
  11.674 @@ -1167,6 +1251,7 @@
  11.675  	a->setStatusTip (a->text());
  11.676  	a->setToggleAction(true);
  11.677  	a->setChecked (settings.value("/mainwindow/view/SmoothPixmapTransformation",true).toBool());
  11.678 +	switchboard.addConnection(a,tr("View shortcuts","Shortcut group"));
  11.679  	viewMenu->addAction (a);
  11.680  	connect( a, SIGNAL( triggered() ), this, SLOT(windowToggleSmoothPixmap() ) );
  11.681  	actionViewToggleSmoothPixmapTransform=a;
  11.682 @@ -1174,16 +1259,16 @@
  11.683  	a = new QAction(tr( "Next Map","View action" ), this);
  11.684  	a->setStatusTip (a->text());
  11.685  	a->setShortcut (Qt::ALT + Qt::Key_N );
  11.686 +	switchboard.addConnection(a,tr("View shortcuts","Shortcut group"));
  11.687  	viewMenu->addAction (a);
  11.688  	connect( a, SIGNAL( triggered() ), this, SLOT(windowNextEditor() ) );
  11.689  
  11.690  	a = new QAction (tr( "Previous Map","View action" ), this );
  11.691  	a->setStatusTip (a->text());
  11.692  	a->setShortcut (Qt::ALT + Qt::Key_P );
  11.693 +	switchboard.addConnection(a,tr("View shortcuts","Shortcut group"));
  11.694  	viewMenu->addAction (a);
  11.695  	connect( a, SIGNAL( triggered() ), this, SLOT(windowPreviousEditor() ) );
  11.696 -
  11.697 -	if (debug) switchboard.print();
  11.698  }
  11.699  
  11.700  // Mode Actions
  11.701 @@ -1199,6 +1284,7 @@
  11.702  	actionGroupModModes->setExclusive (true);
  11.703  	a= new QAction( QPixmap(iconPath+"modecolor.png"), tr( "Use modifier to color branches","Mode modifier" ), actionGroupModModes);
  11.704  	a->setShortcut (Qt::Key_J);
  11.705 +	switchboard.addConnection(a,tr("Modes","Shortcut group"));
  11.706  	a->setStatusTip ( tr( "Use modifier to color branches" ));
  11.707  	a->setToggleAction(true);
  11.708  	a->addTo (tb);
  11.709 @@ -1207,6 +1293,7 @@
  11.710  
  11.711  	a= new QAction( QPixmap(iconPath+"modecopy.png"), tr( "Use modifier to copy","Mode modifier" ), actionGroupModModes );
  11.712  	a->setShortcut( Qt::Key_K); 
  11.713 +	switchboard.addConnection(a,tr("Modes","Shortcut group"));
  11.714  	a->setStatusTip( tr( "Use modifier to copy" ));
  11.715  	a->setToggleAction(true);
  11.716  	a->addTo (tb);
  11.717 @@ -1214,6 +1301,7 @@
  11.718  
  11.719  	a= new QAction(QPixmap(iconPath+"modelink.png"), tr( "Use modifier to draw xLinks","Mode modifier" ), actionGroupModModes );
  11.720  	a->setShortcut (Qt::Key_L);
  11.721 +	switchboard.addConnection(a,tr("Modes","Shortcut group"));
  11.722  	a->setStatusTip( tr( "Use modifier to draw xLinks" ));
  11.723  	a->setToggleAction(true);
  11.724  	a->addTo (tb);
  11.725 @@ -1458,12 +1546,14 @@
  11.726  	a = new QAction(  "Start TCPserver for MapEditor",this);
  11.727  	//a->setStatusTip ( "Set application to open pdf files"));
  11.728  	//a->setShortcut ( Qt::ALT + Qt::Key_T );		//New TCP server
  11.729 +	switchboard.addConnection(a,tr("Network shortcuts","Shortcut group"));
  11.730  	connect( a, SIGNAL( triggered() ), this, SLOT( networkStartServer() ) );
  11.731  	netMenu->addAction (a);
  11.732  
  11.733  	a = new QAction(  "Connect MapEditor to server",this);
  11.734  	//a->setStatusTip ( "Set application to open pdf files"));
  11.735  	a->setShortcut ( Qt::ALT + Qt::Key_C );		// Connect to server
  11.736 +	switchboard.addConnection(a,tr("Network shortcuts","Shortcut group"));
  11.737  	connect( a, SIGNAL( triggered() ), this, SLOT( networkConnect() ) );
  11.738  	netMenu->addAction (a);
  11.739  }
  11.740 @@ -1582,17 +1672,20 @@
  11.741  	a = new QAction( "Test function 1" , this);
  11.742  	a->setStatusTip( "Call test function 1" );
  11.743  	a->setShortcut (Qt::SHIFT + Qt::Key_T);	// Test function 1  
  11.744 +	switchboard.addConnection(a,tr("Test shortcuts","Shortcut group"));
  11.745  	testMenu->addAction (a);
  11.746  	connect( a, SIGNAL( triggered() ), this, SLOT( testFunction1() ) );
  11.747  
  11.748  	a = new QAction( "Test function 2" , this);
  11.749  	a->setStatusTip( "Call test function 2" );
  11.750  	a->setShortcut (Qt::ALT + Qt::Key_T);	// Test function 2
  11.751 +	switchboard.addConnection(a,tr("Test shortcuts","Shortcut group"));
  11.752  	testMenu->addAction (a);
  11.753  	connect( a, SIGNAL( triggered() ), this, SLOT( testFunction2() ) );
  11.754  
  11.755  	a = new QAction( "Command" , this);
  11.756  	a->setStatusTip( "Enter command to call in editor" );
  11.757 +	switchboard.addConnection(a,tr("Test shortcuts","Shortcut group"));
  11.758  	connect( a, SIGNAL( triggered() ), this, SLOT( testCommand() ) );
  11.759  	testMenu->addAction (a);
  11.760  }
  11.761 @@ -1605,11 +1698,13 @@
  11.762  	QAction *a;
  11.763  	a = new QAction(  tr( "Open VYM Documentation (pdf) ","Help action" ), this );
  11.764  	a->setStatusTip( tr( "Open VYM Documentation (pdf)" ));
  11.765 +	switchboard.addConnection(a,tr("Help shortcuts","Shortcut group"));
  11.766  	connect( a, SIGNAL( triggered() ), this, SLOT( helpDoc() ) );
  11.767  	helpMenu->addAction (a);
  11.768  
  11.769  	a = new QAction(  tr( "Open VYM example maps ","Help action" ), this );
  11.770  	a->setStatusTip( tr( "Open VYM example maps " ));
  11.771 +	switchboard.addConnection(a,tr("Help shortcuts","Shortcut group"));
  11.772  	connect( a, SIGNAL( triggered() ), this, SLOT( helpDemo() ) );
  11.773  	helpMenu->addAction (a);
  11.774  
  11.775 @@ -1758,6 +1853,7 @@
  11.776  		macroActions[i] = new QAction(this);
  11.777  		macroActions[i]->setData(i);
  11.778  		addAction (macroActions[i]);
  11.779 +		//switchboard.addConnection(macroActions[i],tr("Macro shortcuts","Shortcut group"));
  11.780  		connect(macroActions[i], SIGNAL(triggered()),
  11.781  				this, SLOT(callMacro()));
  11.782  	}			
    12.1 --- a/mainwindow.h	Fri Feb 19 13:47:03 2010 +0000
    12.2 +++ b/mainwindow.h	Thu Feb 25 11:03:52 2010 +0000
    12.3 @@ -11,6 +11,7 @@
    12.4  #include "file.h"
    12.5  #include "historywindow.h"
    12.6  #include "mapeditor.h"
    12.7 +#include "shortcuts.h"
    12.8  #include "simplescripteditor.h"
    12.9  #include "texteditor.h"
   12.10  #include "vymview.h"
   12.11 @@ -280,6 +281,8 @@
   12.12      QAction *macroActions[12];
   12.13  	QStringList macro;
   12.14  
   12.15 +	Switchboard switchboard;
   12.16 +
   12.17  	QAction* actionFileNewCopy;
   12.18  	QAction* actionFileSave;
   12.19  	QAction* actionFilePrint;
    13.1 --- a/mapeditor.cpp	Fri Feb 19 13:47:03 2010 +0000
    13.2 +++ b/mapeditor.cpp	Thu Feb 25 11:03:52 2010 +0000
    13.3 @@ -1527,7 +1527,10 @@
    13.4  				}
    13.5  
    13.6  				// Draw the original link, before selection was moved around
    13.7 -				if (settings.value("/animation/use",true).toBool() && seli->depth()>1) 
    13.8 +				if (settings.value("/animation/use",true).toBool() 
    13.9 +					&& seli->depth()>1
   13.10 +//					&& distance (lmosel->getRelPos(),movingObj_orgRelPos)<3
   13.11 +				) 
   13.12  				{
   13.13  					lmosel->setRelPos();	// calc relPos first for starting point
   13.14  					
    14.1 --- a/shortcuts.cpp	Fri Feb 19 13:47:03 2010 +0000
    14.2 +++ b/shortcuts.cpp	Thu Feb 25 11:03:52 2010 +0000
    14.3 @@ -1,8 +1,11 @@
    14.4 -#include "shortcuts.h"
    14.5 +#include <QDebug>
    14.6 +#include <QMultiMap>
    14.7  
    14.8  #include <iostream>
    14.9  using namespace std;
   14.10  
   14.11 +#include "shortcuts.h"
   14.12 +
   14.13  /////////////////////////////////////////////////////////////////
   14.14  // Shortcut
   14.15  /////////////////////////////////////////////////////////////////
   14.16 @@ -17,20 +20,24 @@
   14.17  {
   14.18  }
   14.19  
   14.20 -void Switchboard::addConnection (QAction *a, const QString &desc)
   14.21 +void Switchboard::addConnection (QAction *a, const QString &group)
   14.22  {	
   14.23 -	QKeySequence ks=QKeySequence::fromString (desc);
   14.24 -	actions.append (a);
   14.25 -	if (!desc.isEmpty()) keys.append (new QKeySequence (ks));
   14.26 -	if (a) a->setShortcut (ks);
   14.27 +	actions.insert(group,a);
   14.28  }
   14.29  
   14.30  void Switchboard::print ()
   14.31  {
   14.32 -	for (int i=0;i<actions.size();++i)
   14.33 +	QString g;
   14.34 +	foreach (g,actions.uniqueKeys())
   14.35  	{
   14.36 -		cout <<actions.at(i)->shortcut().toString().toStdString();
   14.37 -		cout << "  Action: " <<actions.at(i)->text().toStdString();
   14.38 +		cout <<"Group: "<<g.toStdString()<<endl;
   14.39 +		QList <QAction*> values=actions.values(g);
   14.40 +		for (int i=0;i<values.size();++i)
   14.41 +		{
   14.42 +			cout<<QString ("  %1: %2") 
   14.43 +				.arg(values.at(i)->text().left(30),30)
   14.44 +				.arg(values.at(i)->shortcut().toString()).toStdString()<<endl;
   14.45 +		}
   14.46  		cout <<endl;
   14.47  	}
   14.48  }
    15.1 --- a/shortcuts.h	Fri Feb 19 13:47:03 2010 +0000
    15.2 +++ b/shortcuts.h	Thu Feb 25 11:03:52 2010 +0000
    15.3 @@ -22,11 +22,9 @@
    15.4  public:
    15.5      Switchboard ();
    15.6  	void addConnection(QAction *a,const QString &s);
    15.7 -//	void addFunction (Function,
    15.8  	void print();
    15.9  protected:  
   15.10 -	QList <QKeySequence*> keys;
   15.11 -	QList <QAction*> actions;
   15.12 +	QMultiMap <QString,QAction*> actions;
   15.13  };
   15.14  
   15.15  #endif
    16.1 --- a/version.h	Fri Feb 19 13:47:03 2010 +0000
    16.2 +++ b/version.h	Thu Feb 25 11:03:52 2010 +0000
    16.3 @@ -7,7 +7,7 @@
    16.4  #define __VYM_VERSION "1.13.0"
    16.5  //#define __VYM_CODENAME "Codename: RC-1"
    16.6  #define __VYM_CODENAME "Codename: development version, not for production!"
    16.7 -#define __VYM_BUILD_DATE "2010-02-19"
    16.8 +#define __VYM_BUILD_DATE "2010-02-22"
    16.9  
   16.10  
   16.11  bool checkVersion(const QString &);
    17.1 --- a/vym.pro	Fri Feb 19 13:47:03 2010 +0000
    17.2 +++ b/vym.pro	Thu Feb 25 11:03:52 2010 +0000
    17.3 @@ -44,6 +44,8 @@
    17.4  	bugagent.h \
    17.5  	editxlinkdialog.h \
    17.6  	exportoofiledialog.h \
    17.7 +	exporthtmldialog.h\
    17.8 +	exporthtmldialog.h\
    17.9  	exportxhtmldialog.h\
   17.10  	exports.h \
   17.11  	extrainfodialog.h \
   17.12 @@ -111,6 +113,7 @@
   17.13  	editxlinkdialog.cpp \
   17.14  	exportoofiledialog.cpp \
   17.15  	exports.cpp \
   17.16 +	exporthtmldialog.cpp \
   17.17  	exportxhtmldialog.cpp \
   17.18  	extrainfodialog.cpp \
   17.19  	file.cpp \
   17.20 @@ -165,6 +168,7 @@
   17.21  FORMS = \
   17.22  	attributewidget.ui \
   17.23  	branchpropwindow.ui \
   17.24 +	exporthtmldialog.ui \
   17.25  	exportxhtmldialog.ui \
   17.26  	extrainfodialog.ui \
   17.27  	editxlinkdialog.ui \
    18.1 --- a/vymmodel.cpp	Fri Feb 19 13:47:03 2010 +0000
    18.2 +++ b/vymmodel.cpp	Thu Feb 25 11:03:52 2010 +0000
    18.3 @@ -9,6 +9,7 @@
    18.4  #include "bugagent.h"
    18.5  #include "editxlinkdialog.h"
    18.6  #include "exports.h"
    18.7 +#include "exporthtmldialog.h"
    18.8  #include "exportxhtmldialog.h"
    18.9  #include "file.h"
   18.10  #include "geometry.h"		// for addBBox
   18.11 @@ -4259,7 +4260,7 @@
   18.12  
   18.13  void VymModel::exportHTML (const QString &dir, bool askForName)	//FIXME-2 own dialogue missing and also option to save settings in map
   18.14  {
   18.15 -	ExportXHTMLDialog dia(NULL);	
   18.16 +	ExportHTMLDialog dia(NULL);	
   18.17  	dia.setFilePath (filePath );
   18.18  	dia.setMapName (mapName );
   18.19  	dia.readSettings();
   18.20 @@ -4297,11 +4298,11 @@
   18.21  
   18.22  		ExportHTML ex (this);
   18.23  		ex.setFile (d.path()+"/"+mapName+".html");
   18.24 -		cout << "VM::exportHTML  writing "<<ex.getFile().toStdString()<<endl;
   18.25 +		//qDebug()<< "VM::exportHTML  writing "<<ex.getFile();
   18.26 +		ex.setCSSPath(dia.getCSSPath() );
   18.27  		ex.doExport();
   18.28  		setExportMode (false);
   18.29  
   18.30 -		//exportXML (dia.getDir(),false );
   18.31  		//dia.doExport(mapName );
   18.32  		//if (dia.hasChanged()) setChanged();
   18.33  
   18.34 @@ -4694,7 +4695,7 @@
   18.35  }
   18.36  
   18.37  
   18.38 -void VymModel::animate()
   18.39 +void VymModel::animate()	//FIXME-2 animation causes flicker after cut/undo cut ?!?
   18.40  {
   18.41  	animationTimer->stop();
   18.42  	BranchObj *bo;
   18.43 @@ -4723,6 +4724,7 @@
   18.44  
   18.45  void VymModel::startAnimation(BranchObj *bo, const QPointF &start, const QPointF &dest)
   18.46  {
   18.47 +	qDebug()<<"Start animation for "<<bo->getTreeItem()<<getHeading();
   18.48  	if (start==dest) return;
   18.49  	if (bo && bo->getTreeItem()->depth()>0) 
   18.50  	{