mirror of
https://git.sr.ht/~thestr4ng3r/chiaki
synced 2025-08-14 18:57:07 -07:00
Add Basic Keyboard Input
This commit is contained in:
parent
3f76782b6c
commit
bf17d81d25
4 changed files with 64 additions and 0 deletions
|
@ -31,6 +31,7 @@ class QGamepad;
|
|||
|
||||
class QAudioOutput;
|
||||
class QIODevice;
|
||||
class QKeyEvent;
|
||||
|
||||
class StreamSession : public QObject
|
||||
{
|
||||
|
@ -45,6 +46,8 @@ class StreamSession : public QObject
|
|||
QGamepad *gamepad;
|
||||
#endif
|
||||
|
||||
ChiakiControllerState keyboard_state;
|
||||
|
||||
VideoDecoder video_decoder;
|
||||
|
||||
QAudioOutput *audio_output;
|
||||
|
@ -62,6 +65,8 @@ class StreamSession : public QObject
|
|||
#endif
|
||||
VideoDecoder *GetVideoDecoder() { return &video_decoder; }
|
||||
|
||||
void HandleKeyboardEvent(QKeyEvent *event);
|
||||
|
||||
signals:
|
||||
void CurrentImageUpdated();
|
||||
|
||||
|
|
|
@ -38,6 +38,10 @@ class StreamWindow: public QMainWindow
|
|||
|
||||
void SetImage(const QImage &image);
|
||||
|
||||
protected:
|
||||
void keyPressEvent(QKeyEvent *event) override;
|
||||
void keyReleaseEvent(QKeyEvent *event) override;
|
||||
|
||||
private slots:
|
||||
void FramesAvailable();
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue