-
Notifications
You must be signed in to change notification settings - Fork 7
/
export-base.h
67 lines (57 loc) · 1.83 KB
/
export-base.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#ifndef EXPORT_BASE_H
#define EXPORT_BASE_H
#include <QDir>
#include <QMap>
#include <QString>
#include <iostream>
#include "settings.h"
#include "vymmodel.h"
/*! \brief Base class for all exports
*/
///////////////////////////////////////////////////////////////////////
class ExportBase
{
public:
ExportBase();
ExportBase(VymModel *m);
virtual ~ExportBase();
virtual void init();
virtual void setupTmpDir();
virtual void setDirPath (const QString&);
virtual QString getDirPath();
virtual void setFilePath (const QString&);
virtual QString getFilePath ();
virtual QString getMapName ();
virtual void setModel (VymModel *m);
virtual void setWindowTitle (const QString &);
virtual void setName( const QString &);
virtual QString getName();
virtual void addFilter (const QString &);
virtual void setListTasks( bool b);
virtual bool execDialog();
virtual bool canceled();
void setLastCommand( const QString& );
void completeExport(QMap <QString, QString> args); //! set lastExport and send status message
void completeExport();
protected:
VymModel *model;
QString exportName;
QString lastCommand;
virtual QString getSectionString (TreeItem*);
QString indent (const int &n, bool useBullet);
QDir tmpDir;
QString destination; // Can be the filePath or URL. Used for display in "ExportLast"
QString dirPath; // Path to dir e.g. /tmp/vym-export/
QString defaultDirPath; // Default path
QString filePath; // Path to file e.g. /tmp/vym-export/export.html
QString extension; // Extension, e.g. .html
QString indentPerDepth;
int indentPerDepth2;
QStringList bulletPoints;
QString caption;
QString filter;
bool listTasks; // Append task list
bool cancelFlag;
bool success;
};
#endif