vanilla/client/mainwindow.h

77 lines
1.4 KiB
C
Raw Normal View History

#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QComboBox>
#include <QProcess>
#include <QPushButton>
2024-05-15 18:18:53 -04:00
#include <QSplitter>
#include <QWidget>
#include <SDL2/SDL_gamecontroller.h>
2024-05-15 18:19:57 -04:00
#include "audiohandler.h"
#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();
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;
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;
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();
};
#endif // MAINWINDOW_H