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 <QEvent>
11 #include <QString>
12 
13 class JoystickKeycodeEvent : public QEvent
14 {
15  public:
17  const QString &jsmenuevent_text, int key_code, bool key_down) :
18  QEvent(kEventType), m_jsmenueventtext(jsmenuevent_text),
19  m_keycode(key_code), m_keydown(key_down)
20  {
21  }
22 
23  QString getJoystickMenuText() const { return m_jsmenueventtext; }
24  int getKeycode() const { return m_keycode; }
25  bool isKeyDown() const { return m_keydown; }
26 
27  static Type kEventType;
28 
29  private:
31  int m_keycode;
32  bool m_keydown;
33 };
34 
35 #endif
QString getJoystickMenuText() const
Definition: jsmenuevent.h:23
int getKeycode() const
Definition: jsmenuevent.h:24
JoystickKeycodeEvent(const QString &jsmenuevent_text, int key_code, bool key_down)
Definition: jsmenuevent.h:16
QString m_jsmenueventtext
Definition: jsmenuevent.h:30
static Type kEventType
Definition: jsmenuevent.h:27
bool isKeyDown() const
Definition: jsmenuevent.h:25