mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 21:33:47 -07:00
QT_VERSION in hex, sigh
This commit is contained in:
parent
5322b0c4a1
commit
6414e00f37
1 changed files with 3 additions and 3 deletions
|
@ -687,7 +687,7 @@ void Plot::wheelEvent(QWheelEvent *event) {
|
||||||
const float zoom_offset = 0.1;
|
const float zoom_offset = 0.1;
|
||||||
if (event->modifiers() & Qt::ShiftModifier) {
|
if (event->modifiers() & Qt::ShiftModifier) {
|
||||||
// event->position doesn't exist in QT5.12.8, both exist in 5.14.2 and event->x doesn't exist in 5.15.0
|
// event->position doesn't exist in QT5.12.8, both exist in 5.14.2 and event->x doesn't exist in 5.15.0
|
||||||
#if QT_VERSION >= 0x051400
|
#if QT_VERSION >= 0x050d00
|
||||||
int x = event->position().x();
|
int x = event->position().x();
|
||||||
#else
|
#else
|
||||||
int x = event->x();
|
int x = event->x();
|
||||||
|
@ -696,13 +696,13 @@ void Plot::wheelEvent(QWheelEvent *event) {
|
||||||
x = (int)(x / GraphPixelsPerPoint);
|
x = (int)(x / GraphPixelsPerPoint);
|
||||||
x += GraphStart;
|
x += GraphStart;
|
||||||
// event->angleDelta doesn't exist in QT4, both exist in 5.12.8 and 5.14.2 and event->delta doesn't exist in 5.15.0
|
// event->angleDelta doesn't exist in QT4, both exist in 5.12.8 and 5.14.2 and event->delta doesn't exist in 5.15.0
|
||||||
#if QT_VERSION >= 0x051400
|
#if QT_VERSION >= 0x050d00
|
||||||
Zoom(1.0-(float)event->angleDelta().y()/(120/zoom_offset), x);
|
Zoom(1.0-(float)event->angleDelta().y()/(120/zoom_offset), x);
|
||||||
#else
|
#else
|
||||||
Zoom(1.0-(float)event->delta()/(120/zoom_offset), x);
|
Zoom(1.0-(float)event->delta()/(120/zoom_offset), x);
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
#if QT_VERSION >= 0x051400
|
#if QT_VERSION >= 0x050d00
|
||||||
Move(PageWidth*(-(float)event->angleDelta().y()/(120/move_offset)));
|
Move(PageWidth*(-(float)event->angleDelta().y()/(120/move_offset)));
|
||||||
#else
|
#else
|
||||||
Move(PageWidth*(-(float)event->delta()/(120/move_offset)));
|
Move(PageWidth*(-(float)event->delta()/(120/move_offset)));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue