15 #include "generalmod.h" 25 friend class QtTabletEventFilter;
31 EnterProximity=171, LeaveProximity=172 };
40 FourDMouse, RotationStylus };
56 int postPressTime()
const;
57 float postPressDist()
const;
58 float maxPostPressDist()
const;
60 static const TabletInfo* currentState();
68 static TabletInfo& latestState();
69 void updatePressData();
78 int xx=0,
int yy=0,
float aa=0 )
79 : butstate_(st), pos_(xx,yy), angle_(aa)
80 , pressed_(false), tabletinfo_(0)
88 MouseEvent& operator=(
const MouseEvent&);
97 int x()
const {
return pos_.x; }
98 int y()
const {
return pos_.y; }
99 float angle()
const {
return angle_; }
102 bool leftButton()
const;
103 bool rightButton()
const;
104 bool middleButton()
const;
105 bool ctrlStatus()
const;
106 bool altStatus()
const;
107 bool shiftStatus()
const;
111 {
return !(*
this==ev); }
117 static float getDefaultTrackpadZoomFactor();
118 static float getDefaultMouseWheelZoomFactor();
170 void triggerButtonReleased(
const MouseEvent&);
210 float offset=
mUdf(
float));
225 : pos_(xx,yy),scale_(sc),angle_(angl)
230 int x()
const {
return pos_.x; }
231 int y()
const {
return pos_.y; }
232 float scale()
const {
return scale_; }
233 float angle()
const {
return angle_; }
235 enum State{ Started, Moving, Finished };
282 void triggerPinchEvent(
Handles gesture event and triggers notifier with GestureEventInfo.
Definition: mouseevent.h:275
#define mExpClass(module)
Definition: commondefs.h:160
Definition: trckeyvalue.h:27
double pressure_
Definition: mouseevent.h:46
Geom::Point2D< int > pos_
Definition: mouseevent.h:44
float offset_
Definition: mouseevent.h:213
int xtilt_
Definition: mouseevent.h:52
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
TabletDevice device_
Definition: mouseevent.h:41
const Geom::Point2D< int > & pos() const
Definition: mouseevent.h:229
bool operator==(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:53
EventType
Definition: mouseevent.h:30
EventType eventtype_
Definition: mouseevent.h:32
bool pressed_
Definition: mouseevent.h:123
Geom::Point2D< int > globalpos_
Definition: mouseevent.h:43
void setState(State st)
Definition: mouseevent.h:237
const Geom::Point2D< int > & pos() const
Definition: mouseevent.h:96
Definition: mouseevent.h:36
float maxpostpressdist_
Definition: mouseevent.h:65
PointerType pointertype_
Definition: mouseevent.h:37
#define od_int64
Definition: plftypes.h:36
double tangentialpressure_
Definition: mouseevent.h:48
void setHandled(bool yn)
Definition: mouseevent.h:287
int ytilt_
Definition: mouseevent.h:53
float angle_
Definition: mouseevent.h:243
Geom::Point2D< int > pos_
Definition: mouseevent.h:241
State getState() const
Definition: mouseevent.h:236
Definition: mouseevent.h:23
TrcKeyValue trkv_
Definition: mouseevent.h:212
Definition: mouseevent.h:202
PointerType
Definition: mouseevent.h:36
FixedString None()
Definition: keystrs.h:90
Definition: mouseevent.h:206
float angle_
Definition: mouseevent.h:125
Notifier< MouseEventHandler > buttonPressed
Definition: mouseevent.h:174
bool ishandled_
Definition: mouseevent.h:193
float angle() const
Definition: mouseevent.h:233
ButtonState
Definition: keyenum.h:20
Stores event information from gesture event.
Definition: mouseevent.h:221
bool isPressed() const
Definition: mouseevent.h:93
void setHandled(bool yn)
Definition: mouseevent.h:186
bool hasEvent() const
Definition: mouseevent.h:180
Notifier< MouseEventHandler > wheelMove
Definition: mouseevent.h:178
OD::ButtonState butstate_
Definition: mouseevent.h:122
int y() const
Definition: mouseevent.h:98
#define mUdf(type)
Use this macro to get the undefined for simple types.
Definition: undefval.h:272
void setPressed(bool yn)
Definition: mouseevent.h:94
State state_
Definition: mouseevent.h:244
float angle() const
used for wheel events
Definition: mouseevent.h:99
int x() const
Definition: mouseevent.h:97
const MouseEvent & event() const
Definition: mouseevent.h:181
Qt's mouse/keyboard state values.
Definition: keyenum.h:22
MouseEvent(const MouseEvent &me)
Definition: mouseevent.h:83
bool operator!=(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:62
Definition: mouseevent.h:162
bool isHandled() const
Definition: mouseevent.h:286
Notifier< MouseEventHandler > buttonReleased
Definition: mouseevent.h:175
bool isHandled() const
Definition: mouseevent.h:185
int y() const
Definition: mouseevent.h:231
double rotation_
Definition: mouseevent.h:47
State
Definition: mouseevent.h:235
Notifier< GestureEventHandler > pinchnotifier
Definition: mouseevent.h:289
Geom::Point2D< int > globalpresspos_
Definition: mouseevent.h:66
MouseEvent * event_
Definition: mouseevent.h:191
float scale_
Definition: mouseevent.h:242
TabletDevice
Definition: mouseevent.h:39
CNotifier< MouseCursorExchange, const Info & > notifier
Definition: mouseevent.h:216
int presstimestamp_
Definition: mouseevent.h:64
Notifier< MouseEventHandler > movement
Definition: mouseevent.h:176
GestureEvent(int xx, int yy, float sc, float angl)
Definition: mouseevent.h:224
Notifier with automatic capsule creation.
Definition: callback.h:395
Notifier< MouseEventHandler > doubleClick
Definition: mouseevent.h:177
OD::ButtonState buttonState() const
Definition: mouseevent.h:90
float scale() const
Definition: mouseevent.h:232
int z_
Definition: mouseevent.h:54
MouseEvent(OD::ButtonState st=OD::NoButton, int xx=0, int yy=0, float aa=0)
Definition: mouseevent.h:77
bool ishandled_
Definition: mouseevent.h:294
Definition: mouseevent.h:73
od_int64 uniqueid_
Definition: mouseevent.h:50
int x() const
Definition: mouseevent.h:230
TabletInfo * tabletinfo_
Definition: mouseevent.h:126
const GestureEvent * currentevent_
Definition: mouseevent.h:293
Geom::Point2D< int > pos_
Definition: mouseevent.h:124