KShare/cropeditor/cropeditor.hpp
ArsenArsen d44aae4f43 Fix a memory leak with the crop editor
I did not properly handle deleting the editor so it would stay in memory permanently.
2017-07-02 20:51:15 +02:00

26 lines
489 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);
CropScene *scene = nullptr;
CropView *view = nullptr;
};
#endif // CROPEDITOR_HPP