Go to the documentation of this file.
36 #include <sys/types.h>
84 QString GetName ()
const;
88 Qt::MouseButton
GetButton ()
const {
return m_button; }
89 QString GetButtonName()
const;
96 Qt::MouseButton m_button { Qt::NoButton };
102 explicit MythGesture(
size_t MaxPoints = 10000,
size_t MinPoints = 50,
103 size_t MaxSequence = 20,
int ScaleRatio = 4,
104 float BinPercent = 0.07F);
107 void Stop(
bool Timeout =
false);
110 bool Record(QPoint Point, Qt::MouseButton Button);
132 static const std::map<QString, MythGestureEvent::Gesture>
kSequences;
QPoint GetPosition() const
void AdjustExtremes(int X, int Y)
Adjust horizontal and vertical extremes.
Gesture GetGesture() const
Qt::MouseButton GetButton() const
bool Recording()
Determine if the stroke is being recorded.
void Start()
Start recording.
Contains the points in a stroke, and translates them into gestures.
void Stop(bool Timeout=false)
Stop recording.
MythGestureEvent::Gesture m_lastGesture
QString Translate(bool Timeout)
Translate the stroke into a sequence.
bool Record(QPoint Point, Qt::MouseButton Button)
Record a point.
MythGesture(size_t MaxPoints=10000, size_t MinPoints=50, size_t MaxSequence=20, int ScaleRatio=4, float BinPercent=0.07F)
Create a new stroke, specifying tuning values.
void SetPosition(QPoint Position)
static const std::map< QString, MythGestureEvent::Gesture > kSequences
MythGestureEvent * GetGesture() const
Complete the gesture event of the last completed stroke.
A custom event that represents a mouse gesture.
bool HasMinimumPoints() const
Determine if the stroke has the minimum required points.
Qt::MouseButton m_lastButton