exports.h
author insilmaril
Thu Nov 08 15:28:03 2007 +0000 (2007-11-08)
changeset 617 7ee5bf3647d3
parent 611 a1ae877b438d
child 644 954221e01e4e
permissions -rw-r--r--
1.11.2 split up of xml helper functions. started to work on attributes
     1 #ifndef EXPORTS_H
     2 #define EXPORTS_H
     3 
     4 #include <qdir.h>
     5 #include <qstring.h>
     6 #include <iostream>
     7 
     8 #include "mapcenterobj.h"
     9 #include "settings.h"
    10 
    11 
    12 /*! \brief Base class for all exports
    13 */
    14 
    15 ///////////////////////////////////////////////////////////////////////
    16 
    17 class ExportBase
    18 {
    19 public:
    20 	ExportBase();
    21 	virtual ~ExportBase();
    22 	virtual void setDir(const QDir&);
    23 	virtual void setFile(const QString &);
    24 	virtual QString getFile ();
    25 	virtual void setMapCenter (MapCenterObj*);
    26 	virtual void setCaption(const QString &);
    27 	virtual void addFilter (const QString &);
    28 	virtual bool execDialog();
    29 	virtual bool canceled();
    30 protected:  
    31 	virtual QString getSectionString (BranchObj*);
    32 
    33 	QDir tmpDir;
    34 	QDir outDir;
    35 	QString outputFile;
    36 	MapCenterObj *mapCenter;
    37 	QString	indentPerDepth;
    38 	QString caption;
    39 	QString filter;
    40 	bool cancelFlag;
    41 };
    42 
    43 ///////////////////////////////////////////////////////////////////////
    44 class ExportASCII:public ExportBase
    45 {
    46 public:
    47 	ExportASCII();
    48 	virtual void doExport();
    49 	virtual QString underline (const QString &text, const QString &line);
    50 };
    51 
    52 ///////////////////////////////////////////////////////////////////////
    53 class ExportCSV:public ExportBase
    54 {
    55 public:
    56 	virtual void doExport();
    57 };
    58 
    59 ///////////////////////////////////////////////////////////////////////
    60 class ExportXMLBase:public ExportBase
    61 {
    62 };
    63 
    64 ///////////////////////////////////////////////////////////////////////
    65 class ExportKDEBookmarks:public ExportXMLBase
    66 {
    67 public:
    68 	virtual void doExport();
    69 };	
    70 
    71 ///////////////////////////////////////////////////////////////////////
    72 class ExportFirefoxBookmarks:public ExportXMLBase
    73 {
    74 public:
    75 	virtual void doExport();
    76 };	
    77 
    78 ///////////////////////////////////////////////////////////////////////
    79 class ExportTaskjuggler:public ExportXMLBase
    80 {
    81 public:
    82 	virtual void doExport();
    83 };	
    84 
    85 ///////////////////////////////////////////////////////////////////////
    86 class ExportLaTeX:public ExportBase
    87 {
    88 public:
    89 	virtual void doExport();
    90 };	
    91 
    92 ///////////////////////////////////////////////////////////////////////
    93 class ExportOO:public ExportBase
    94 {
    95 public:
    96 	ExportOO();
    97 	~ExportOO();
    98 	void exportPresentation();
    99 	bool setConfigFile (const QString &);
   100 private:
   101 	QString buildList (BranchObj*);
   102 	bool useSections;
   103 	QString configFile;
   104 	QString configDir;
   105 	QString templateDir;
   106 	QString content;
   107 	QString contentTemplate;
   108 	QString contentTemplateFile;
   109 	QString contentFile;
   110 	QString pageTemplate;
   111 	QString pageTemplateFile;
   112 	QString sectionTemplate;
   113 	QString sectionTemplateFile;
   114 };
   115 #endif