hydrogen
1.2.6
WheelEvent.cpp
Go to the documentation of this file.
1
/*
2
* Hydrogen
3
* Copyright(c) 2002-2008 by Alex >Comix< Cominu [comix@users.sourceforge.net]
4
* Copyright(c) 2008-2025 The hydrogen development team [hydrogen-devel@lists.sourceforge.net]
5
*
6
* http://www.hydrogen-music.org
7
*
8
* This program is free software; you can redistribute it and/or modify
9
* it under the terms of the GNU General Public License as published by
10
* the Free Software Foundation; either version 2 of the License, or
11
* (at your option) any later version.
12
*
13
* This program is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY, without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
* GNU General Public License for more details.
17
*
18
* You should have received a copy of the GNU General Public License
19
* along with this program; if not, write to the Free Software
20
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21
*
22
*/
23
24
#include <core/config.h>
25
26
#include <QtGlobal>
// for QT_VERSION
27
28
#include "
WheelEvent.h
"
29
30
WheelEvent::WheelEvent
( QWheelEvent* pEv ) :
31
#if QT_VERSION >= QT_VERSION_CHECK( 5, 14, 0 )
32
QWheelEvent( pEv->
position
(), pEv->
globalPosition
(),
33
#else
34
QWheelEvent( pEv->pos(), pEv->globalPos(),
35
#endif
36
pEv->pixelDelta(), pEv->angleDelta(), pEv->buttons(),
37
pEv->modifiers(), pEv->phase(), pEv->inverted() ) {
38
};
39
40
WheelEvent::~WheelEvent
() {
41
}
42
43
QPointF
WheelEvent::globalPosition
()
const
{
44
#if QT_VERSION >= QT_VERSION_CHECK( 5, 14, 0 )
45
return
QWheelEvent::globalPosition();
46
#else
47
return
QWheelEvent::globalPos();
48
#endif
49
}
50
51
QPointF
WheelEvent::position
()
const
{
52
#if QT_VERSION >= QT_VERSION_CHECK( 5, 14, 0 )
53
return
QWheelEvent::position();
54
#else
55
return
QWheelEvent::pos();
56
#endif
57
}
WheelEvent.h
WheelEvent::~WheelEvent
~WheelEvent()
Definition
WheelEvent.cpp:40
WheelEvent::position
QPointF position() const
Definition
WheelEvent.cpp:51
WheelEvent::globalPosition
QPointF globalPosition() const
Definition
WheelEvent.cpp:43
WheelEvent::WheelEvent
WheelEvent(QWheelEvent *)
Definition
WheelEvent.cpp:30
src
gui
src
Compatibility
WheelEvent.cpp
Generated by
1.13.2