Source

AncientDocumentEditor / documentImageCreator / src / framework / DocumentCreator / iomanager / parametricdocumentloader.h

Full commit
#ifndef PARAMETRICDOCUMENTLOADER_H
#define PARAMETRICDOCUMENTLOADER_H

#include <QStringList>
#include <QChar>

#include "documentloader.h"
#include "cmdlineparser.h"

namespace IOManager
{
    class FRAMEWORK_EXPORT ParametricDocumentLoader : public DocumentLoader
    {
        public:
            // should pass the args line
            ParametricDocumentLoader(QString input);
            virtual ~ParametricDocumentLoader();

            virtual void createNewDocument();

            virtual void buildStyles();
            virtual void buildContent();

        protected:
            virtual DocStyle * buildStyle ();
            virtual Page * buildPage ();
            virtual DocImageBlock * buildImageBlock ();
            virtual DocTextBlock * buildTextBlock ();
            virtual DocParagraph * buildParagraph ();
            DocParagraph * buildParagraph (QStringList paragraph);
            virtual DocString * buildString ();
            DocString * buildString (QString str);
            virtual DocCharacter * buildCharacter ();
            DocCharacter * buildCharacter (const QChar c);

            void loadTextFile(QString filename, Page* p);

            //Attributes
            CmdLineParser * _reader;
            QList<QStringList> _paragraphs;
            QString _fontname;
            QAtomicInt _pageWidth;
            QAtomicInt _pageHeight;
            QAtomicInt _margin;
            QAtomicInt _x;
            QAtomicInt _y;
            QAtomicInt _w;
            QAtomicInt _h;

    };
}

#endif // PARAMETRICDOCUMENTLOADER_H