29 lines
581 B
C++
29 lines
581 B
C++
|
#ifndef CROPEDITOR_HPP
|
||
|
#define CROPEDITOR_HPP
|
||
|
|
||
|
#include "cropscene.hpp"
|
||
|
#include "cropview.hpp"
|
||
|
#include <QGraphicsScene>
|
||
|
#include <QGraphicsView>
|
||
|
#include <QObject>
|
||
|
#include <QPixmap>
|
||
|
|
||
|
class CropEditor : public QObject
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
public:
|
||
|
CropEditor(QPixmap *image, QObject *parent = 0);
|
||
|
~CropEditor();
|
||
|
signals:
|
||
|
QPixmap *cropped(QPixmap *pixmap);
|
||
|
|
||
|
private:
|
||
|
void crop(QRect rect);
|
||
|
QPixmap *pixmap = nullptr;
|
||
|
CropScene *scene = nullptr;
|
||
|
CropView *view = nullptr;
|
||
|
QGraphicsPixmapItem *pixmapItem = nullptr;
|
||
|
};
|
||
|
|
||
|
#endif // CROPEDITOR_HPP
|