1 #ifndef SIMPLEIMAGEVIEW_H
2 #define SIMPLEIMAGEVIEW_H
4 #include <QGraphicsView>
6 class SimpleImageView : public QGraphicsView
10 explicit SimpleImageView(QWidget *parent = 0);
12 bool setSource(const QString &path);
16 QAction *m_fitToWindow;
19 QAction *m_scaleNormal;
27 double scaleFactor(const QSize &size);
34 void fileInfo(const QString &info);
37 void fitToWindow(bool checked);
46 void keyPressEvent(QKeyEvent *event);
47 void contextMenuEvent(QContextMenuEvent *event);
48 void resizeEvent(QResizeEvent *event);
51 #endif // SIMPLEIMAGEVIEW_H