Scribus
Open source desktop publishing at your fingertips
importcvg.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 #ifndef IMPORTCVG_H
8 #define IMPORTCVG_H
9 
10 #include "pluginapi.h"
11 #include "pageitem.h"
12 #include "sccolor.h"
13 #include "fpointarray.h"
14 #include <QList>
15 #include <QTransform>
16 #include <QMultiMap>
17 #include <QtGlobal>
18 #include <QObject>
19 #include <QString>
20 
21 class MultiProgressDialog;
22 class ScribusDoc;
23 class Selection;
25 
27 class CvgPlug : public QObject
28 {
29  Q_OBJECT
30 
31 public:
41  CvgPlug( ScribusDoc* doc, int flags );
42  ~CvgPlug();
43 
54  bool import(QString fn, const TransactionSettings& trSettings, int flags, bool showProgress = true);
55  QImage readThumbnail(QString fn);
56 
57 private:
58  void parseHeader(QString fName, double &b, double &h);
59  bool convert(QString fn);
60  void getObjects(QDataStream &ts, bool colorFlag, quint32 lenData);
61  void parseColor(quint32 dataF, quint32 dataS, bool color, quint16 flag);
62 
63  QList<PageItem*> Elements;
64  int currentItemNr;
65  QStack<QList<PageItem*> > groupStack;
66  ColorList CustColors;
67  double baseX, baseY;
68  double docWidth;
69  double docHeight;
70  qreal scPg;
71 
72  double LineW;
73  QString CurrColorFill;
74  QString CurrColorStroke;
75  double CurrStrokeShade;
76  double CurrFillShade;
77  QStringList importedColors;
78 
79  FPointArray Coords;
80  bool interactive;
81  MultiProgressDialog * progressDialog;
82  bool cancel;
83  ScribusDoc* m_Doc;
84  Selection* tmpSel;
85  int importerFlags;
86  int oldDocItemCount;
87  QString baseFile;
88 
89 public slots:
90  void cancelRequested() { cancel = true; }
91 };
92 
93 #endif
Definition: sccolor.h:155
the Document Class
Definition: scribusdoc.h:90
Cvg importer plugin.
Definition: importcvg.h:27
Definition: undomanager.h:52
Definition: fpointarray.h:42
CvgPlug(ScribusDoc *doc, int flags)
Create the Cvg importer window.
Definition: importcvg.cpp:53
Definition: selection.h:34