28 lines
536 B
C++
28 lines
536 B
C++
#ifndef IMAGEREDACTOR_H
|
|
#define IMAGEREDACTOR_H
|
|
|
|
#include <QGraphicsView>
|
|
#include <QGraphicsScene>
|
|
#include <QGraphicsPixmapItem>
|
|
#include <QWheelEvent>
|
|
#include <QMouseEvent>
|
|
|
|
class ImageRedactor : public QGraphicsView
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
ImageRedactor(QWidget *parent = nullptr);
|
|
protected:
|
|
void wheelEvent(QWheelEvent *event);
|
|
|
|
void mousePressEvent(QMouseEvent *event);
|
|
|
|
void mouseReleaseEvent(QMouseEvent *event);
|
|
|
|
private:
|
|
QGraphicsScene *scene;
|
|
QGraphicsPixmapItem *item;
|
|
};
|
|
|
|
#endif // IMAGEREDACTOR_H
|