16 #ifndef PVSCONNECTWINDOW_H_
17 #define PVSCONNECTWINDOW_H_
23 #include "../../shared/networkmessage.h"
24 #include "../net/serverdiscovery.h"
25 #include "../util/room.h"
65 Ui::ConnectWindow *
_ui;
82 void showEvent(QShowEvent* event)
override;
94 void onServerDetected(
const QString& host, quint16 port,
const QByteArray& sessionName,
const QByteArray& certHash,
bool autoConnect);
Class for handling the client connection.
void onConnectionClosed(QObject *connection)
If connection is closed set _pendingConnection = nullptr.
void DoDisconnect()
actually disconnects the connection
QString _defaultSessionName
void updateUserInterface()
Handle changes in state and update window.
QByteArray _currentSession
ConnectWindow(QWidget *parent=nullptr)
Initialize Connection Window.
void onBtnConnection()
Handle click on Connect/Disconnect button.
void onServerDetected(const QString &host, quint16 port, const QByteArray &sessionName, const QByteArray &certHash, bool autoConnect)
ConnectWindow::onServerDetected.
void onRoomSelection(int index)
check if "manual_connection" is selected, then switch to manual connection page
ServerDiscovery _serverDiscovery
~ConnectWindow() override
ConnectWindow::~ConnectWindow.
ServerConnection * _pendingConnection
void setAvailableRooms(const QList< Room > &m)
set the available rooms.
void DoConnect()
actually connects the connection
void onBtnHide()
Handle click on Cancel/Hide Button.
void closeEvent(QCloseEvent *e) override
Handle incoming closeEvent and hide window.
void connectToSession(const QByteArray &sessionName, const QString &mgrIP)
Public function connect to session.
void onConnectionDisconnected(ServerConnection *connection)
ConnectWindow::onConnectionDisconnected.
void connected(ServerConnection *connection)
void timerEvent(QTimerEvent *event) override
Called when a Qt timer fires; used for server discovery and auto-hiding the connect dialog...
void onConnectionStateChange(ConnectWindow::ConnectionState state)
Handle connection state changes and update member variables describing state.
void showEvent(QShowEvent *event) override
Gives the keyboard input focus to the input line.