16 #include "commonstrings.h"
17 #include "pluginapi.h"
20 #include "fpointarray.h"
21 #include "scribusstructs.h"
28 #include <QDomDocument>
29 #include <QDomElement>
31 class MultiProgressDialog;
44 startMarkerWidth(0.0),
45 startMarkerCentered(
false),
48 endMarkerCentered(
false),
49 stroke_dash_distance(0.0),
51 stroke_dash_dots1_length(0.0),
53 stroke_dash_dots2_length(0.0),
54 stroke_dash_style(
"solid"),
56 CurrColorFill(CommonStrings::None),
57 CurrColorStroke(CommonStrings::None),
58 CurrColorText(
"Black"),
59 CurrColorShadow(
"Black"),
66 textAlign(ParagraphStyle::Leftaligned),
70 textUnderlineWords(
false),
71 textUnderlineColor(CommonStrings::None),
72 textStrikeThrough(
false),
88 gradientEndColor(CommonStrings::None),
89 gradientEndShade(100.0),
90 gradientStartColor(CommonStrings::None),
91 gradientStartShade(100.0),
94 gradientType(
"linear"),
108 patternDim_W_in_Percent(
false),
109 patternDim_H_in_Percent(
false),
116 hatchSolidFill(
false),
121 QRectF markerViewBox;
122 QPainterPath markerPath;
123 QString startMarkerName;
124 double startMarkerWidth;
125 bool startMarkerCentered;
126 QString endMarkerName;
127 double endMarkerWidth;
128 bool endMarkerCentered;
129 double stroke_dash_distance;
130 int stroke_dash_dots1;
131 double stroke_dash_dots1_length;
132 int stroke_dash_dots2;
133 double stroke_dash_dots2_length;
134 QString stroke_dash_style;
136 QString CurrColorFill;
137 QString CurrColorStroke;
138 QString CurrColorText;
139 QString CurrColorShadow;
141 double strokeOpacity;
146 ParagraphStyle::AlignmentType textAlign;
150 bool textUnderlineWords;
151 QString textUnderlineColor;
152 bool textStrikeThrough;
157 double margin_bottom;
160 int verticalAlignment;
163 QString page_layout_name;
166 double gradientAngle;
167 double gradientBorder;
168 QString gradientEndColor;
169 double gradientEndShade;
170 QString gradientStartColor;
171 double gradientStartShade;
172 double gradientCenterX;
173 double gradientCenterY;
174 QString gradientType;
175 QString gradientName;
183 QByteArray patternData;
185 double patternHeight;
188 bool patternDim_W_in_Percent;
189 bool patternDim_H_in_Percent;
190 QString patternStretch;
193 double hatchDistance;
194 double hatchRotation;
229 bool import(QString fn,
const TransactionSettings& trSettings,
int flags,
bool showProgress =
true);
230 QImage readThumbnail(QString fn);
314 bool convert(QString fn);
315 bool parseStyleSheets(QString designMap);
316 bool parseStyleSheetsXML(QDomDocument &designMapDom);
317 bool parseDocReference(QString designMap);
318 bool parseDocReferenceXML(QDomDocument &designMapDom);
319 PageItem* parseObj(QDomElement &draw);
320 PageItem* parseForm(QDomElement &e);
321 PageItem* parseConnector(QDomElement &e);
322 PageItem* parseCustomShape(QDomElement &e);
323 PageItem* parseMeasure(QDomElement &e);
324 PageItem* parseLine(QDomElement &e);
325 PageItem* parseEllipse(QDomElement &e);
326 PageItem* parseRect(QDomElement &e);
327 PageItem* parsePolygon(QDomElement &e);
328 PageItem* parsePolyline(QDomElement &e);
329 PageItem* parsePath(QDomElement &e);
330 PageItem* parseFrame(QDomElement &e);
335 void parseTransform(
const QString &transform,
double *rotation,
double *transX,
double *transY);
336 void parseTransform(
FPointArray *composite,
const QString &transform);
337 void parseViewBox(
const QDomElement&
object,
double *x,
double *y,
double *w,
double *h );
338 void appendPoints(
FPointArray *composite,
const QDomElement&
object,
bool closePath);
339 void parseStyles(QDomElement &sp);
340 QString getStyleName(QDomElement &e);
341 void resovleStyle(
ObjStyle &tmpOStyle, QString pAttrs);
342 double parseUnit(
const QString &unit);
343 const char * getCoord(
const char *ptr,
double &number );
344 bool parseEnhPath(
const QString& svgPath,
FPointArray &result,
bool &fill,
bool &stroke);
345 double angleFromPoint(
const QPointF &point);
346 double radSweepAngle(
double start,
double stop,
bool clockwise);
347 double degSweepAngle(
double start,
double stop,
bool clockwise);
348 void arcTo(QPainterPath &path, QPointF startpoint,
double rx,
double ry,
double startAngle,
double sweepAngle);
349 int arcToCurve(
double rx,
double ry,
double startAngle,
double sweepAngle,
const QPointF & offset, QPointF * curvePoints);
350 QString modifyColor(QString name,
bool darker,
int amount);
351 QColor parseColorN(
const QString &rgbColor );
352 QString parseColor(
const QString &s );
353 QString constructFontName(QString fontBaseName, QString fontStyle);
354 QPointF intersectBoundingRect(
PageItem *item, QLineF gradientVector);
357 PageItem* groupObjects(QList<PageItem*> &GElements);
359 QList<PageItem*> Elements;
367 MultiProgressDialog * progressDialog;
369 QStringList importedColors;
370 QStringList importedPatterns;
381 QHash<QString, QString> m_fontMap;
382 QHash<QString, DrawStyle> m_Styles;
383 QHash<QString, int> m_Layers;
387 QHash<QString, QPainterPath> pathResources;
391 void cancelRequested() { cancel =
true; }
Definition: charstyle.h:78
Definition: importodg.h:202
Definition: paragraphstyle.h:27
the Document Class
Definition: scribusdoc.h:90
Definition: undomanager.h:52
Definition: importodg.h:37
Definition: pageitem.h:92
Definition: scribus_zip.h:28
Definition: fpointarray.h:42
OdgPlug(ScribusDoc *doc, int flags)
Create the importer window.
Definition: importodg.cpp:75
Definition: scribusstructs.h:349
Definition: selection.h:34