summaryrefslogtreecommitdiff
path: root/src/dictionary/DictionaryWriter.h
blob: 82050a4534e9fccf1351389c208bd2436972e67f (plain)
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
#ifndef DICTIONARYWRITER_H
#define DICTIONARYWRITER_H

#include <QXmlStreamWriter>

class Dictionary;
class Field;
class CardPack;
class DicRecord;

class DictionaryWriter : public QXmlStreamWriter
{
public:
    DictionaryWriter( const Dictionary* aDict );
    bool write( QIODevice* aDevice );

private:
    void writeField( Field* aField );
    void writePack( const CardPack* aPack );
    void writeEntry( const DicRecord* aEntry, QList<Field*> aFields );

private:
    const Dictionary* m_dict;
};

#endif // DICTIONARYWRITER_H