summaryrefslogtreecommitdiff
path: root/examples/svg/svgviewer/svgview.h
diff options
context:
space:
mode:
Diffstat (limited to 'examples/svg/svgviewer/svgview.h')
-rw-r--r--examples/svg/svgviewer/svgview.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/examples/svg/svgviewer/svgview.h b/examples/svg/svgviewer/svgview.h
index b6d1b01..41c0ca5 100644
--- a/examples/svg/svgviewer/svgview.h
+++ b/examples/svg/svgviewer/svgview.h
@@ -46,7 +46,6 @@
QT_BEGIN_NAMESPACE
class QWheelEvent;
class QPaintEvent;
-class QFile;
QT_END_NAMESPACE
class SvgView : public QGraphicsView
@@ -56,11 +55,13 @@ class SvgView : public QGraphicsView
public:
enum RendererType { Native, OpenGL, Image };
- SvgView(QWidget *parent = 0);
+ explicit SvgView(QWidget *parent = nullptr);
- void openFile(const QFile &file);
+ bool openFile(const QString &fileName);
void setRenderer(RendererType type = Native);
- void drawBackground(QPainter *p, const QRectF &rect);
+ void drawBackground(QPainter *p, const QRectF &rect) override;
+
+ QSize svgSize() const;
public slots:
void setHighQualityAntialiasing(bool highQualityAntialiasing);
@@ -68,8 +69,8 @@ public slots:
void setViewOutline(bool enable);
protected:
- void wheelEvent(QWheelEvent *event);
- void paintEvent(QPaintEvent *event);
+ void wheelEvent(QWheelEvent *event) override;
+ void paintEvent(QPaintEvent *event) override;
private:
RendererType m_renderer;