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, Click, MaxGesture
}
 The types of gestures supported by myth. More...
 
enum  Button {
  NoButton, LeftButton, RightButton, MiddleButton,
  Aux1Button, Aux2Button
}
 

Public Member Functions

 MythGestureEvent (Gesture gesture, Button button=LeftButton)
 Create a MythGesture. More...
 
Gesture gesture (void) const
 Get the gesture type. More...
 
 operator QString () const
 Get the symbolic name of the gesture. More...
 
void SetPosition (QPoint position)
 
QPoint GetPosition () const
 
void SetButton (Button button)
 
Button GetButton (void) const
 

Static Public Attributes

static Type kEventType
 

Private Attributes

Gesture m_gesture
 
QPoint m_position
 
Button m_button
 

Detailed Description

A custom event that represents a mouse gesture.

Definition at line 39 of file mythgesture.h.

Member Enumeration Documentation

◆ Gesture

The types of gestures supported by myth.

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

Definition at line 45 of file mythgesture.h.

◆ Button

Enumerator
NoButton 
LeftButton 
RightButton 
MiddleButton 
Aux1Button 
Aux2Button 

Definition at line 81 of file mythgesture.h.

Constructor & Destructor Documentation

◆ MythGestureEvent()

MythGestureEvent::MythGestureEvent ( Gesture  gesture,
Button  button = LeftButton 
)
inline

Create a MythGesture.

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

Definition at line 95 of file mythgesture.h.

Member Function Documentation

◆ gesture()

Gesture MythGestureEvent::gesture ( void  ) const
inline

◆ operator QString()

MythGestureEvent::operator QString ( ) const

Get the symbolic name of the gesture.

Returns
A string containing the symbolic name of the gesture.

Definition at line 363 of file mythgesture.cpp.

◆ SetPosition()

void MythGestureEvent::SetPosition ( QPoint  position)
inline

Definition at line 115 of file mythgesture.h.

Referenced by MythMainWindow::eventFilter().

◆ GetPosition()

QPoint MythGestureEvent::GetPosition ( ) const
inline

Definition at line 116 of file mythgesture.h.

Referenced by MythScreenType::gestureEvent(), and TV::TranslateGesture().

◆ SetButton()

void MythGestureEvent::SetButton ( Button  button)
inline

Definition at line 118 of file mythgesture.h.

Referenced by MythMainWindow::eventFilter().

◆ GetButton()

Button MythGestureEvent::GetButton ( void  ) const
inline

Member Data Documentation

◆ kEventType

QEvent::Type MythGestureEvent::kEventType
static
Initial value:
=
(QEvent::Type) QEvent::registerEventType()

Definition at line 121 of file mythgesture.h.

Referenced by MythMainWindow::customEvent(), TV::event(), TV::eventFilter(), TV::ProcessKeypressOrGesture(), and TV::TranslateKeyPressOrGesture().

◆ m_gesture

Gesture MythGestureEvent::m_gesture
private

Definition at line 124 of file mythgesture.h.

◆ m_position

QPoint MythGestureEvent::m_position
private

Definition at line 125 of file mythgesture.h.

◆ m_button

Button MythGestureEvent::m_button
private

Definition at line 126 of file mythgesture.h.


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