Scribus
Open source desktop publishing at your fingertips
importps.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 IMPORTPS_H
8 #define IMPORTPS_H
9 
10 #include "qglobal.h"
11 #include "qobject.h"
12 #include "qstring.h"
13 
14 #include "pluginapi.h"
15 #include "sccolor.h"
16 #include "fpointarray.h"
17 #include <QList>
18 #include <QPainterPath>
19 
21 class PageItem;
22 class ScribusDoc;
23 class Selection;
25 
27 class EPSPlug : public QObject
28 {
29  Q_OBJECT
30 
31 public:
41  EPSPlug( ScribusDoc* doc, int flags );
42  ~EPSPlug();
43 
53  bool import(QString fn, const TransactionSettings &trSettings, int flags, bool showProgress = true);
54 
55 private:
56 
68  bool convert(QString fn, double x, double y, double b, double h);
74  void parseOutput(QString fn, bool eps);
80  void LineTo(FPointArray *i, QString vals);
86  void Curve(FPointArray *i, QString vals);
95  QString parseColor(QString vals, bool eps, colorModel model = colorModelCMYK);
96  bool Image(QString vals);
97 
98  QList<PageItem*> Elements;
99  ColorList CustColors;
100  double LineW, Opacity, DashOffset, baseX, baseY;
101  QVector<double> DashPattern;
102  QString CurrColor;
103  FPointArray Coords;
104  FPointArray clipCoords;
105  bool FirstM, WasM, ClosedPath;
106  Qt::PenCapStyle CapStyle;
107  Qt::PenJoinStyle JoinStyle;
108  bool interactive;
109  MultiProgressDialog * progressDialog;
110  bool cancel;
111  ScribusDoc* m_Doc;
112  Selection* tmpSel;
113  QPainterPath boundingBoxRect;
114 
115 public slots:
116  void cancelRequested() { cancel = true; }
117 };
118 
119 #endif
EPSPlug(ScribusDoc *doc, int flags)
Create the EPS importer window.
Definition: importps.cpp:57
Definition: sccolor.h:155
the Document Class
Definition: scribusdoc.h:90
POSTSCRIPT importer plugin.
Definition: importps.h:27
Definition: undomanager.h:52
Definition: multiprogressdialog.h:44
Definition: pageitem.h:92
Definition: fpointarray.h:42
Definition: selection.h:34