MythTV  master
keygrabber.h
Go to the documentation of this file.
1 // -*- Mode: c++ -*-
2 #ifndef KEYGRABBER_H_
3 #define KEYGRABBER_H_
4 
5 // MythUI
6 #include "mythscreentype.h"
7 
8 class MythUIText;
9 class MythUIButton;
10 
16 {
17  Q_OBJECT
18 
19  public:
20  explicit KeyGrabPopupBox(MythScreenStack *parent)
21  : MythScreenType (parent, "keygrabberdialog") {}
22  ~KeyGrabPopupBox() override = default;
23 
24  bool keyPressEvent(QKeyEvent *event) override; // MythScreenType
25  bool Create(void) override; // MythScreenType
26 
27  signals:
28  void HaveResult(QString);
29 
30  private slots:
31  void SendResult();
32 
33  private:
34  bool m_waitingForKeyRelease {false};
35  bool m_keyReleaseSeen {false};
36  QString m_capturedKey;
37 
41 };
42 
43 #endif // KEYGRABBER_H_
KeyGrabPopupBox::SendResult
void SendResult()
Definition: keygrabber.cpp:121
KeyGrabPopupBox::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: keygrabber.cpp:51
KeyGrabPopupBox::m_okButton
MythUIButton * m_okButton
Definition: keygrabber.h:39
KeyGrabPopupBox::m_keyReleaseSeen
bool m_keyReleaseSeen
Definition: keygrabber.h:35
MythScreenStack
Definition: mythscreenstack.h:15
MythScreenType
Screen in which all other widgets are contained and rendered.
Definition: mythscreentype.h:44
KeyGrabPopupBox::m_messageText
MythUIText * m_messageText
Definition: keygrabber.h:38
KeyGrabPopupBox::m_cancelButton
MythUIButton * m_cancelButton
Definition: keygrabber.h:40
KeyGrabPopupBox::m_waitingForKeyRelease
bool m_waitingForKeyRelease
Definition: keygrabber.h:34
MythUIButton
A single button widget.
Definition: mythuibutton.h:21
KeyGrabPopupBox::HaveResult
void HaveResult(QString)
KeyGrabPopupBox::Create
bool Create(void) override
Definition: keygrabber.cpp:16
KeyGrabPopupBox
Captures a key.
Definition: keygrabber.h:15
MythUIText
All purpose text widget, displays a text string.
Definition: mythuitext.h:30
KeyGrabPopupBox::KeyGrabPopupBox
KeyGrabPopupBox(MythScreenStack *parent)
Definition: keygrabber.h:20
KeyGrabPopupBox::~KeyGrabPopupBox
~KeyGrabPopupBox() override=default
KeyGrabPopupBox::m_capturedKey
QString m_capturedKey
Definition: keygrabber.h:36
mythscreentype.h