exports.h
author insilmaril
Mon Jul 27 12:53:17 2009 +0000 (2009-07-27)
changeset 783 85dec6a8c12c
parent 750 ff3b01ce0960
child 791 f1006de05c54
permissions -rw-r--r--
Playing with dbus, fixed name of TW translation file
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@171
     8
#include "settings.h"
insilmaril@644
     9
#include "vymmodel.h"
insilmaril@0
    10
insilmaril@465
    11
insilmaril@465
    12
/*! \brief Base class for all exports
insilmaril@465
    13
*/
insilmaril@465
    14
insilmaril@183
    15
///////////////////////////////////////////////////////////////////////
insilmaril@171
    16
insilmaril@171
    17
class ExportBase
insilmaril@0
    18
{
insilmaril@0
    19
public:
insilmaril@171
    20
	ExportBase();
insilmaril@228
    21
	virtual ~ExportBase();
insilmaril@424
    22
	virtual void setDir(const QDir&);
insilmaril@228
    23
	virtual void setFile(const QString &);
insilmaril@513
    24
	virtual QString getFile ();
insilmaril@644
    25
	virtual void setModel (VymModel *m);
insilmaril@228
    26
	virtual void setCaption(const QString &);
insilmaril@228
    27
	virtual void addFilter (const QString &);
insilmaril@228
    28
	virtual bool execDialog();
insilmaril@513
    29
	virtual bool canceled();
insilmaril@0
    30
protected:  
insilmaril@644
    31
	VymModel *model;
insilmaril@228
    32
	virtual QString getSectionString (BranchObj*);
insilmaril@0
    33
insilmaril@205
    34
	QDir tmpDir;
insilmaril@424
    35
	QDir outDir;
insilmaril@199
    36
	QString outputFile;
insilmaril@0
    37
	QString	indentPerDepth;
insilmaril@228
    38
	QString caption;
insilmaril@228
    39
	QString filter;
insilmaril@513
    40
	bool cancelFlag;
insilmaril@0
    41
};
insilmaril@0
    42
insilmaril@183
    43
///////////////////////////////////////////////////////////////////////
insilmaril@228
    44
class ExportASCII:public ExportBase
insilmaril@228
    45
{
insilmaril@228
    46
public:
insilmaril@513
    47
	ExportASCII();
insilmaril@228
    48
	virtual void doExport();
insilmaril@613
    49
	virtual QString underline (const QString &text, const QString &line);
insilmaril@228
    50
};
insilmaril@228
    51
insilmaril@228
    52
///////////////////////////////////////////////////////////////////////
insilmaril@497
    53
class ExportCSV:public ExportBase
insilmaril@497
    54
{
insilmaril@497
    55
public:
insilmaril@497
    56
	virtual void doExport();
insilmaril@497
    57
};
insilmaril@497
    58
insilmaril@497
    59
///////////////////////////////////////////////////////////////////////
insilmaril@228
    60
class ExportXMLBase:public ExportBase
insilmaril@228
    61
{
insilmaril@228
    62
};
insilmaril@228
    63
insilmaril@228
    64
///////////////////////////////////////////////////////////////////////
insilmaril@742
    65
class ExportKDE3Bookmarks:public ExportXMLBase
insilmaril@742
    66
{
insilmaril@742
    67
public:
insilmaril@742
    68
	virtual void doExport();
insilmaril@742
    69
};	
insilmaril@742
    70
insilmaril@742
    71
///////////////////////////////////////////////////////////////////////
insilmaril@742
    72
class ExportKDE4Bookmarks:public ExportXMLBase
insilmaril@239
    73
{
insilmaril@239
    74
public:
insilmaril@239
    75
	virtual void doExport();
insilmaril@239
    76
};	
insilmaril@239
    77
insilmaril@239
    78
///////////////////////////////////////////////////////////////////////
insilmaril@311
    79
class ExportFirefoxBookmarks:public ExportXMLBase
insilmaril@311
    80
{
insilmaril@311
    81
public:
insilmaril@311
    82
	virtual void doExport();
insilmaril@311
    83
};	
insilmaril@311
    84
insilmaril@311
    85
///////////////////////////////////////////////////////////////////////
insilmaril@228
    86
class ExportTaskjuggler:public ExportXMLBase
insilmaril@228
    87
{
insilmaril@228
    88
public:
insilmaril@228
    89
	virtual void doExport();
insilmaril@228
    90
};	
insilmaril@228
    91
insilmaril@228
    92
///////////////////////////////////////////////////////////////////////
insilmaril@171
    93
class ExportLaTeX:public ExportBase
insilmaril@171
    94
{
insilmaril@171
    95
public:
insilmaril@228
    96
	virtual void doExport();
insilmaril@171
    97
};	
insilmaril@171
    98
insilmaril@183
    99
///////////////////////////////////////////////////////////////////////
insilmaril@171
   100
class ExportOO:public ExportBase
insilmaril@171
   101
{
insilmaril@171
   102
public:
insilmaril@171
   103
	ExportOO();
insilmaril@171
   104
	~ExportOO();
insilmaril@171
   105
	void exportPresentation();
insilmaril@194
   106
	bool setConfigFile (const QString &);
insilmaril@171
   107
private:
insilmaril@750
   108
	QString buildList (TreeItem *);
insilmaril@194
   109
	bool useSections;
insilmaril@183
   110
	QString configFile;
insilmaril@183
   111
	QString configDir;
insilmaril@171
   112
	QString templateDir;
insilmaril@171
   113
	QString content;
insilmaril@171
   114
	QString contentTemplate;
insilmaril@171
   115
	QString contentTemplateFile;
insilmaril@171
   116
	QString contentFile;
insilmaril@171
   117
	QString pageTemplate;
insilmaril@171
   118
	QString pageTemplateFile;
insilmaril@194
   119
	QString sectionTemplate;
insilmaril@194
   120
	QString sectionTemplateFile;
insilmaril@171
   121
};
insilmaril@0
   122
#endif