Subversion Repositories Scribus

Rev

Rev 4672 | Rev 5184 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
4430 cbradney 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
*/
3644 craig 7
#ifndef SCRIBUS_FILELOADER_H
8
#define SCRIBUS_FILELOADER_H
9
#include <qobject.h>
506 fschmid 10
#include <qstring.h>
517 fschmid 11
#include <qvaluelist.h>
12
#include <qmap.h>
2969 craig 13
 
14
#include "scribusapi.h"
838 cbradney 15
#include "scribusstructs.h"
1525 cbradney 16
 
17
class QDomElement;
18
class QProgressBar;
838 cbradney 19
class ScribusDoc;
20
class ScribusView;
21
class SCFonts;
2834 cbradney 22
class PrefsManager;
4024 craig 23
class FileFormat;
506 fschmid 24
 
3644 craig 25
class SCRIBUS_API FileLoader : public QObject
506 fschmid 26
{
3825 cbradney 27
        Q_OBJECT
506 fschmid 28
public:
3644 craig 29
        FileLoader(const QString & fileName);
506 fschmid 30
        ~FileLoader() {};
31
        int TestFile();
32
        int CheckScribus();
4678 cbradney 33
        bool LoadPage(int PageToLoad, bool Mpage, QString renamedPageName=QString::null);
3644 craig 34
        bool LoadFile();
4678 cbradney 35
        bool ReadPage(const QString & fileName, SCFonts &avail, ScribusDoc *doc, int PageToLoad, bool Mpage, QString renamedPageName=QString::null);
3657 cbradney 36
        bool ReadDoc(const QString & fileName, SCFonts &avail, ScribusDoc *doc, QProgressBar *dia2);
3197 fschmid 37
        void GetItemText(QDomElement *it, ScribusDoc *doc, PageItem* obj, bool impo=false, bool VorLFound=false);
3657 cbradney 38
        PageItem* PasteItem(QDomElement *obj, ScribusDoc *doc);
3197 fschmid 39
        void GetStyle(QDomElement *pg, struct ParagraphStyle *vg, QValueList<ParagraphStyle> &docParagraphStyles, ScribusDoc* doc, bool fl);
4672 cbradney 40
        bool postLoad();
3650 cbradney 41
        void informReplacementFonts();
506 fschmid 42
        QString FileName;
43
        int FileType;
4024 craig 44
        const FileFormat * const formatPS;
45
        const FileFormat * const formatSVG;
46
        const FileFormat * const formatSXD;
47
        const FileFormat * const formatODG;
1468 fschmid 48
        bool newReplacement;
537 fschmid 49
        QValueList<int> LFrames;
1166 fschmid 50
        QMap<QString,QString> ReplacedFonts;
517 fschmid 51
        QMap<uint,QString> DoVorl;
3197 fschmid 52
        uint VorlC;
1789 fschmid 53
        QPtrList<Foi> dummyFois;
3644 craig 54
 
3646 craig 55
        static const QString getLoadFilterString();
56
        static QString readSLA(const QString & fileName);
2834 cbradney 57
private:
4024 craig 58
 
2834 cbradney 59
        PrefsManager* prefsManager;
3675 fschmid 60
        double maximumX;
61
        double maximumY;
506 fschmid 62
};
63
 
64
#endif