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
|
2017-06-14 23:34:58 +02:00
|
|
|
public:
|
2017-07-02 20:51:15 +02:00
|
|
|
CropEditor(QPixmap image, QObject *parent = 0);
|
2017-05-09 17:26:00 +02:00
|
|
|
~CropEditor();
|
2017-06-14 23:34:58 +02:00
|
|
|
signals:
|
2017-07-02 20:51:15 +02:00
|
|
|
QPixmap *cropped(QPixmap pixmap);
|
2017-04-23 15:05:48 +02:00
|
|
|
|
2017-06-14 23:34:58 +02:00
|
|
|
private:
|
2017-05-09 17:26:00 +02:00
|
|
|
void crop(QRect rect);
|
|
|
|
CropScene *scene = nullptr;
|
|
|
|
CropView *view = nullptr;
|
2017-04-23 15:05:48 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CROPEDITOR_HPP
|