Subversion Repositories Scribus

Rev

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

Rev Author Line No. Line
3 paul 1
/***************************************************************************
2
                        scribusXml.h the document xml library for scribus
3
                             -------------------
4
    begin                : Sam Jul 14 10:00:00 CEST 2001
168 Franz 5
    copyright            : (C) 2001 by Christian T�p
3 paul 6
    email                : christian.toepp@mr-ct@gmx.de
7
 ***************************************************************************/
8
 
9
#ifndef _SCRIBUS_CONFIG_
10
#define _SCRIBUS_CONFIG_
11
 
12
#include "scribusview.h"
13
#include <qvaluelist.h>
14
#include <qdom.h>
15
#include <qprogressbar.h>
16
 
1087 cbradney 17
class SplashScreen;
18
 
3 paul 19
class ScriXmlDoc : public QObject
20
{
21
Q_OBJECT
22
public:
23
        ScriXmlDoc() {};
24
        ~ScriXmlDoc() {};
383 Franz 25
        bool IsScribus(QString fileName);
3 paul 26
        QString ReadDatei(QString fileName);
1065 cbradney 27
        QString AskForFont(SCFonts &avail, QString fStr, ApplicationPrefs *Prefs, ScribusDoc *doc);
1789 fschmid 28
        QString GetItemText(QDomElement *it, ScribusDoc *doc, ApplicationPrefs *Prefs, bool VorLFound, bool impo, bool docreading, PageItem* obj = 0);
517 fschmid 29
        void SetItemProps(QDomElement *ob, PageItem* item, bool newFormat);
118 Franz 30
        bool ReadLStyles(QString fileName, QMap<QString,multiLine> *Sty);
1065 cbradney 31
        void GetStyle(QDomElement *pg, struct ParagraphStyle *vg, QValueList<ParagraphStyle> &docParagraphStyles, ScribusDoc* doc, ApplicationPrefs *Prefs, bool fl);
32
        bool ReadStyles(QString fileName, ScribusDoc* doc, ApplicationPrefs *Prefs);
3 paul 33
        bool ReadColors(QString fileName);
118 Franz 34
        bool ReadPageCount(QString fileName, int *num1, int *num2);
332 Franz 35
        bool ReadPage(QString fileName, SCFonts &avail, ScribusDoc *doc, ScribusView *view, int PageToLoad, bool Mpage);
456 fschmid 36
        QString WriteElem(QPtrList<PageItem> *Selitems, ScribusDoc *doc, ScribusView *view);
80 Franz 37
        bool ReadElemHeader(QString file, bool isFile, double *x, double *y, double *w, double *h);
168 Franz 38
        bool ReadElem(QString fileName, SCFonts &avail, ScribusDoc *doc, int Xp, int Yp, bool Fi, bool loc,
1065 cbradney 39
                                         QMap<QString,QString> &FontSub, ApplicationPrefs *Prefs, ScribusView *view);
3 paul 40
        bool ReadDoc(QString fileName, SCFonts &avail, ScribusDoc *docu, ScribusView *viewx, QProgressBar *dia2);
517 fschmid 41
        void WritePages(ScribusDoc *doc, QDomDocument *docu, QDomElement *dc, QProgressBar *dia2, uint maxC, bool master);
2447 fschmid 42
        void WriteObjects(ScribusDoc *doc, QDomDocument *docu, QDomElement *dc, QProgressBar *dia2, uint maxC, int master);
517 fschmid 43
        bool WriteDoc(QString fileName, ScribusDoc *docu, QProgressBar *dia2);
1065 cbradney 44
        void WritePref(ApplicationPrefs *Vor, QString ho);
1392 cbradney 45
        bool ReadPref(struct ApplicationPrefs *Vorein, QString ho, SplashScreen *splash, bool import12);
1065 cbradney 46
        ColorList Farben;
47
        QValueList<ParagraphStyle> docParagraphStyles;
1166 fschmid 48
        struct Linked
49
        {
50
                int Start;
51
                int StPag;
52
        };
3 paul 53
        QValueList<Linked> LFrames;
118 Franz 54
        QStringList MNames;
332 Franz 55
        QMap<QString,QString> DoFonts;
1166 fschmid 56
        QMap<QString,QString> ReplacedFonts;
332 Franz 57
        QMap<uint,QString> DoVorl;
1789 fschmid 58
        QPtrList<Foi> dummyFois;
332 Franz 59
        uint VorlC;
1468 fschmid 60
        bool newReplacement;
3 paul 61
 
62
signals:
63
        void NewPage(int);
64
};
65
 
66
#endif // _SCRIBUS_CONFIG_