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(QString jsmenuevent_text, int key_code, bool key_down)
Definition: jsmenuevent.h:19
QString getJoystickMenuText() const
Definition: jsmenuevent.h:26
int getKeycode() const
Definition: jsmenuevent.h:27
QString m_jsmenueventtext
Definition: jsmenuevent.h:33
static Type kEventType
Definition: jsmenuevent.h:30
bool isKeyDown() const
Definition: jsmenuevent.h:28