MythTV  master
Public Types | Public Member Functions | Static Public Attributes | Private Attributes | List of all members
MythGestureEvent Class Reference

A custom event that represents a mouse gesture. More...

#include <mythgesture.h>

Inheritance diagram for MythGestureEvent:
Inheritance graph
[legend]
Collaboration diagram for MythGestureEvent:
Collaboration graph
[legend]

Public Types

enum  Gesture {
  Unknown, Up, Down, Left,
  Right, UpLeft, UpRight, DownLeft,
  DownRight, UpThenLeft, UpThenRight, DownThenLeft,
  DownThenRight, LeftThenUp, LeftThenDown, RightThenUp,
  RightThenDown, RightThenLeft, LeftThenRight, UpThenDown,
  DownThenUp, LongClick, Click
}
 

Public Member Functions

 MythGestureEvent (Gesture gesture, Qt::MouseButton Button)
 Create a MythGesture. More...
 
 ~MythGestureEvent () override=default
 
QString GetName () const
 Get the symbolic name of the gesture. More...
 
Gesture GetGesture () const
 
void SetPosition (QPoint Position)
 
QPoint GetPosition () const
 
Qt::MouseButton GetButton () const
 
QString GetButtonName () const
 

Static Public Attributes

static const Type kEventType = static_cast<QEvent::Type>(QEvent::registerEventType())
 

Private Attributes

Gesture m_gesture { Unknown }
 
QPoint m_position
 
Qt::MouseButton m_button { Qt::NoButton }
 

Detailed Description

A custom event that represents a mouse gesture.

Definition at line 39 of file mythgesture.h.

Member Enumeration Documentation

◆ Gesture

Enumerator
Unknown 
Up 
Down 
Left 
Right 
UpLeft 
UpRight 
DownLeft 
DownRight 
UpThenLeft 
UpThenRight 
DownThenLeft 
DownThenRight 
LeftThenUp 
LeftThenDown 
RightThenUp 
RightThenDown 
RightThenLeft 
LeftThenRight 
UpThenDown 
DownThenUp 
LongClick 
Click 

Definition at line 44 of file mythgesture.h.

Constructor & Destructor Documentation

◆ MythGestureEvent()

MythGestureEvent::MythGestureEvent ( Gesture  gesture,
Qt::MouseButton  Button 
)
explicit

Create a MythGesture.

Parameters
gestureWhat type of gesture was performed.
buttonThe button (if any) that was pressed during the gesture.

Definition at line 51 of file mythgesture.cpp.

◆ ~MythGestureEvent()

MythGestureEvent::~MythGestureEvent ( )
overridedefault

Member Function Documentation

◆ GetName()

QString MythGestureEvent::GetName ( ) const

Get the symbolic name of the gesture.

Returns
A string containing the symbolic name of the gesture.

Definition at line 87 of file mythgesture.cpp.

◆ GetGesture()

Gesture MythGestureEvent::GetGesture ( ) const
inline

◆ SetPosition()

void MythGestureEvent::SetPosition ( QPoint  Position)
inline

Definition at line 86 of file mythgesture.h.

Referenced by MythMainWindow::eventFilter().

◆ GetPosition()

QPoint MythGestureEvent::GetPosition ( ) const
inline

Definition at line 87 of file mythgesture.h.

Referenced by MythScreenType::gestureEvent().

◆ GetButton()

Qt::MouseButton MythGestureEvent::GetButton ( ) const
inline

◆ GetButtonName()

QString MythGestureEvent::GetButtonName ( ) const

Definition at line 92 of file mythgesture.cpp.

Member Data Documentation

◆ kEventType

const QEvent::Type MythGestureEvent::kEventType = static_cast<QEvent::Type>(QEvent::registerEventType())
static

◆ m_gesture

Gesture MythGestureEvent::m_gesture { Unknown }
private

Definition at line 94 of file mythgesture.h.

Referenced by GetName().

◆ m_position

QPoint MythGestureEvent::m_position
private

Definition at line 95 of file mythgesture.h.

◆ m_button

Qt::MouseButton MythGestureEvent::m_button { Qt::NoButton }
private

Definition at line 96 of file mythgesture.h.

Referenced by GetButtonName().


The documentation for this class was generated from the following files: