Pool Video Switch v2
Software video switch for distributed remote display in a lecture environment
|
Class for handling the client connection. More...
#include "connectwindow.h"
Public Types | |
enum | ConnectionState { Idle, Scanning, Connecting, AwaitingChallenge, AwaitingChallengeResponse, LoggingIn, InvalidSslHash, InvalidCert, Connected } |
Public Slots | |
void | DoConnect () |
actually connects the connection More... | |
void | DoDisconnect () |
actually disconnects the connection More... | |
void | doShow () |
Signals | |
void | disconnect () |
void | connected (ServerConnection *connection) |
Public Member Functions | |
ConnectWindow (QWidget *parent=nullptr) | |
Initialize Connection Window. More... | |
~ConnectWindow () override | |
ConnectWindow::~ConnectWindow. More... | |
void | connectToSession (const QByteArray &sessionName, const QString &mgrIP) |
Public function connect to session. More... | |
void | setAvailableRooms (const QList< Room > &m) |
set the available rooms. More... | |
Protected Slots | |
void | onBtnConnection () |
Handle click on Connect/Disconnect button. More... | |
void | onBtnHide () |
Handle click on Cancel/Hide Button. More... | |
void | onRoomSelection (int index) |
check if "manual_connection" is selected, then switch to manual connection page More... | |
void | onConnectionStateChange (ConnectWindow::ConnectionState state) |
Handle connection state changes and update member variables describing state. More... | |
void | onConnectionClosed (QObject *connection) |
If connection is closed set _pendingConnection = nullptr. More... | |
void | onConnectionDisconnected (ServerConnection *connection) |
ConnectWindow::onConnectionDisconnected. More... | |
void | onServerDetected (const QString &host, quint16 port, const QByteArray &sessionName, const QByteArray &certHash, bool autoConnect) |
ConnectWindow::onServerDetected. More... | |
Protected Member Functions | |
void | timerEvent (QTimerEvent *event) override |
Called when a Qt timer fires; used for server discovery and auto-hiding the connect dialog. More... | |
void | closeEvent (QCloseEvent *e) override |
Handle incoming closeEvent and hide window. More... | |
void | showEvent (QShowEvent *event) override |
Gives the keyboard input focus to the input line. More... | |
Private Member Functions | |
void | updateUserInterface () |
Handle changes in state and update window. More... | |
Private Attributes | |
Ui::ConnectWindow * | _ui |
int | _hashSslErrorCount |
ServerDiscovery | _serverDiscovery |
ServerConnection * | _pendingConnection |
ConnectionState | _state |
QByteArray | _currentSession |
QString | _currentIp |
QString | _defaultSessionName |
NetworkMessage | _packet |
bool | _tryReconnect {} |
int | _timerHide |
Class for handling the client connection.
Display toolbar with menu bar for connect or disconnect to pvs manager and show current connection status. For connecting with manager, user is able to set sessionName. If connection works correctly flashy green checkmark is shown.
Definition at line 41 of file connectwindow.h.
Enumerator | |
---|---|
Idle | |
Scanning | |
Connecting | |
AwaitingChallenge | |
AwaitingChallengeResponse | |
LoggingIn | |
InvalidSslHash | |
InvalidCert | |
Connected |
Definition at line 46 of file connectwindow.h.
|
explicit |
Initialize Connection Window.
parent |
Definition at line 29 of file connectwindow.cpp.
|
overridedefault |
|
overrideprotected |
Handle incoming closeEvent and hide window.
e |
Definition at line 150 of file connectwindow.cpp.
|
signal |
void ConnectWindow::connectToSession | ( | const QByteArray & | sessionName, |
const QString & | mgrIP | ||
) |
Public function connect to session.
Check if currently connected to server, if not –> connect to given sessionName.
sessionName |
Definition at line 184 of file connectwindow.cpp.
|
signal |
|
slot |
actually connects the connection
Definition at line 202 of file connectwindow.cpp.
|
slot |
actually disconnects the connection
Definition at line 220 of file connectwindow.cpp.
|
slot |
|
protectedslot |
Handle click on Connect/Disconnect button.
If already connected –> Stop/disconnect. Else scanning for given sessionId.
Definition at line 235 of file connectwindow.cpp.
|
protectedslot |
Handle click on Cancel/Hide Button.
Just hide the window.
Definition at line 270 of file connectwindow.cpp.
|
protectedslot |
If connection is closed set _pendingConnection = nullptr.
connection |
Definition at line 337 of file connectwindow.cpp.
|
protectedslot |
ConnectWindow::onConnectionDisconnected.
Definition at line 345 of file connectwindow.cpp.
|
protectedslot |
Handle connection state changes and update member variables describing state.
state |
Definition at line 311 of file connectwindow.cpp.
|
protectedslot |
check if "manual_connection" is selected, then switch to manual connection page
Definition at line 277 of file connectwindow.cpp.
|
protectedslot |
ConnectWindow::onServerDetected.
host | |
port | |
sessionName | |
certHash |
Definition at line 298 of file connectwindow.cpp.
void ConnectWindow::setAvailableRooms | ( | const QList< Room > & | m | ) |
set the available rooms.
If the list of rooms is empty, switches automatically to the "manual connection" page
Definition at line 257 of file connectwindow.cpp.
|
overrideprotected |
Gives the keyboard input focus to the input line.
event |
Definition at line 171 of file connectwindow.cpp.
|
overrideprotected |
Called when a Qt timer fires; used for server discovery and auto-hiding the connect dialog.
Definition at line 134 of file connectwindow.cpp.
|
private |
Handle changes in state and update window.
Also changing TextLabel which shows the user what the program is doing.
Definition at line 75 of file connectwindow.cpp.
|
private |
Definition at line 71 of file connectwindow.h.
|
private |
Definition at line 70 of file connectwindow.h.
|
private |
Definition at line 72 of file connectwindow.h.
|
private |
Definition at line 66 of file connectwindow.h.
|
private |
Definition at line 73 of file connectwindow.h.
|
private |
Definition at line 68 of file connectwindow.h.
|
private |
Definition at line 67 of file connectwindow.h.
|
private |
Definition at line 69 of file connectwindow.h.
|
private |
Definition at line 75 of file connectwindow.h.
|
private |
Definition at line 74 of file connectwindow.h.
|
private |
Definition at line 65 of file connectwindow.h.