MythTV  master
jsmenuevent.h
Go to the documentation of this file.
1 // -*- Mode: c++ -*-
2 /*----------------------------------------------------------------------------
3 ** jsmenuevent.h
4 ** GPL license; Original copyright 2004 Jeremy White <jwhite@whitesen.org>
5 ** although this is largely a derivative of lircevent.h
6 **--------------------------------------------------------------------------*/
7 #ifndef JSMENUEVENT_H_
8 #define JSMENUEVENT_H_
9 
10 #include <utility>
11 
12 // Qt headers
13 #include <QEvent>
14 #include <QString>
15 
16 class JoystickKeycodeEvent : public QEvent
17 {
18  public:
20  QString jsmenuevent_text, int key_code, bool key_down) :
21  QEvent(kEventType), m_jsmenueventtext(std::move(jsmenuevent_text)),
22  m_keycode(key_code), m_keydown(key_down)
23  {
24  }
25 
26  QString getJoystickMenuText() const { return m_jsmenueventtext; }
27  int getKeycode() const { return m_keycode; }
28  bool isKeyDown() const { return m_keydown; }
29 
30  static Type kEventType;
31 
32  private:
34  int m_keycode;
35  bool m_keydown;
36 };
37 
38 #endif
JoystickKeycodeEvent::JoystickKeycodeEvent
JoystickKeycodeEvent(QString jsmenuevent_text, int key_code, bool key_down)
Definition: jsmenuevent.h:19
JoystickKeycodeEvent::m_keycode
int m_keycode
Definition: jsmenuevent.h:34
JoystickKeycodeEvent::getKeycode
int getKeycode() const
Definition: jsmenuevent.h:27
JoystickKeycodeEvent
Definition: jsmenuevent.h:17
JoystickKeycodeEvent::m_keydown
bool m_keydown
Definition: jsmenuevent.h:35
JoystickKeycodeEvent::m_jsmenueventtext
QString m_jsmenueventtext
Definition: jsmenuevent.h:33
JoystickKeycodeEvent::getJoystickMenuText
QString getJoystickMenuText() const
Definition: jsmenuevent.h:26
JoystickKeycodeEvent::kEventType
static Type kEventType
Definition: jsmenuevent.h:30
JoystickKeycodeEvent::isKeyDown
bool isKeyDown() const
Definition: jsmenuevent.h:28