Subversion Repositories seema-scanner

Rev

Rev 220 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
201 jakw 1
#ifndef SMVIDEOZOOMWIDGET_H
2
#define SMVIDEOZOOMWIDGET_H
3
 
4
#include <QObject>
5
#include <QGraphicsView>
6
#include <QGraphicsPixmapItem>
7
#include <QMouseEvent>
8
 
9
#include <opencv2/opencv.hpp>
10
 
11
class SMVideoZoomWidget : public QGraphicsView {
12
    Q_OBJECT
13
 
14
    public:
15
        explicit SMVideoZoomWidget(QWidget *parent = 0);
16
        ~SMVideoZoomWidget();
17
    public slots:
18
        void showImageCV(cv::Mat image);
227 jakw 19
        void fitImage();
201 jakw 20
    protected:
21
        virtual void mousePressEvent(QMouseEvent *event);
22
        virtual void mouseReleaseEvent(QMouseEvent *event);
23
        virtual void wheelEvent(QWheelEvent *event);
24
        virtual void resizeEvent(QResizeEvent *event);
25
    protected slots:
26
        virtual void showContextMenu(const QPoint & pos);
27
    private:
220 flgw 28
        QGraphicsScene *scene=nullptr;
29
        QGraphicsPixmapItem *item=nullptr;
201 jakw 30
};
31
 
32
#endif // SMVIDEOZOOMWIDGET_H