Update inline comments
[Skavegra.git] / svgviewer.h
blobc49bfebcb508f343c89364fc4fb80c7332e8677e
1 #ifndef SVGVIEWER_H
2 #define SVGVIEWER_H
4 #include <QSvgRenderer>
5 #include <QGraphicsView>
6 #include <QGraphicsSvgItem>
7 #include <QWheelEvent>
8 #include <qmath.h>
10 class SVGViewer : public QGraphicsView
12 Q_OBJECT
14 public:
15 SVGViewer(QWidget *parent = 0);
17 public slots:
18 bool openFile(QString fileName);
19 void closeFile();
20 void zoomIn();
21 void zoomOut();
23 protected:
24 void paintEvent(QPaintEvent* event);
25 void wheelEvent(QWheelEvent* event);
27 private slots:
28 void zoomChange(qreal factor);
30 private:
31 QGraphicsSvgItem* svgItem;
32 QGraphicsScene* gScene;
37 #endif // SVGVIEWER_H