exports.h
author insilmaril
Thu Apr 02 09:57:36 2009 +0000 (2009-04-02)
branchrelease-1-12-maintained
changeset 64 4f305c07dd7c
parent 0 7a96bd401351
permissions -rw-r--r--
Added sverige translation
     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 ExportKDE3Bookmarks:public ExportXMLBase
    67 {
    68 public:
    69 	virtual void doExport();
    70 };	
    71 
    72 ///////////////////////////////////////////////////////////////////////
    73 class ExportKDE4Bookmarks:public ExportXMLBase
    74 {
    75 public:
    76 	virtual void doExport();
    77 };	
    78 
    79 ///////////////////////////////////////////////////////////////////////
    80 class ExportFirefoxBookmarks:public ExportXMLBase
    81 {
    82 public:
    83 	virtual void doExport();
    84 };	
    85 
    86 ///////////////////////////////////////////////////////////////////////
    87 class ExportTaskjuggler:public ExportXMLBase
    88 {
    89 public:
    90 	virtual void doExport();
    91 };	
    92 
    93 ///////////////////////////////////////////////////////////////////////
    94 class ExportLaTeX:public ExportBase
    95 {
    96 public:
    97 	virtual void doExport();
    98 };	
    99 
   100 ///////////////////////////////////////////////////////////////////////
   101 class ExportOO:public ExportBase
   102 {
   103 public:
   104 	ExportOO();
   105 	~ExportOO();
   106 	void exportPresentation();
   107 	bool setConfigFile (const QString &);
   108 private:
   109 	QString buildList (BranchObj*);
   110 	bool useSections;
   111 	QString configFile;
   112 	QString configDir;
   113 	QString templateDir;
   114 	QString content;
   115 	QString contentTemplate;
   116 	QString contentTemplateFile;
   117 	QString contentFile;
   118 	QString pageTemplate;
   119 	QString pageTemplateFile;
   120 	QString sectionTemplate;
   121 	QString sectionTemplateFile;
   122 };
   123 #endif