-
Notifications
You must be signed in to change notification settings - Fork 2
/
ExportStrategy.h
41 lines (32 loc) · 1.16 KB
/
ExportStrategy.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
#ifndef EXPORTSTRATEGY_H
#define EXPORTSTRATEGY_H
#include <QString>
#include <QMap>
#include "Tag.h"
class ImageNote;
class Article;
class Document;
class AudioNote;
class VideoNote;
class TagManager;
enum ExportType {html=1, text, saveText, tex, unkownType};
class ExportStrategy
{
protected:
/*!
* \brief tm TagManager est utilise dans tous les SaveTextExport car on doit sauvegarder les tags associes.
*/
TagManager * tm;
public:
static QMap<ExportType, ExportStrategy*>* getStrategies();
ExportStrategy();
static QString TagsToString(const QSet<Tag *> &set);
virtual QString exportNote(const ImageNote *note, unsigned int level = 0) const = 0;
virtual QString exportNote(const Article *note, unsigned int level = 0) const = 0;
virtual QString exportNote(const AudioNote *note, unsigned int level = 0) const = 0;
virtual QString exportNote(const VideoNote *note, unsigned int level = 0) const = 0;
virtual QString exportNote(const Document *doc, unsigned int level = 0) const = 0;
virtual QString header() const=0;
virtual QString footer() const=0;
};
#endif // EXPORTSTRATEGY_H