2017-09-06 19:16:31 +02:00
|
|
|
#include "cropview.hpp"
|
|
|
|
|
2017-12-06 14:08:49 +01:00
|
|
|
#include <settings.hpp>
|
|
|
|
#include <utils.hpp>
|
|
|
|
|
2017-09-06 19:16:31 +02:00
|
|
|
CropView::CropView(QGraphicsScene *scene) : ScreenOverlayView(scene) {
|
|
|
|
setCursor(Qt::BlankCursor);
|
|
|
|
}
|
|
|
|
|
|
|
|
CropView::~CropView() {
|
|
|
|
}
|
2017-12-06 14:08:49 +01:00
|
|
|
|
|
|
|
void CropView::showEvent(QShowEvent *) {
|
|
|
|
QPoint p = utils::smallestScreenCoordinate()
|
|
|
|
+ QPoint(settings::settings().value("cropx", 0).toInt(), settings::settings().value("cropy", 0).toInt());
|
|
|
|
if (QApplication::screens().size() == 1) showFullScreen();
|
|
|
|
move(p);
|
|
|
|
setWindowTitle(tr("KShare Crop Editor"));
|
|
|
|
activateWindow();
|
|
|
|
}
|