Source

Target

Commits (3)
Showing with 97 additions and 39 deletions
File mode changed from 100755 to 100644
...@@ -49,10 +49,11 @@ ...@@ -49,10 +49,11 @@
#include "qhash.h" #include "qhash.h"
#include "qstring.h" #include "qstring.h"
#include "qsvgstyle_p.h" #include "qsvgstyle_p.h"
#include "qtsvgglobal_p.h"
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
class QSvgGlyph class Q_SVG_PRIVATE_EXPORT QSvgGlyph
{ {
public: public:
QSvgGlyph(QChar unicode, const QPainterPath &path, qreal horizAdvX); QSvgGlyph(QChar unicode, const QPainterPath &path, qreal horizAdvX);
...@@ -64,7 +65,7 @@ public: ...@@ -64,7 +65,7 @@ public:
}; };
class QSvgFont : public QSvgRefCounted class Q_SVG_PRIVATE_EXPORT QSvgFont : public QSvgRefCounted
{ {
public: public:
QSvgFont(qreal horizAdvX); QSvgFont(qreal horizAdvX);
......
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
// //
#include "qsvgnode_p.h" #include "qsvgnode_p.h"
#include "qtsvgglobal_p.h"
#include "QtGui/qpainterpath.h" #include "QtGui/qpainterpath.h"
#include "QtGui/qimage.h" #include "QtGui/qimage.h"
...@@ -57,14 +58,14 @@ QT_BEGIN_NAMESPACE ...@@ -57,14 +58,14 @@ QT_BEGIN_NAMESPACE
class QTextCharFormat; class QTextCharFormat;
class QSvgAnimation : public QSvgNode class Q_SVG_PRIVATE_EXPORT QSvgAnimation : public QSvgNode
{ {
public: public:
virtual void draw(QPainter *p, QSvgExtraStates &states); virtual void draw(QPainter *p, QSvgExtraStates &states);
virtual Type type() const; virtual Type type() const;
}; };
class QSvgArc : public QSvgNode class Q_SVG_PRIVATE_EXPORT QSvgArc : public QSvgNode
{ {
public: public:
QSvgArc(QSvgNode *parent, const QPainterPath &path); QSvgArc(QSvgNode *parent, const QPainterPath &path);
...@@ -75,7 +76,7 @@ private: ...@@ -75,7 +76,7 @@ private:
QPainterPath m_path; QPainterPath m_path;
}; };
class QSvgEllipse : public QSvgNode class Q_SVG_PRIVATE_EXPORT QSvgEllipse : public QSvgNode
{ {
public: public:
QSvgEllipse(QSvgNode *parent, const QRectF &rect); QSvgEllipse(QSvgNode *parent, const QRectF &rect);
...@@ -86,14 +87,14 @@ private: ...@@ -86,14 +87,14 @@ private:
QRectF m_bounds; QRectF m_bounds;
}; };
class QSvgCircle : public QSvgEllipse class Q_SVG_PRIVATE_EXPORT QSvgCircle : public QSvgEllipse
{ {
public: public:
QSvgCircle(QSvgNode *parent, const QRectF &rect) : QSvgEllipse(parent, rect) { } QSvgCircle(QSvgNode *parent, const QRectF &rect) : QSvgEllipse(parent, rect) { }
virtual Type type() const; virtual Type type() const;
}; };
class QSvgImage : public QSvgNode class Q_SVG_PRIVATE_EXPORT QSvgImage : public QSvgNode
{ {
public: public:
QSvgImage(QSvgNode *parent, const QImage &image, QSvgImage(QSvgNode *parent, const QImage &image,
...@@ -106,7 +107,7 @@ private: ...@@ -106,7 +107,7 @@ private:
QRect m_bounds; QRect m_bounds;
}; };
class QSvgLine : public QSvgNode class Q_SVG_PRIVATE_EXPORT QSvgLine : public QSvgNode
{ {
public: public:
QSvgLine(QSvgNode *parent, const QLineF &line); QSvgLine(QSvgNode *parent, const QLineF &line);
...@@ -117,7 +118,7 @@ private: ...@@ -117,7 +118,7 @@ private:
QLineF m_line; QLineF m_line;
}; };
class QSvgPath : public QSvgNode class Q_SVG_PRIVATE_EXPORT QSvgPath : public QSvgNode
{ {
public: public:
QSvgPath(QSvgNode *parent, const QPainterPath &qpath); QSvgPath(QSvgNode *parent, const QPainterPath &qpath);
...@@ -132,7 +133,7 @@ private: ...@@ -132,7 +133,7 @@ private:
QPainterPath m_path; QPainterPath m_path;
}; };
class QSvgPolygon : public QSvgNode class Q_SVG_PRIVATE_EXPORT QSvgPolygon : public QSvgNode
{ {
public: public:
QSvgPolygon(QSvgNode *parent, const QPolygonF &poly); QSvgPolygon(QSvgNode *parent, const QPolygonF &poly);
...@@ -143,7 +144,7 @@ private: ...@@ -143,7 +144,7 @@ private:
QPolygonF m_poly; QPolygonF m_poly;
}; };
class QSvgPolyline : public QSvgNode class Q_SVG_PRIVATE_EXPORT QSvgPolyline : public QSvgNode
{ {
public: public:
QSvgPolyline(QSvgNode *parent, const QPolygonF &poly); QSvgPolyline(QSvgNode *parent, const QPolygonF &poly);
...@@ -154,7 +155,7 @@ private: ...@@ -154,7 +155,7 @@ private:
QPolygonF m_poly; QPolygonF m_poly;
}; };
class QSvgRect : public QSvgNode class Q_SVG_PRIVATE_EXPORT QSvgRect : public QSvgNode
{ {
public: public:
QSvgRect(QSvgNode *paren, const QRectF &rect, int rx=0, int ry=0); QSvgRect(QSvgNode *paren, const QRectF &rect, int rx=0, int ry=0);
...@@ -168,7 +169,7 @@ private: ...@@ -168,7 +169,7 @@ private:
class QSvgTspan; class QSvgTspan;
class QSvgText : public QSvgNode class Q_SVG_PRIVATE_EXPORT QSvgText : public QSvgNode
{ {
public: public:
enum WhitespaceMode enum WhitespaceMode
...@@ -204,7 +205,7 @@ private: ...@@ -204,7 +205,7 @@ private:
WhitespaceMode m_mode; WhitespaceMode m_mode;
}; };
class QSvgTspan : public QSvgNode class Q_SVG_PRIVATE_EXPORT QSvgTspan : public QSvgNode
{ {
public: public:
// tspans are also used to store normal text, so the 'isProperTspan' is used to separate text from tspan. // tspans are also used to store normal text, so the 'isProperTspan' is used to separate text from tspan.
......
...@@ -51,6 +51,7 @@ ...@@ -51,6 +51,7 @@
#include "qsvgstyle_p.h" #include "qsvgstyle_p.h"
#include "private/qcssparser_p.h" #include "private/qcssparser_p.h"
#include "qsvggraphics_p.h" #include "qsvggraphics_p.h"
#include "qtsvgglobal_p.h"
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
...@@ -71,7 +72,7 @@ struct QSvgCssAttribute ...@@ -71,7 +72,7 @@ struct QSvgCssAttribute
#endif #endif
class QSvgHandler class Q_SVG_PRIVATE_EXPORT QSvgHandler
{ {
public: public:
enum LengthType { enum LengthType {
......
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
// //
#include "qsvgstyle_p.h" #include "qsvgstyle_p.h"
#include "qtsvgglobal_p.h"
#include "QtCore/qstring.h" #include "QtCore/qstring.h"
#include "QtCore/qhash.h" #include "QtCore/qhash.h"
...@@ -55,7 +56,7 @@ QT_BEGIN_NAMESPACE ...@@ -55,7 +56,7 @@ QT_BEGIN_NAMESPACE
class QPainter; class QPainter;
class QSvgTinyDocument; class QSvgTinyDocument;
class QSvgNode class Q_SVG_PRIVATE_EXPORT QSvgNode
{ {
public: public:
enum Type enum Type
......
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
// //
#include "qsvgnode_p.h" #include "qsvgnode_p.h"
#include "qtsvgglobal_p.h"
#include "QtCore/qlist.h" #include "QtCore/qlist.h"
#include "QtCore/qhash.h" #include "QtCore/qhash.h"
...@@ -57,7 +58,7 @@ class QSvgNode; ...@@ -57,7 +58,7 @@ class QSvgNode;
class QPainter; class QPainter;
class QSvgDefs; class QSvgDefs;
class QSvgStructureNode : public QSvgNode class Q_SVG_PRIVATE_EXPORT QSvgStructureNode : public QSvgNode
{ {
public: public:
QSvgStructureNode(QSvgNode *parent); QSvgStructureNode(QSvgNode *parent);
...@@ -73,7 +74,7 @@ protected: ...@@ -73,7 +74,7 @@ protected:
QList<QSvgStructureNode*> m_linkedScopes; QList<QSvgStructureNode*> m_linkedScopes;
}; };
class QSvgG : public QSvgStructureNode class Q_SVG_PRIVATE_EXPORT QSvgG : public QSvgStructureNode
{ {
public: public:
QSvgG(QSvgNode *parent); QSvgG(QSvgNode *parent);
...@@ -81,7 +82,7 @@ public: ...@@ -81,7 +82,7 @@ public:
Type type() const; Type type() const;
}; };
class QSvgDefs : public QSvgStructureNode class Q_SVG_PRIVATE_EXPORT QSvgDefs : public QSvgStructureNode
{ {
public: public:
QSvgDefs(QSvgNode *parent); QSvgDefs(QSvgNode *parent);
...@@ -89,7 +90,7 @@ public: ...@@ -89,7 +90,7 @@ public:
Type type() const; Type type() const;
}; };
class QSvgSwitch : public QSvgStructureNode class Q_SVG_PRIVATE_EXPORT QSvgSwitch : public QSvgStructureNode
{ {
public: public:
QSvgSwitch(QSvgNode *parent); QSvgSwitch(QSvgNode *parent);
......
...@@ -52,6 +52,7 @@ ...@@ -52,6 +52,7 @@
#include "QtGui/qcolor.h" #include "QtGui/qcolor.h"
#include "QtGui/qfont.h" #include "QtGui/qfont.h"
#include <qdebug.h> #include <qdebug.h>
#include "qtsvgglobal_p.h"
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
...@@ -107,7 +108,7 @@ private: ...@@ -107,7 +108,7 @@ private:
T *t; T *t;
}; };
class QSvgRefCounted class Q_SVG_PRIVATE_EXPORT QSvgRefCounted
{ {
public: public:
QSvgRefCounted() { _ref = 0; } QSvgRefCounted() { _ref = 0; }
...@@ -127,7 +128,7 @@ private: ...@@ -127,7 +128,7 @@ private:
int _ref; int _ref;
}; };
struct QSvgExtraStates struct Q_SVG_PRIVATE_EXPORT QSvgExtraStates
{ {
QSvgExtraStates(); QSvgExtraStates();
...@@ -141,7 +142,7 @@ struct QSvgExtraStates ...@@ -141,7 +142,7 @@ struct QSvgExtraStates
bool vectorEffect; // true if pen is cosmetic bool vectorEffect; // true if pen is cosmetic
}; };
class QSvgStyleProperty : public QSvgRefCounted class Q_SVG_PRIVATE_EXPORT QSvgStyleProperty : public QSvgRefCounted
{ {
public: public:
enum Type enum Type
...@@ -166,7 +167,7 @@ public: ...@@ -166,7 +167,7 @@ public:
virtual Type type() const=0; virtual Type type() const=0;
}; };
class QSvgFillStyleProperty : public QSvgStyleProperty class Q_SVG_PRIVATE_EXPORT QSvgFillStyleProperty : public QSvgStyleProperty
{ {
public: public:
virtual QBrush brush(QPainter *p, QSvgExtraStates &states) = 0; virtual QBrush brush(QPainter *p, QSvgExtraStates &states) = 0;
...@@ -174,7 +175,7 @@ public: ...@@ -174,7 +175,7 @@ public:
virtual void revert(QPainter *p, QSvgExtraStates &states); virtual void revert(QPainter *p, QSvgExtraStates &states);
}; };
class QSvgQualityStyle : public QSvgStyleProperty class Q_SVG_PRIVATE_EXPORT QSvgQualityStyle : public QSvgStyleProperty
{ {
public: public:
QSvgQualityStyle(int color); QSvgQualityStyle(int color);
...@@ -206,7 +207,7 @@ private: ...@@ -206,7 +207,7 @@ private:
class QSvgOpacityStyle : public QSvgStyleProperty class Q_SVG_PRIVATE_EXPORT QSvgOpacityStyle : public QSvgStyleProperty
{ {
public: public:
QSvgOpacityStyle(qreal opacity); QSvgOpacityStyle(qreal opacity);
...@@ -218,7 +219,7 @@ private: ...@@ -218,7 +219,7 @@ private:
qreal m_oldOpacity; qreal m_oldOpacity;
}; };
class QSvgFillStyle : public QSvgStyleProperty class Q_SVG_PRIVATE_EXPORT QSvgFillStyle : public QSvgStyleProperty
{ {
public: public:
QSvgFillStyle(); QSvgFillStyle();
...@@ -291,7 +292,7 @@ private: ...@@ -291,7 +292,7 @@ private:
uint m_fillSet : 1; uint m_fillSet : 1;
}; };
class QSvgViewportFillStyle : public QSvgStyleProperty class Q_SVG_PRIVATE_EXPORT QSvgViewportFillStyle : public QSvgStyleProperty
{ {
public: public:
QSvgViewportFillStyle(const QBrush &brush); QSvgViewportFillStyle(const QBrush &brush);
...@@ -311,7 +312,7 @@ private: ...@@ -311,7 +312,7 @@ private:
QBrush m_oldFill; QBrush m_oldFill;
}; };
class QSvgFontStyle : public QSvgStyleProperty class Q_SVG_PRIVATE_EXPORT QSvgFontStyle : public QSvgStyleProperty
{ {
public: public:
static const int LIGHTER = -1; static const int LIGHTER = -1;
...@@ -395,7 +396,7 @@ private: ...@@ -395,7 +396,7 @@ private:
uint m_textAnchorSet : 1; uint m_textAnchorSet : 1;
}; };
class QSvgStrokeStyle : public QSvgStyleProperty class Q_SVG_PRIVATE_EXPORT QSvgStrokeStyle : public QSvgStyleProperty
{ {
public: public:
QSvgStrokeStyle(); QSvgStrokeStyle();
...@@ -535,7 +536,7 @@ private: ...@@ -535,7 +536,7 @@ private:
uint m_vectorEffectSet : 1; uint m_vectorEffectSet : 1;
}; };
class QSvgSolidColorStyle : public QSvgFillStyleProperty class Q_SVG_PRIVATE_EXPORT QSvgSolidColorStyle : public QSvgFillStyleProperty
{ {
public: public:
QSvgSolidColorStyle(const QColor &color); QSvgSolidColorStyle(const QColor &color);
...@@ -560,7 +561,7 @@ private: ...@@ -560,7 +561,7 @@ private:
QPen m_oldStroke; QPen m_oldStroke;
}; };
class QSvgGradientStyle : public QSvgFillStyleProperty class Q_SVG_PRIVATE_EXPORT QSvgGradientStyle : public QSvgFillStyleProperty
{ {
public: public:
QSvgGradientStyle(QGradient *grad); QSvgGradientStyle(QGradient *grad);
...@@ -602,7 +603,7 @@ private: ...@@ -602,7 +603,7 @@ private:
bool m_gradientStopsSet; bool m_gradientStopsSet;
}; };
class QSvgTransformStyle : public QSvgStyleProperty class Q_SVG_PRIVATE_EXPORT QSvgTransformStyle : public QSvgStyleProperty
{ {
public: public:
QSvgTransformStyle(const QTransform &transform); QSvgTransformStyle(const QTransform &transform);
...@@ -621,7 +622,7 @@ private: ...@@ -621,7 +622,7 @@ private:
}; };
class QSvgAnimateTransform : public QSvgStyleProperty class Q_SVG_PRIVATE_EXPORT QSvgAnimateTransform : public QSvgStyleProperty
{ {
public: public:
enum TransformType enum TransformType
...@@ -694,7 +695,7 @@ private: ...@@ -694,7 +695,7 @@ private:
}; };
class QSvgAnimateColor : public QSvgStyleProperty class Q_SVG_PRIVATE_EXPORT QSvgAnimateColor : public QSvgStyleProperty
{ {
public: public:
QSvgAnimateColor(int startMs, int endMs, int by = 0); QSvgAnimateColor(int startMs, int endMs, int by = 0);
...@@ -717,7 +718,7 @@ private: ...@@ -717,7 +718,7 @@ private:
}; };
class QSvgCompOpStyle : public QSvgStyleProperty class Q_SVG_PRIVATE_EXPORT QSvgCompOpStyle : public QSvgStyleProperty
{ {
public: public:
QSvgCompOpStyle(QPainter::CompositionMode mode); QSvgCompOpStyle(QPainter::CompositionMode mode);
...@@ -737,7 +738,7 @@ private: ...@@ -737,7 +738,7 @@ private:
}; };
class QSvgStyle class Q_SVG_PRIVATE_EXPORT QSvgStyle
{ {
public: public:
QSvgStyle() QSvgStyle()
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
// //
#include "qsvgstructure_p.h" #include "qsvgstructure_p.h"
#include "qtsvgglobal.h" #include "qtsvgglobal_p.h"
#include "QtCore/qrect.h" #include "QtCore/qrect.h"
#include "QtCore/qlist.h" #include "QtCore/qlist.h"
...@@ -62,7 +62,7 @@ class QPainter; ...@@ -62,7 +62,7 @@ class QPainter;
class QByteArray; class QByteArray;
class QSvgFont; class QSvgFont;
class Q_SVG_EXPORT QSvgTinyDocument : public QSvgStructureNode class Q_SVG_PRIVATE_EXPORT QSvgTinyDocument : public QSvgStructureNode
{ {
public: public:
static QSvgTinyDocument * load(const QString &file); static QSvgTinyDocument * load(const QString &file);
......
/****************************************************************************
**
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt SVG module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 or version 3 as published by the Free
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
** following information to ensure the GNU Lesser General Public License
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QTSVGGLOBAL_P_H
#define QTSVGGLOBAL_P_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include "qtsvgglobal.h"
#define Q_SVG_PRIVATE_EXPORT Q_SVG_EXPORT
#endif // QTSVGGLOBAL_P_H