-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initial event filter map for #25, also more efficient point mapping f…
…or cursor tracking in image implemented in image widget. to be transferred to event filter for #25 later.
- Loading branch information
1 parent
0f49e03
commit 1381a7b
Showing
6 changed files
with
91 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#include "transformimagewidgetcropeventfilter.h" | ||
#include <QObject> | ||
#include <QEvent> | ||
|
||
TransformImageWidgetCropEventFilter::TransformImageWidgetCropEventFilter(QObject *parent) : QObject(parent) | ||
{ | ||
|
||
} | ||
|
||
//eventFilter returns true to disable further processing .... | ||
bool TransformImageWidgetCropEventFilter::eventFilter(QObject *watched, QEvent *event) | ||
{ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
//started 9/7/19 // install directly to ImageLabel -> Have slot to "installEventFilterToImage()" or something, then have removeEventFilterFromImageLabel() to be called during radio switch context etc. | ||
|
||
#ifndef TRANSFORMIMAGEWIDGETCROPEVENTFILTER_H | ||
#define TRANSFORMIMAGEWIDGETCROPEVENTFILTER_H | ||
|
||
#include <QObject> | ||
#include <QPoint> | ||
class QLabel; | ||
class QPoint; | ||
|
||
class TransformImageWidgetCropEventFilter : public QObject | ||
{ | ||
Q_OBJECT | ||
public: | ||
explicit TransformImageWidgetCropEventFilter(QObject *parent = nullptr); | ||
|
||
signals: | ||
|
||
public slots: | ||
|
||
protected: | ||
bool eventFilter(QObject *watched, QEvent *event); | ||
|
||
private: | ||
//mouseMoveEvent, mousePressEvent, mouseReleaseEvent, paintEvent | ||
//call redraw after each mouse event | ||
//initializePaintMembers in constructor | ||
//selectRegionOnPixmap | ||
|
||
void setPointFromImage(); //getPointInImage from ImageWidget | ||
QPoint pointInImage_m; //store pointInImage here to not reallocate every time | ||
QPoint dragStart_m; | ||
QLabel *ImageWidget; | ||
|
||
|
||
|
||
}; | ||
|
||
#endif // TRANSFORMIMAGEWIDGETCROPEVENTFILTER_H |