2024-05-15 15:44:45 -04:00
|
|
|
#ifndef MAINWINDOW_H
|
|
|
|
#define MAINWINDOW_H
|
|
|
|
|
|
|
|
#include <QComboBox>
|
|
|
|
#include <QProcess>
|
|
|
|
#include <QPushButton>
|
2024-05-15 18:18:53 -04:00
|
|
|
#include <QSplitter>
|
2024-05-15 15:44:45 -04:00
|
|
|
#include <QWidget>
|
|
|
|
#include <SDL2/SDL_gamecontroller.h>
|
|
|
|
|
2024-05-15 18:19:57 -04:00
|
|
|
#include "audiohandler.h"
|
2024-05-15 15:44:45 -04:00
|
|
|
#include "backend.h"
|
|
|
|
#include "gamepadhandler.h"
|
|
|
|
#include "videodecoder.h"
|
|
|
|
#include "viewer.h"
|
|
|
|
|
|
|
|
class MainWindow : public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
MainWindow(QWidget *parent = nullptr);
|
|
|
|
virtual ~MainWindow() override;
|
|
|
|
|
2024-05-23 19:02:29 -04:00
|
|
|
static MainWindow *instance();
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
void enableConnectButton();
|
|
|
|
|
2024-05-15 15:44:45 -04:00
|
|
|
private:
|
|
|
|
void populateWirelessInterfaces();
|
|
|
|
void populateMicrophones();
|
|
|
|
void populateControllers();
|
|
|
|
|
|
|
|
Viewer *m_viewer;
|
|
|
|
|
|
|
|
QComboBox *m_wirelessInterfaceComboBox;
|
|
|
|
QComboBox *m_microphoneComboBox;
|
|
|
|
QComboBox *m_controllerComboBox;
|
|
|
|
QProcess *m_process;
|
|
|
|
|
|
|
|
QPushButton *m_syncBtn;
|
|
|
|
QPushButton *m_connectBtn;
|
|
|
|
|
2024-05-15 18:18:53 -04:00
|
|
|
QSplitter *m_splitter;
|
|
|
|
|
2024-05-15 15:44:45 -04:00
|
|
|
Backend *m_backend;
|
|
|
|
VideoDecoder *m_videoDecoder;
|
|
|
|
|
|
|
|
QThread *m_backendThread;
|
|
|
|
QThread *m_videoDecoderThread;
|
|
|
|
|
|
|
|
GamepadHandler *m_gamepadHandler;
|
|
|
|
QThread *m_gamepadHandlerThread;
|
|
|
|
|
2024-05-15 18:19:57 -04:00
|
|
|
AudioHandler *m_audioHandler;
|
|
|
|
QThread *m_audioHandlerThread;
|
|
|
|
|
2024-05-20 23:25:55 -04:00
|
|
|
QPushButton *m_controllerMappingButton;
|
|
|
|
|
2024-05-15 15:44:45 -04:00
|
|
|
private slots:
|
|
|
|
void showSyncDialog();
|
|
|
|
|
|
|
|
void setConnectedState(bool on);
|
|
|
|
|
|
|
|
void setJoystick(int index);
|
|
|
|
|
2024-05-15 18:18:53 -04:00
|
|
|
void setFullScreen();
|
|
|
|
void exitFullScreen();
|
|
|
|
|
2024-05-18 15:55:00 -04:00
|
|
|
void volumeChanged(int val);
|
|
|
|
|
2024-05-20 23:25:55 -04:00
|
|
|
void showInputConfigDialog();
|
|
|
|
|
2024-05-15 15:44:45 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // MAINWINDOW_H
|