2017-04-23 15:05:48 +02:00
|
|
|
#ifndef CROPEDITOR_HPP
|
|
|
|
#define CROPEDITOR_HPP
|
|
|
|
|
|
|
|
#include "cropscene.hpp"
|
|
|
|
#include "cropview.hpp"
|
|
|
|
#include <QGraphicsScene>
|
|
|
|
#include <QGraphicsView>
|
|
|
|
#include <QObject>
|
|
|
|
#include <QPixmap>
|
|
|
|
|
2017-05-06 13:21:12 +02:00
|
|
|
class CropEditor : public QObject {
|
2017-05-09 17:26:00 +02:00
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
CropEditor(QPixmap *image, QObject *parent = 0);
|
|
|
|
~CropEditor();
|
|
|
|
signals:
|
|
|
|
QPixmap *cropped(QPixmap *pixmap);
|
2017-04-23 15:05:48 +02:00
|
|
|
|
2017-05-09 17:26:00 +02:00
|
|
|
private:
|
|
|
|
void crop(QRect rect);
|
|
|
|
CropScene *scene = nullptr;
|
|
|
|
CropView *view = nullptr;
|
|
|
|
QGraphicsPixmapItem *pixmapItem = nullptr;
|
2017-04-23 15:05:48 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CROPEDITOR_HPP
|