XHTML export obsoleted by HTML export
authorinsilmaril
Fri Apr 09 14:16:02 2010 +0000 (2010-04-09)
changeset 845b98c1793bb8b
parent 844 c48bb42fb977
child 846 f0fe7c36ec5c
XHTML export obsoleted by HTML export
branchitem.cpp
exportxhtmldialog.cpp
exportxhtmldialog.h
highlighter.cpp
mainwindow.cpp
mainwindow.h
version.h
vym.changelog
vym.pro
vymmodel.cpp
vymmodel.h
     1.1 --- a/branchitem.cpp	Wed Apr 07 10:45:24 2010 +0000
     1.2 +++ b/branchitem.cpp	Fri Apr 09 14:16:02 2010 +0000
     1.3 @@ -101,13 +101,6 @@
     1.4  	} else
     1.5  		areaAttr="";
     1.6  	
     1.7 -	// Provide an ID for a branch makes export to XHTML easier
     1.8 -	QString idAttr;
     1.9 -	if (xlinkCount()>0)
    1.10 -		idAttr=attribut ("id",model->getSelectString(this)); 
    1.11 -	else
    1.12 -		idAttr="";
    1.13 -
    1.14  	QString elementName;
    1.15  	if (parentItem==rootItem)
    1.16  		elementName="mapcenter";
    1.17 @@ -119,7 +112,6 @@
    1.18  		+getGeneralAttr()
    1.19  		+scrolledAttr 
    1.20  	//	+areaAttr	// FIXME-4 not needed anymore. Wait until end of 2010 before removing...
    1.21 -		+idAttr 
    1.22  		+getIncludeImageAttr() 
    1.23  		);
    1.24      incIndent();
     2.1 --- a/exportxhtmldialog.cpp	Wed Apr 07 10:45:24 2010 +0000
     2.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.3 @@ -1,418 +0,0 @@
     2.4 -#include "exportxhtmldialog.h"
     2.5 -
     2.6 -#include <QFileDialog>
     2.7 -#include <QMessageBox>
     2.8 -#include <QTextStream>
     2.9 -
    2.10 -#include "options.h"
    2.11 -#include "settings.h"
    2.12 -
    2.13 -
    2.14 -extern Options options;
    2.15 -extern QDir vymBaseDir;
    2.16 -extern Settings settings;
    2.17 -extern bool debug;
    2.18 -
    2.19 -ExportXHTMLDialog::ExportXHTMLDialog(QWidget* parent) : QDialog(parent)
    2.20 -{
    2.21 -    ui.setupUi(this);
    2.22 -
    2.23 -	filepath="";
    2.24 -	settingsChanged=false;
    2.25 -	scriptProc=new Process;
    2.26 -
    2.27 -    // signals and slots connections
    2.28 -    connect(ui.browseExportDirButton, SIGNAL(pressed()), this, SLOT(browseDirectoryPressed()));
    2.29 -    connect(ui.outputButton, SIGNAL(toggled(bool)), this, SLOT(outputButtonPressed(bool)));
    2.30 -    connect(ui.browseXSLButton, SIGNAL(pressed()), this, SLOT(browseXSLPressed()));
    2.31 -    connect(ui.browseCSSButton, SIGNAL(pressed()), this, SLOT(browseCSSPressed()));
    2.32 -    connect(ui.imageButton, SIGNAL(toggled(bool)), this, SLOT(imageButtonPressed(bool)));
    2.33 -    connect(ui.textColorButton, SIGNAL(toggled(bool)), this, SLOT(textcolorButtonPressed(bool)));
    2.34 -    connect(ui.lineEditDir, SIGNAL(textChanged(const QString&)), this, SLOT(dirChanged()));
    2.35 -    connect(ui.lineEditCSS, SIGNAL(textChanged(const QString&)), this, SLOT(cssChanged()));
    2.36 -    connect(ui.lineEditXSL, SIGNAL(textChanged(const QString&)), this, SLOT(xslChanged()));
    2.37 -    connect(ui.warningsButton, SIGNAL(toggled(bool)), this, SLOT(warningsButtonPressed(bool)));
    2.38 -    connect(ui.saveSettingsInMapButton, SIGNAL(toggled(bool)), this, SLOT(saveSettingsInMapButtonPressed(bool)));
    2.39 -    connect(ui.browsePreExportButton, SIGNAL(pressed()), this, SLOT(browsePreExportButtonPressed()));
    2.40 -    connect(ui.lineEditPreScript, SIGNAL(textChanged(const QString&)), this, SLOT(prescriptChanged()));
    2.41 -    connect(ui.lineEditPostScript, SIGNAL(textChanged(const QString&)), this, SLOT(postscriptChanged()));
    2.42 -    connect(ui.browsePostExportButton, SIGNAL(pressed()), this, SLOT(browsePostExportButtonPressed()));
    2.43 -}	
    2.44 -
    2.45 -
    2.46 -void ExportXHTMLDialog::readSettings()
    2.47 -{
    2.48 -
    2.49 -	dir=settings.readLocalEntry (filepath,"/export/xhtml/exportDir",vymBaseDir.currentDirPath() );
    2.50 -	ui.lineEditDir->setText(dir);
    2.51 -	
    2.52 -    if ( settings.readLocalEntry (filepath,"/export/xhtml/useImage","yes")=="yes")
    2.53 -		useImage=true;
    2.54 -	else	
    2.55 -		useImage=false;
    2.56 -	ui.imageButton->setChecked(useImage);
    2.57 -		
    2.58 -	if ( settings.readLocalEntry (filepath,"/export/xhtml/useTextColor","no")=="yes")
    2.59 -		useTextColor=true;
    2.60 -	else	
    2.61 -		useTextColor=false;
    2.62 -	ui.textColorButton->setChecked(useTextColor);
    2.63 -	
    2.64 -/* TODO this was used in old html export, is not yet in new stylesheet
    2.65 -	if ( settings.readEntry ("/export/html/useHeading","no")=="yes")
    2.66 -		useHeading=true;
    2.67 -	else	
    2.68 -		useHeading=false;
    2.69 -	checkBox4_2->setChecked(useHeading);
    2.70 -*/		
    2.71 -
    2.72 -	if ( settings.readLocalEntry (filepath,"/export/xhtml/saveSettingsInMap","no")=="yes")
    2.73 -		saveSettingsInMap=true;
    2.74 -	else	
    2.75 -		saveSettingsInMap=false;
    2.76 -	ui.saveSettingsInMapButton->setChecked(saveSettingsInMap);
    2.77 -
    2.78 -	if ( settings.readEntry ("/export/xhtml/showWarnings","yes")=="yes")
    2.79 -		showWarnings=true;
    2.80 -	else	
    2.81 -		showWarnings=false;
    2.82 -	ui.warningsButton->setChecked(showWarnings);
    2.83 -	
    2.84 -	if ( settings.readEntry ("/export/xhtml/showOutput","no")=="yes")
    2.85 -		showOutput=true;
    2.86 -	else	
    2.87 -		showOutput=false;
    2.88 -	ui.outputButton->setChecked(showOutput);
    2.89 -
    2.90 -	// For testing better use local styles
    2.91 -    const QString defxsl(vymBaseDir.path() + "/styles/vym2xhtml.xsl");
    2.92 -    const QString defcss(vymBaseDir.path() + "/styles/vym.css");
    2.93 -	if (options.isOn ("local"))
    2.94 -	{
    2.95 -		xsl=defxsl;
    2.96 -		css=defcss;
    2.97 -	} else
    2.98 -	{
    2.99 -		xsl=settings.readLocalEntry 
   2.100 -			(filepath,"/export/xhtml/xsl",defxsl);
   2.101 -		css=settings.readLocalEntry 
   2.102 -			(filepath,"/export/xhtml/css",defcss);	
   2.103 -	}
   2.104 -	ui.lineEditXSL->setText(xsl);
   2.105 -	ui.lineEditCSS->setText(css);
   2.106 -	
   2.107 -	prescript=settings.readLocalEntry
   2.108 -		(filepath,"/export/xhtml/prescript","");
   2.109 -	ui.lineEditPreScript->setText (prescript);	
   2.110 -	
   2.111 -	postscript=settings.readLocalEntry
   2.112 -		(filepath,"/export/xhtml/postscript","");
   2.113 -	ui.lineEditPostScript->setText (postscript);	
   2.114 -
   2.115 -	if (!prescript.isEmpty() || !postscript.isEmpty())
   2.116 -	{
   2.117 -		QMessageBox::warning( 0, tr( "Warning" ),tr(
   2.118 -		"The settings saved in the map "
   2.119 -		"would like to run scripts:\n\n"
   2.120 -		"%1\n\n"
   2.121 -		"Please check, if you really\n"
   2.122 -		"want to allow this in your system!").arg(prescript+"  "+postscript));
   2.123 -		
   2.124 -	}
   2.125 -}
   2.126 -
   2.127 -void ExportXHTMLDialog::setDir(const QString &d)
   2.128 -{
   2.129 -	dir=d;
   2.130 -	if (dir.right(1)!="/") dir+="/";
   2.131 -}
   2.132 -
   2.133 -void ExportXHTMLDialog::dirChanged()
   2.134 -{
   2.135 -	setDir (ui.lineEditDir->text());
   2.136 -	settingsChanged=true;
   2.137 -}
   2.138 -
   2.139 -void ExportXHTMLDialog::browseDirectoryPressed()
   2.140 -{
   2.141 -   	QFileDialog fd( this);
   2.142 -	fd.setMode (QFileDialog::DirectoryOnly);
   2.143 -	fd.setCaption(tr("VYM - Export HTML to directory"));
   2.144 -	fd.setModal (true);
   2.145 -	fd.setDirectory (QDir::current());
   2.146 -	fd.show();
   2.147 -
   2.148 -	if ( fd.exec() == QDialog::Accepted )
   2.149 -	{
   2.150 -		dir=fd.selectedFile();
   2.151 -		ui.lineEditDir->setText (dir );
   2.152 -		settingsChanged=true;
   2.153 -	}
   2.154 -}
   2.155 -
   2.156 -void ExportXHTMLDialog::imageButtonPressed(bool b)
   2.157 -{
   2.158 -	useImage=b;
   2.159 -	settingsChanged=true;
   2.160 -}
   2.161 -
   2.162 -void ExportXHTMLDialog::textcolorButtonPressed(bool b)
   2.163 -{
   2.164 -	useTextColor=b;	
   2.165 -	settingsChanged=true;
   2.166 -}
   2.167 -
   2.168 -void ExportXHTMLDialog::saveSettingsInMapButtonPressed(bool b)
   2.169 -{
   2.170 -	saveSettingsInMap=b;	
   2.171 -	settingsChanged=true;
   2.172 -}
   2.173 -
   2.174 -void ExportXHTMLDialog::warningsButtonPressed(bool b)
   2.175 -{
   2.176 -	showWarnings=b;
   2.177 -	settingsChanged=true;
   2.178 -}
   2.179 -
   2.180 -
   2.181 -void ExportXHTMLDialog::outputButtonPressed(bool b)
   2.182 -{
   2.183 -	showOutput=b;
   2.184 -	settingsChanged=true;
   2.185 -}
   2.186 -
   2.187 -void ExportXHTMLDialog::cssChanged()
   2.188 -{
   2.189 -	css=ui.lineEditCSS->text();
   2.190 -	settingsChanged=true;
   2.191 -}
   2.192 -
   2.193 -void ExportXHTMLDialog::browseCSSPressed()
   2.194 -{
   2.195 -   	QFileDialog fd( this);
   2.196 -	fd.setModal (true);
   2.197 -	fd.setFilter ("Cascading Stylesheet (*.css)");
   2.198 -	fd.setDirectory (QDir::current());
   2.199 -	fd.show();
   2.200 -
   2.201 -	if ( fd.exec() == QDialog::Accepted )
   2.202 -	{
   2.203 -		css=fd.selectedFile();
   2.204 -		ui.lineEditCSS->setText (css );
   2.205 -		settingsChanged=true;
   2.206 -	}
   2.207 -}
   2.208 -
   2.209 -void ExportXHTMLDialog::xslChanged()
   2.210 -{
   2.211 -	xsl=ui.lineEditXSL->text();
   2.212 -	settingsChanged=true;
   2.213 -}
   2.214 -
   2.215 -void ExportXHTMLDialog::prescriptChanged()
   2.216 -{
   2.217 -	prescript=ui.lineEditPreScript->text();
   2.218 -	settingsChanged=true;
   2.219 -}
   2.220 -
   2.221 -void ExportXHTMLDialog::browseXSLPressed()
   2.222 -{
   2.223 -   	QFileDialog fd( this);
   2.224 -	fd.setModal (true);
   2.225 -	fd.setFilter ("Extensible Stylesheet Language (*.xsl)");
   2.226 -	fd.setDirectory (QDir::current());
   2.227 -	fd.show();
   2.228 -
   2.229 -	if ( fd.exec() == QDialog::Accepted )
   2.230 -	{
   2.231 -		xsl=fd.selectedFile();
   2.232 -		ui.lineEditXSL->setText (xsl );
   2.233 -		settingsChanged=true;
   2.234 -	}
   2.235 -}
   2.236 -
   2.237 -void ExportXHTMLDialog::postscriptChanged()
   2.238 -{
   2.239 -	postscript=ui.lineEditPostScript->text();
   2.240 -	settingsChanged=true;
   2.241 -}
   2.242 -
   2.243 -void ExportXHTMLDialog::browsePreExportButtonPressed()
   2.244 -{
   2.245 -	QFileDialog fd( this);
   2.246 -	fd.setModal (true);
   2.247 -	fd.setFilter ("Scripts (*.sh *.pl *.py *.php)");
   2.248 -	fd.setDirectory (QDir::current());
   2.249 -	fd.show();
   2.250 -
   2.251 -	if ( fd.exec() == QDialog::Accepted )
   2.252 -	{
   2.253 -		prescript=fd.selectedFile();
   2.254 -		ui.lineEditPreScript->setText (prescript );
   2.255 -		settingsChanged=true;
   2.256 -	}
   2.257 -
   2.258 -}
   2.259 -
   2.260 -void ExportXHTMLDialog::browsePostExportButtonPressed()
   2.261 -{
   2.262 -	QFileDialog fd( this);
   2.263 -	fd.setModal (true);
   2.264 -	fd.setFilter ("Scripts (*.sh *.pl *.py *.php)");
   2.265 -	fd.setDirectory (QDir::current());
   2.266 -	fd.show();
   2.267 -
   2.268 -	if ( fd.exec() == QDialog::Accepted )
   2.269 -	{
   2.270 -		postscript=fd.selectedFile();
   2.271 -		ui.lineEditPostScript->setText (postscript );
   2.272 -		settingsChanged=true;
   2.273 -	}
   2.274 -}
   2.275 -
   2.276 -
   2.277 -void ExportXHTMLDialog::doExport (const QString &mapname)
   2.278 -{
   2.279 -
   2.280 -	// Save options to settings file 
   2.281 -	// (but don't save at destructor, which
   2.282 -	// is called for "cancel", too)
   2.283 -	settings.setLocalEntry (filepath,"/export/xhtml/exportDir",dir);
   2.284 -	settings.setLocalEntry (filepath,"/export/xhtml/prescript",prescript);
   2.285 -	settings.setLocalEntry (filepath,"/export/xhtml/postscript",postscript);
   2.286 -
   2.287 -    if (useImage)
   2.288 -		settings.setLocalEntry (filepath,"/export/xhtml/useImage","yes");
   2.289 -    else
   2.290 -		settings.setLocalEntry (filepath,"/export/xhtml/useImage","no");	
   2.291 -	
   2.292 -  if (useTextColor)
   2.293 -		settings.setLocalEntry (filepath,"/export/xhtml/useTextColor","yes");
   2.294 -    else
   2.295 -		settings.setLocalEntry (filepath,"/export/xhtml/useTextColor","no");	
   2.296 -	
   2.297 -   if (showWarnings)
   2.298 -		settings.writeEntry ("/export/xhtml/showWarnings","yes");
   2.299 -    else
   2.300 -		settings.writeEntry ("/export/xhtml/showWarnings","no");	
   2.301 -			
   2.302 -	if (showOutput)
   2.303 -		settings.writeEntry ("/export/xhtml/showOutput","yes");
   2.304 -	else
   2.305 -		settings.writeEntry ("/export/xhtml/showOutput","no");	
   2.306 -
   2.307 -	QString ipath;	
   2.308 -	ipath=vymBaseDir.path()+"/flags/flag-url-16x16.png";
   2.309 -	if (!options.isOn ("local"))
   2.310 -	{
   2.311 -		settings.setLocalEntry 
   2.312 -			(filepath,"/export/xhtml/xsl",xsl);
   2.313 -		settings.setLocalEntry 
   2.314 -			(filepath,"/export/xhtml/css",css);	
   2.315 -	}
   2.316 -
   2.317 -	if (!saveSettingsInMap)
   2.318 -		settings.clearLocal("/export/xhtml");
   2.319 -	else	
   2.320 -		settings.setLocalEntry 
   2.321 -			(filepath,"/export/xhtml/saveSettingsInMap","yes");
   2.322 -
   2.323 -	// Provide a smaller URL-icon to improve Layout
   2.324 -	QPixmap pm;
   2.325 -	if (!pm.load(ipath,"PNG") )
   2.326 -		QMessageBox::warning( 0, tr( "Warning" ),tr("Could not open %1").arg(ipath));
   2.327 -		
   2.328 -		
   2.329 -	if(!pm.save (dir + "flags/flag-url-16x16.png","PNG"))
   2.330 -		QMessageBox::warning( 0, tr( "Warning" ),tr("Could not write %1").arg(ipath));
   2.331 -
   2.332 -	// Copy CSS file
   2.333 -	QFile css_src (css);
   2.334 -	QFile css_dst (dir+"vym.css");
   2.335 -	if (!css_src.open ( QIODevice::ReadOnly))
   2.336 -		QMessageBox::warning( 0, tr( "Warning" ),tr("Could not open %1").arg(css));
   2.337 -	else
   2.338 -	{
   2.339 -		if (!css_dst.open( QIODevice::WriteOnly))
   2.340 -			QMessageBox::warning( 0, tr( "Warning" ), tr("Could not open %1").arg(dir+"vym.css"));
   2.341 -		else
   2.342 -		{	
   2.343 -		
   2.344 -			QTextStream tsout( &css_dst);
   2.345 -			QTextStream tsin ( &css_src);
   2.346 -			QString s= tsin.read();
   2.347 -			tsout << s;
   2.348 -			css_dst.close();
   2.349 -		}	
   2.350 -		css_src.close();
   2.351 -	}
   2.352 -
   2.353 -	if (!prescript.isEmpty()) runScript (prescript,dir+mapname+".xml");
   2.354 -	
   2.355 -	if (useImage)
   2.356 -		p.addStringParam ("imagemap","images/"+mapname+".png");
   2.357 -	if (useTextColor)
   2.358 -		p.addStringParam ("use.textcolor","1");
   2.359 -	p.addStringParam ("mapname",mapname+".vym");
   2.360 -	
   2.361 -	p.setOutputFile (dir+mapname+".html");
   2.362 -	p.setInputFile (dir+mapname+".xml");
   2.363 -	p.setXSLFile (xsl);
   2.364 -	p.process();
   2.365 -
   2.366 -	if (!postscript.isEmpty()) runScript (postscript,dir+mapname+".html");
   2.367 -
   2.368 -}
   2.369 -
   2.370 -void ExportXHTMLDialog::setFilePath(const QString &s)
   2.371 -{
   2.372 -	filepath=s;
   2.373 -}
   2.374 -
   2.375 -void ExportXHTMLDialog::setMapName(const QString &s)
   2.376 -{
   2.377 -	mapname=s;
   2.378 -}
   2.379 -
   2.380 -QString ExportXHTMLDialog::getDir()
   2.381 -{
   2.382 -	return dir;
   2.383 -}
   2.384 -
   2.385 -bool ExportXHTMLDialog::warnings()
   2.386 -{
   2.387 -	return showWarnings;
   2.388 -}
   2.389 -
   2.390 -bool ExportXHTMLDialog::hasChanged()
   2.391 -{
   2.392 -	return settingsChanged;
   2.393 -}
   2.394 -
   2.395 -
   2.396 -void ExportXHTMLDialog::runScript(QString spath, QString fpath)
   2.397 -{
   2.398 -	spath.replace ("%f",fpath);
   2.399 -	QStringList args=QStringList::split (' ',spath,false);
   2.400 -		
   2.401 -	p.addOutput ("vym is executing: \n" + spath+" "+args.join(" ") );	
   2.402 -	scriptProc->start (spath,args);
   2.403 -	if (!scriptProc->waitForStarted() )
   2.404 -	{
   2.405 -		QMessageBox::critical( 0, tr( "Critical Error" ),
   2.406 -					   tr("Could not start %1").arg(spath) );
   2.407 -	} else
   2.408 -	{
   2.409 -		if (!scriptProc->waitForFinished())
   2.410 -			QMessageBox::critical( 0, tr( "Critical Error" ),
   2.411 -			   tr("%1 didn't exit normally").arg(spath) +
   2.412 -			   scriptProc->getErrout() );
   2.413 -		else
   2.414 -			if (scriptProc->exitStatus()>0) showOutput=true;
   2.415 -			
   2.416 -	}	
   2.417 -	p.addOutput ("\n");
   2.418 -	p.addOutput (scriptProc->getErrout());
   2.419 -	p.addOutput (scriptProc->getStdout());
   2.420 -}
   2.421 -
     3.1 --- a/exportxhtmldialog.h	Wed Apr 07 10:45:24 2010 +0000
     3.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.3 @@ -1,70 +0,0 @@
     3.4 -#ifndef EXPORTXHTMLDIALOG_H
     3.5 -#define EXPORTXHTMLDIALOG_H
     3.6 -
     3.7 -#include "ui_exportxhtmldialog.h"
     3.8 -
     3.9 -/*! \brief Dialog to export a map as XHTML document
    3.10 -
    3.11 -This is an overloaded QDialog with various settings needed to call
    3.12 -convert the vym.xml to a XHTML document. 
    3.13 -The conversion itself is done by calling xsltproc.
    3.14 -*/
    3.15 -
    3.16 -class ExportXHTMLDialog:public QDialog
    3.17 -{
    3.18 -	Q_OBJECT
    3.19 -public:
    3.20 -    ExportXHTMLDialog(QWidget* parent = 0);
    3.21 -
    3.22 -    virtual QString getDir();
    3.23 -    virtual bool warnings();
    3.24 -    virtual bool hasChanged();
    3.25 -
    3.26 -public slots:
    3.27 -    virtual void readSettings();
    3.28 -    virtual void setDir (const QString&);
    3.29 -    virtual void dirChanged();
    3.30 -    virtual void browseDirectoryPressed();
    3.31 -    virtual void imageButtonPressed( bool b );
    3.32 -    virtual void textcolorButtonPressed( bool b );
    3.33 -    virtual void saveSettingsInMapButtonPressed( bool b );
    3.34 -    virtual void warningsButtonPressed( bool b );
    3.35 -    virtual void outputButtonPressed( bool b );
    3.36 -    virtual void cssChanged();
    3.37 -    virtual void browseCSSPressed();
    3.38 -    virtual void xslChanged();
    3.39 -    virtual void prescriptChanged();
    3.40 -    virtual void browseXSLPressed();
    3.41 -    virtual void postscriptChanged();
    3.42 -    virtual void browsePreExportButtonPressed();
    3.43 -    virtual void browsePostExportButtonPressed();
    3.44 -    virtual void doExport( const QString & mapname );
    3.45 -    virtual void setFilePath( const QString & s );
    3.46 -    virtual void setMapName( const QString & s );
    3.47 -
    3.48 -protected:
    3.49 -    bool useTextColor;
    3.50 -    bool showWarnings;
    3.51 -    QString xsl;
    3.52 -    QString css;
    3.53 -    bool useImage;
    3.54 -    bool showOutput;
    3.55 -    QString dir;
    3.56 -    QString filepath;
    3.57 -    QString prescript;
    3.58 -    QString postscript;
    3.59 -    bool settingsChanged;
    3.60 -    QString mapname;
    3.61 -    bool saveSettingsInMap;
    3.62 -    XSLTProc p;
    3.63 -    Process *scriptProc;
    3.64 -
    3.65 -private:
    3.66 -	Ui::ExportXHTMLDialog ui;
    3.67 -    void init();
    3.68 -    void destroy();
    3.69 -    void runScript( QString spath, QString fpath );
    3.70 -
    3.71 -};
    3.72 -
    3.73 -#endif // EXPORTXHTMLDIALOG_H
     4.1 --- a/highlighter.cpp	Wed Apr 07 10:45:24 2010 +0000
     4.2 +++ b/highlighter.cpp	Fri Apr 09 14:16:02 2010 +0000
     4.3 @@ -51,7 +51,6 @@
     4.4  					<< "\\bexportAO\\b"
     4.5  					<< "\\bexportASCII\\b"
     4.6  					<< "\\bexportImage\\b"
     4.7 -					<< "\\bexportXHTML\\b"
     4.8  					<< "\\bexportXML\\b"
     4.9  					<< "\\bimportDir\\b"
    4.10  					<< "\\blinkTo\\b" 
     5.1 --- a/mainwindow.cpp	Wed Apr 07 10:45:24 2010 +0000
     5.2 +++ b/mainwindow.cpp	Fri Apr 09 14:16:02 2010 +0000
     5.3 @@ -475,17 +475,11 @@
     5.4  
     5.5  	a = new QAction(  "Webpage (HTML)...",this );
     5.6  	a->setShortcut (Qt::ALT + Qt::Key_X);			//Export HTML
     5.7 -	a->setStatusTip ( tr( "Export as %1","status tip file menu").arg(tr(" webpage (XHTML)","status tip file menu")));
     5.8 +	a->setStatusTip ( tr( "Export as %1","status tip file menu").arg(tr(" webpage (HTML)","status tip file menu")));
     5.9  	switchboard.addConnection(a,tr("File","Shortcut group"));
    5.10  	connect( a, SIGNAL( triggered() ), this, SLOT( fileExportHTML() ) );
    5.11  	fileExportMenu->addAction (a);
    5.12  
    5.13 -	a = new QAction(  "Webpage (XHTML)...",this );	//Export XHTML
    5.14 -
    5.15 -	//a->setShortcut (Qt::ALT + Qt::SHIFT + Qt::Key_X);	a->setStatusTip ( tr( "Export as %1","status tip file menu").arg(tr(" webpage (XHTML)","status tip file menu")));
    5.16 -	connect( a, SIGNAL( triggered() ), this, SLOT( fileExportXHTML() ) );
    5.17 -	fileExportMenu->addAction (a);
    5.18 -
    5.19  	a = new QAction( "Text (A&O report)...", this);
    5.20  	a->setStatusTip ( tr( "Export as %1").arg("A&O report "+tr("(still experimental)" )));
    5.21  	switchboard.addConnection(a,tr("File","Shortcut group"));
    5.22 @@ -2448,13 +2442,6 @@
    5.23  	if (m) m->exportHTML();
    5.24  }
    5.25  
    5.26 -
    5.27 -void Main::fileExportXHTML()	
    5.28 -{
    5.29 -	VymModel *m=currentModel();
    5.30 -	if (m) m->exportXHTML();
    5.31 -}
    5.32 -
    5.33  void Main::fileExportImage()	
    5.34  {
    5.35  	VymModel *m=currentModel();
     6.1 --- a/mainwindow.h	Wed Apr 07 10:45:24 2010 +0000
     6.2 +++ b/mainwindow.h	Fri Apr 09 14:16:02 2010 +0000
     6.3 @@ -100,7 +100,6 @@
     6.4      void fileImportDir();
     6.5      void fileExportXML();
     6.6      void fileExportHTML();
     6.7 -    void fileExportXHTML();
     6.8      void fileExportImage();
     6.9      void fileExportAO();
    6.10      void fileExportASCII();
     7.1 --- a/version.h	Wed Apr 07 10:45:24 2010 +0000
     7.2 +++ b/version.h	Fri Apr 09 14:16:02 2010 +0000
     7.3 @@ -4,10 +4,10 @@
     7.4  #include <QString>
     7.5  
     7.6  #define __VYM_NAME "VYM"
     7.7 -#define __VYM_VERSION "1.13.2"
     7.8 +#define __VYM_VERSION "1.13.3"
     7.9  //#define __VYM_CODENAME "Codename: RC-1"
    7.10  #define __VYM_CODENAME "Codename: development version, not for production!"
    7.11 -#define __VYM_BUILD_DATE "2010-03-30"
    7.12 +#define __VYM_BUILD_DATE "2010-04-09"
    7.13  
    7.14  
    7.15  bool checkVersion(const QString &);
     8.1 --- a/vym.changelog	Wed Apr 07 10:45:24 2010 +0000
     8.2 +++ b/vym.changelog	Fri Apr 09 14:16:02 2010 +0000
     8.3 @@ -1,3 +1,8 @@
     8.4 +-------------------------------------------------------------------
     8.5 +Fri Apr  9 16:12:55 CEST 2010 - vym@insilmaril.de
     8.6 +
     8.7 +- Feature: XHTML export obsoleted by HTML export
     8.8 +
     8.9  -------------------------------------------------------------------
    8.10  Wed Apr  7 12:01:25 CEST 2010 - vym@insilmaril.de
    8.11  
     9.1 --- a/vym.pro	Wed Apr 07 10:45:24 2010 +0000
     9.2 +++ b/vym.pro	Fri Apr 09 14:16:02 2010 +0000
     9.3 @@ -46,7 +46,6 @@
     9.4  	exportoofiledialog.h \
     9.5  	exporthtmldialog.h\
     9.6  	exporthtmldialog.h\
     9.7 -	exportxhtmldialog.h\
     9.8  	exports.h \
     9.9  	extrainfodialog.h \
    9.10  	file.h \
    9.11 @@ -117,7 +116,6 @@
    9.12  	exportoofiledialog.cpp \
    9.13  	exports.cpp \
    9.14  	exporthtmldialog.cpp \
    9.15 -	exportxhtmldialog.cpp \
    9.16  	extrainfodialog.cpp \
    9.17  	file.cpp \
    9.18  	findwidget.cpp \
    9.19 @@ -175,7 +173,6 @@
    9.20  	attributewidget.ui \
    9.21  	branchpropwindow.ui \
    9.22  	exporthtmldialog.ui \
    9.23 -	exportxhtmldialog.ui \
    9.24  	extrainfodialog.ui \
    9.25  	editxlinkdialog.ui \
    9.26  	historywindow.ui \
    10.1 --- a/vymmodel.cpp	Wed Apr 07 10:45:24 2010 +0000
    10.2 +++ b/vymmodel.cpp	Fri Apr 09 14:16:02 2010 +0000
    10.3 @@ -10,7 +10,6 @@
    10.4  #include "editxlinkdialog.h"
    10.5  #include "exports.h"
    10.6  #include "exporthtmldialog.h"
    10.7 -#include "exportxhtmldialog.h"
    10.8  #include "file.h"
    10.9  #include "findresultmodel.h"
   10.10  #include "geometry.h"		// for addBBox
   10.11 @@ -3473,21 +3472,6 @@
   10.12  			exportImage (fname,false,format);
   10.13  		}
   10.14  	/////////////////////////////////////////////////////////////////////
   10.15 -	} else if (com=="exportXHTML")
   10.16 -	{
   10.17 -		QString fname="";
   10.18 -		ok=true;
   10.19 -		if (parser.parCount()>=2)
   10.20 -			// Hey, we even have a filename
   10.21 -			fname=parser.parString(ok,1); 
   10.22 -		if (!ok)
   10.23 -		{
   10.24 -			parser.setError (Aborted,"Could not read filename");
   10.25 -		} else
   10.26 -		{
   10.27 -			exportXHTML (fname,false);
   10.28 -		}
   10.29 -	/////////////////////////////////////////////////////////////////////
   10.30  	} else if (com=="exportXML")
   10.31  	{
   10.32  		QString fname="";
   10.33 @@ -4371,48 +4355,6 @@
   10.34  	ex.doExport(useDialog);
   10.35  }
   10.36  
   10.37 -void VymModel::exportXHTML (const QString &dir, bool askForName)
   10.38 -{
   10.39 -	ExportXHTMLDialog dia(NULL);
   10.40 -	dia.setFilePath (filePath );
   10.41 -	dia.setMapName (mapName );
   10.42 -	dia.readSettings();
   10.43 -	if (dir!="") dia.setDir (dir);
   10.44 -
   10.45 -	bool ok=true;
   10.46 -	
   10.47 -	if (askForName)
   10.48 -	{
   10.49 -		if (dia.exec()!=QDialog::Accepted) 
   10.50 -			ok=false;
   10.51 -		else	
   10.52 -		{
   10.53 -			QDir d (dia.getDir());
   10.54 -			// Check, if warnings should be used before overwriting
   10.55 -			// the output directory
   10.56 -			if (d.exists() && d.count()>0)
   10.57 -			{
   10.58 -				WarningDialog warn;
   10.59 -				warn.showCancelButton (true);
   10.60 -				warn.setText(QString(
   10.61 -					"The directory %1 is not empty.\n"
   10.62 -					"Do you risk to overwrite some of its contents?").arg(d.path() ));
   10.63 -				warn.setCaption("Warning: Directory not empty");
   10.64 -				warn.setShowAgainName("mainwindow/overwrite-dir-xhtml");
   10.65 -
   10.66 -				if (warn.exec()!=QDialog::Accepted) ok=false;
   10.67 -			}
   10.68 -		}	
   10.69 -	}
   10.70 -
   10.71 -	if (ok)
   10.72 -	{
   10.73 -		exportXML (dia.getDir(),false );
   10.74 -		dia.doExport(mapName );
   10.75 -		//if (dia.hasChanged()) setChanged();
   10.76 -	}
   10.77 -}
   10.78 -
   10.79  void VymModel::exportOOPresentation(const QString &fn, const QString &cf)
   10.80  {
   10.81  	ExportOO ex;
    11.1 --- a/vymmodel.h	Wed Apr 07 10:45:24 2010 +0000
    11.2 +++ b/vymmodel.h	Fri Apr 09 14:16:02 2010 +0000
    11.3 @@ -450,7 +450,6 @@
    11.4  
    11.5  	/*! Export as HTML to directory */
    11.6      void exportHTML(const QString& dir="", bool useDialog=true);	
    11.7 -    void exportXHTML(const QString& dir="", bool askForName=true);	
    11.8  
    11.9      /*! Export as OpenOfficeOrg presentation */
   11.10      void exportOOPresentation(const QString &,const QString &);