4 #include <QSvgRenderer>
5 #include <QGraphicsView>
6 #include <QGraphicsSvgItem>
9 #include <QXmlStreamReader>
12 class SVGViewer
: public QGraphicsView
{
16 SVGViewer(QWidget
*parent
= 0);
24 bool openFile(QString fileName
);
29 void zoomSet(qreal factor
);
32 void paintEvent(QPaintEvent
* event
);
33 #ifndef QT_NO_WHEELEVENT
34 void wheelEvent(QWheelEvent
* event
);
38 void zoomChange(qreal factor
);
41 QGraphicsSvgItem
* svgItem
;
42 QSvgRenderer
* svgRenderer
;
47 QString
SVGPreserveWhitespace(QString text
);
48 QString
SVGRemoveWhitespace(QString text
);
49 QString
SVGReadText(QXmlStreamReader
* reader
, bool keepWhitespace
);