exports.h
author insilmaril
Tue Dec 01 11:06:41 2009 +0000 (2009-12-01)
branchrelease-1-12-maintained
changeset 78 1a72c8f24c6e
parent 0 7a96bd401351
permissions -rw-r--r--
Fixed selection which didn't show sometimes
insilmaril@0
     1
#ifndef EXPORTS_H
insilmaril@0
     2
#define EXPORTS_H
insilmaril@0
     3
insilmaril@0
     4
#include <qdir.h>
insilmaril@0
     5
#include <qstring.h>
insilmaril@0
     6
#include <iostream>
insilmaril@0
     7
insilmaril@0
     8
#include "mapcenterobj.h"
insilmaril@62
     9
#include "settings.h"
insilmaril@62
    10
#include "vymmodel.h"
insilmaril@0
    11
insilmaril@0
    12
insilmaril@62
    13
/*! \brief Base class for all exports
insilmaril@62
    14
*/
insilmaril@62
    15
insilmaril@62
    16
///////////////////////////////////////////////////////////////////////
insilmaril@62
    17
insilmaril@62
    18
class ExportBase
insilmaril@0
    19
{
insilmaril@0
    20
public:
insilmaril@62
    21
	ExportBase();
insilmaril@62
    22
	virtual ~ExportBase();
insilmaril@62
    23
	virtual void setDir(const QDir&);
insilmaril@62
    24
	virtual void setFile(const QString &);
insilmaril@62
    25
	virtual QString getFile ();
insilmaril@62
    26
	virtual void setModel (VymModel *m);
insilmaril@62
    27
	virtual void setCaption(const QString &);
insilmaril@62
    28
	virtual void addFilter (const QString &);
insilmaril@62
    29
	virtual bool execDialog();
insilmaril@62
    30
	virtual bool canceled();
insilmaril@0
    31
protected:  
insilmaril@62
    32
	VymModel *model;
insilmaril@62
    33
	virtual QString getSectionString (BranchObj*);
insilmaril@0
    34
insilmaril@62
    35
	QDir tmpDir;
insilmaril@62
    36
	QDir outDir;
insilmaril@62
    37
	QString outputFile;
insilmaril@0
    38
	QString	indentPerDepth;
insilmaril@62
    39
	QString caption;
insilmaril@62
    40
	QString filter;
insilmaril@62
    41
	bool cancelFlag;
insilmaril@0
    42
};
insilmaril@0
    43
insilmaril@62
    44
///////////////////////////////////////////////////////////////////////
insilmaril@62
    45
class ExportASCII:public ExportBase
insilmaril@62
    46
{
insilmaril@62
    47
public:
insilmaril@62
    48
	ExportASCII();
insilmaril@62
    49
	virtual void doExport();
insilmaril@62
    50
	virtual QString underline (const QString &text, const QString &line);
insilmaril@62
    51
};
insilmaril@62
    52
insilmaril@62
    53
///////////////////////////////////////////////////////////////////////
insilmaril@62
    54
class ExportCSV:public ExportBase
insilmaril@62
    55
{
insilmaril@62
    56
public:
insilmaril@62
    57
	virtual void doExport();
insilmaril@62
    58
};
insilmaril@62
    59
insilmaril@62
    60
///////////////////////////////////////////////////////////////////////
insilmaril@62
    61
class ExportXMLBase:public ExportBase
insilmaril@62
    62
{
insilmaril@62
    63
};
insilmaril@62
    64
insilmaril@62
    65
///////////////////////////////////////////////////////////////////////
insilmaril@62
    66
class ExportKDE3Bookmarks:public ExportXMLBase
insilmaril@62
    67
{
insilmaril@62
    68
public:
insilmaril@62
    69
	virtual void doExport();
insilmaril@62
    70
};	
insilmaril@62
    71
insilmaril@62
    72
///////////////////////////////////////////////////////////////////////
insilmaril@62
    73
class ExportKDE4Bookmarks:public ExportXMLBase
insilmaril@62
    74
{
insilmaril@62
    75
public:
insilmaril@62
    76
	virtual void doExport();
insilmaril@62
    77
};	
insilmaril@62
    78
insilmaril@62
    79
///////////////////////////////////////////////////////////////////////
insilmaril@62
    80
class ExportFirefoxBookmarks:public ExportXMLBase
insilmaril@62
    81
{
insilmaril@62
    82
public:
insilmaril@62
    83
	virtual void doExport();
insilmaril@62
    84
};	
insilmaril@62
    85
insilmaril@62
    86
///////////////////////////////////////////////////////////////////////
insilmaril@62
    87
class ExportTaskjuggler:public ExportXMLBase
insilmaril@62
    88
{
insilmaril@62
    89
public:
insilmaril@62
    90
	virtual void doExport();
insilmaril@62
    91
};	
insilmaril@62
    92
insilmaril@62
    93
///////////////////////////////////////////////////////////////////////
insilmaril@62
    94
class ExportLaTeX:public ExportBase
insilmaril@62
    95
{
insilmaril@62
    96
public:
insilmaril@62
    97
	virtual void doExport();
insilmaril@62
    98
};	
insilmaril@62
    99
insilmaril@62
   100
///////////////////////////////////////////////////////////////////////
insilmaril@62
   101
class ExportOO:public ExportBase
insilmaril@62
   102
{
insilmaril@62
   103
public:
insilmaril@62
   104
	ExportOO();
insilmaril@62
   105
	~ExportOO();
insilmaril@62
   106
	void exportPresentation();
insilmaril@62
   107
	bool setConfigFile (const QString &);
insilmaril@62
   108
private:
insilmaril@62
   109
	QString buildList (BranchObj*);
insilmaril@62
   110
	bool useSections;
insilmaril@62
   111
	QString configFile;
insilmaril@62
   112
	QString configDir;
insilmaril@62
   113
	QString templateDir;
insilmaril@62
   114
	QString content;
insilmaril@62
   115
	QString contentTemplate;
insilmaril@62
   116
	QString contentTemplateFile;
insilmaril@62
   117
	QString contentFile;
insilmaril@62
   118
	QString pageTemplate;
insilmaril@62
   119
	QString pageTemplateFile;
insilmaril@62
   120
	QString sectionTemplate;
insilmaril@62
   121
	QString sectionTemplateFile;
insilmaril@62
   122
};
insilmaril@0
   123
#endif