Scribus
Open source desktop publishing at your fingertips
nftrcreader.h
1 /*
2 For general Scribus (>=1.3.2) copyright and licensing information please refer
3 to the COPYING file provided with the program. Following this notice may exist
4 a copyright and/or license notice that predates the release of Scribus 1.3.2
5 for which a new license (GPL+exception) is in place.
6 */
7 /***************************************************************************
8  * Riku Leino, tsoots@gmail.com *
9  ***************************************************************************/
10 #ifndef NFTRCREADER_H
11 #define NFTRCREADER_H
12 
13 #include <vector>
14 #include <utility>
15 
16 #include <QDir>
17 #include <QMap>
18 #include <QObject>
19 #include <QString>
20 #include <QStringList>
21 #include <QXmlStreamReader>
22 
23 #include "nfttemplate.h"
24 
26 {
27 public:
28  nftrcreader(std::vector<nfttemplate*> *tmplts, QString sourceDir);
29 
30  bool parse(QString filePath);
31 
32  void setSourceDir(QString source);
33  void setSourceFile(QString sourceFile);
34 
35 private:
36  QString currentDir;
37  QString currentFile;
38 
39  std::vector<nfttemplate*> *templates;
40  QMap<QString, QString> cats;
41 
42  bool parseTemplate(QXmlStreamReader& reader, nfttemplate* nftTemplate);
43 
44  QString getCategory(QString cat);
45  void setupCategories();
46 };
47 
48 #endif
Definition: nftrcreader.h:25
Definition: nfttemplate.h:17