exports.h
author insilmaril
Tue Jun 03 08:33:03 2008 +0000 (2008-06-03)
changeset 708 02f683ded030
parent 613 8fb5b3956b3e
child 742 54d44ecd6097
permissions -rw-r--r--
Workaround for unreadable file with Qt 4.4
     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 #include "vymmodel.h"
    11 
    12 
    13 /*! \brief Base class for all exports
    14 */
    15 
    16 ///////////////////////////////////////////////////////////////////////
    17 
    18 class ExportBase
    19 {
    20 public:
    21 	ExportBase();
    22 	virtual ~ExportBase();
    23 	virtual void setDir(const QDir&);
    24 	virtual void setFile(const QString &);
    25 	virtual QString getFile ();
    26 	virtual void setModel (VymModel *m);
    27 	virtual void setCaption(const QString &);
    28 	virtual void addFilter (const QString &);
    29 	virtual bool execDialog();
    30 	virtual bool canceled();
    31 protected:  
    32 	VymModel *model;
    33 	virtual QString getSectionString (BranchObj*);
    34 
    35 	QDir tmpDir;
    36 	QDir outDir;
    37 	QString outputFile;
    38 	QString	indentPerDepth;
    39 	QString caption;
    40 	QString filter;
    41 	bool cancelFlag;
    42 };
    43 
    44 ///////////////////////////////////////////////////////////////////////
    45 class ExportASCII:public ExportBase
    46 {
    47 public:
    48 	ExportASCII();
    49 	virtual void doExport();
    50 	virtual QString underline (const QString &text, const QString &line);
    51 };
    52 
    53 ///////////////////////////////////////////////////////////////////////
    54 class ExportCSV:public ExportBase
    55 {
    56 public:
    57 	virtual void doExport();
    58 };
    59 
    60 ///////////////////////////////////////////////////////////////////////
    61 class ExportXMLBase:public ExportBase
    62 {
    63 };
    64 
    65 ///////////////////////////////////////////////////////////////////////
    66 class ExportKDEBookmarks:public ExportXMLBase
    67 {
    68 public:
    69 	virtual void doExport();
    70 };	
    71 
    72 ///////////////////////////////////////////////////////////////////////
    73 class ExportFirefoxBookmarks:public ExportXMLBase
    74 {
    75 public:
    76 	virtual void doExport();
    77 };	
    78 
    79 ///////////////////////////////////////////////////////////////////////
    80 class ExportTaskjuggler:public ExportXMLBase
    81 {
    82 public:
    83 	virtual void doExport();
    84 };	
    85 
    86 ///////////////////////////////////////////////////////////////////////
    87 class ExportLaTeX:public ExportBase
    88 {
    89 public:
    90 	virtual void doExport();
    91 };	
    92 
    93 ///////////////////////////////////////////////////////////////////////
    94 class ExportOO:public ExportBase
    95 {
    96 public:
    97 	ExportOO();
    98 	~ExportOO();
    99 	void exportPresentation();
   100 	bool setConfigFile (const QString &);
   101 private:
   102 	QString buildList (BranchObj*);
   103 	bool useSections;
   104 	QString configFile;
   105 	QString configDir;
   106 	QString templateDir;
   107 	QString content;
   108 	QString contentTemplate;
   109 	QString contentTemplateFile;
   110 	QString contentFile;
   111 	QString pageTemplate;
   112 	QString pageTemplateFile;
   113 	QString sectionTemplate;
   114 	QString sectionTemplateFile;
   115 };
   116 #endif