home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / include / scribus-ng / nftrcreader.h < prev    next >
Encoding:
C/C++ Source or Header  |  2009-02-16  |  1.6 KB  |  59 lines

  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. #include <QObject>
  16. #include <QDir>
  17. #include <QMap>
  18. #include <QString>
  19. #include <QStringList>
  20. #include <QXmlDefaultHandler>
  21. #include "nfttemplate.h"
  22.  
  23. class nftrcreader : public QXmlDefaultHandler
  24. {
  25. private:
  26.     bool inSettings;
  27.     bool inTemplate;
  28.     bool inName;
  29.     bool inFile;
  30.     bool inTNail;
  31.     bool inImg;
  32.     bool inPSize;
  33.     bool inColor;
  34.     bool inDescr;
  35.     bool inUsage;
  36.     bool inScribusVersion;
  37.     bool inDate;
  38.     bool inAuthor;
  39.     bool inEmail;
  40.     QString currentDir;
  41.     QString currentFile;
  42.     QString templateCategory;
  43.     nfttemplate* tmpTemplate;
  44.     std::vector<nfttemplate*> *templates;
  45.     QMap<QString, QString> cats;
  46.     QString getCategory(QString cat);
  47.     void setupCategories();
  48. public:
  49.     nftrcreader(std::vector<nfttemplate*> *tmplts,QString sourceDir);
  50.     bool startDocument();
  51.     bool startElement(const QString&, const QString&, const QString &name, const QXmlAttributes &attrs);
  52.     bool endElement(const QString&, const QString&, const QString &name);
  53.     bool characters(const QString &ch);
  54.     void setSourceDir(QString source);
  55.     void setSourceFile(QString sourceFile);
  56. };
  57.  
  58. #endif
  59.