exports.h
branchrelease-1-12-maintained
changeset 62 85683324f94a
parent 0 7a96bd401351
     1.1 --- a/exports.h	Mon Mar 16 15:40:49 2009 +0000
     1.2 +++ b/exports.h	Thu Mar 19 11:48:33 2009 +0000
     1.3 @@ -6,29 +6,118 @@
     1.4  #include <iostream>
     1.5  
     1.6  #include "mapcenterobj.h"
     1.7 +#include "settings.h"
     1.8 +#include "vymmodel.h"
     1.9  
    1.10 -using namespace std;
    1.11  
    1.12 -/////////////////////////////////////////////////////////////////////////////
    1.13 -class Export
    1.14 +/*! \brief Base class for all exports
    1.15 +*/
    1.16 +
    1.17 +///////////////////////////////////////////////////////////////////////
    1.18 +
    1.19 +class ExportBase
    1.20  {
    1.21  public:
    1.22 -	Export();
    1.23 -	bool setOutputDir (QString);
    1.24 -	void setPath(const QString &);
    1.25 -	void setMapCenter (MapCenterObj*);
    1.26 -	void setIndentPerDepth (QString);
    1.27 -	void exportMap();
    1.28 -	void exportAsHTML();
    1.29 +	ExportBase();
    1.30 +	virtual ~ExportBase();
    1.31 +	virtual void setDir(const QDir&);
    1.32 +	virtual void setFile(const QString &);
    1.33 +	virtual QString getFile ();
    1.34 +	virtual void setModel (VymModel *m);
    1.35 +	virtual void setCaption(const QString &);
    1.36 +	virtual void addFilter (const QString &);
    1.37 +	virtual bool execDialog();
    1.38 +	virtual bool canceled();
    1.39  protected:  
    1.40 -	QString getSectionString (BranchObj*);
    1.41 -	void write (QString);
    1.42 +	VymModel *model;
    1.43 +	virtual QString getSectionString (BranchObj*);
    1.44  
    1.45 -private:
    1.46 -	QDir outdir;
    1.47 -	QString filepath;
    1.48 -	MapCenterObj *mapCenter;
    1.49 +	QDir tmpDir;
    1.50 +	QDir outDir;
    1.51 +	QString outputFile;
    1.52  	QString	indentPerDepth;
    1.53 +	QString caption;
    1.54 +	QString filter;
    1.55 +	bool cancelFlag;
    1.56  };
    1.57  
    1.58 +///////////////////////////////////////////////////////////////////////
    1.59 +class ExportASCII:public ExportBase
    1.60 +{
    1.61 +public:
    1.62 +	ExportASCII();
    1.63 +	virtual void doExport();
    1.64 +	virtual QString underline (const QString &text, const QString &line);
    1.65 +};
    1.66 +
    1.67 +///////////////////////////////////////////////////////////////////////
    1.68 +class ExportCSV:public ExportBase
    1.69 +{
    1.70 +public:
    1.71 +	virtual void doExport();
    1.72 +};
    1.73 +
    1.74 +///////////////////////////////////////////////////////////////////////
    1.75 +class ExportXMLBase:public ExportBase
    1.76 +{
    1.77 +};
    1.78 +
    1.79 +///////////////////////////////////////////////////////////////////////
    1.80 +class ExportKDE3Bookmarks:public ExportXMLBase
    1.81 +{
    1.82 +public:
    1.83 +	virtual void doExport();
    1.84 +};	
    1.85 +
    1.86 +///////////////////////////////////////////////////////////////////////
    1.87 +class ExportKDE4Bookmarks:public ExportXMLBase
    1.88 +{
    1.89 +public:
    1.90 +	virtual void doExport();
    1.91 +};	
    1.92 +
    1.93 +///////////////////////////////////////////////////////////////////////
    1.94 +class ExportFirefoxBookmarks:public ExportXMLBase
    1.95 +{
    1.96 +public:
    1.97 +	virtual void doExport();
    1.98 +};	
    1.99 +
   1.100 +///////////////////////////////////////////////////////////////////////
   1.101 +class ExportTaskjuggler:public ExportXMLBase
   1.102 +{
   1.103 +public:
   1.104 +	virtual void doExport();
   1.105 +};	
   1.106 +
   1.107 +///////////////////////////////////////////////////////////////////////
   1.108 +class ExportLaTeX:public ExportBase
   1.109 +{
   1.110 +public:
   1.111 +	virtual void doExport();
   1.112 +};	
   1.113 +
   1.114 +///////////////////////////////////////////////////////////////////////
   1.115 +class ExportOO:public ExportBase
   1.116 +{
   1.117 +public:
   1.118 +	ExportOO();
   1.119 +	~ExportOO();
   1.120 +	void exportPresentation();
   1.121 +	bool setConfigFile (const QString &);
   1.122 +private:
   1.123 +	QString buildList (BranchObj*);
   1.124 +	bool useSections;
   1.125 +	QString configFile;
   1.126 +	QString configDir;
   1.127 +	QString templateDir;
   1.128 +	QString content;
   1.129 +	QString contentTemplate;
   1.130 +	QString contentTemplateFile;
   1.131 +	QString contentFile;
   1.132 +	QString pageTemplate;
   1.133 +	QString pageTemplateFile;
   1.134 +	QString sectionTemplate;
   1.135 +	QString sectionTemplateFile;
   1.136 +};
   1.137  #endif