diff options
Diffstat (limited to 'src/client/connectwindow/connectwindow.h')
-rw-r--r-- | src/client/connectwindow/connectwindow.h | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/client/connectwindow/connectwindow.h b/src/client/connectwindow/connectwindow.h index 9fcaf4e..4a0ae7d 100644 --- a/src/client/connectwindow/connectwindow.h +++ b/src/client/connectwindow/connectwindow.h @@ -16,7 +16,7 @@ #ifndef PVSCONNECTWINDOW_H_ #define PVSCONNECTWINDOW_H_ -#include <QtWidgets> +#include <QWidget> #include <QMap> #include <QUdpSocket> #include <QSslSocket> @@ -28,6 +28,7 @@ namespace Ui { class ConnectWindow; } + class ServerConnection; /** @@ -55,10 +56,10 @@ public: }; explicit ConnectWindow(QWidget *parent = nullptr); - virtual ~ConnectWindow(); + ~ConnectWindow() override; - void connectToSession(const QByteArray sessionName, QString mgrIP); - void setAvailableRooms(QList<Room> m); + void connectToSession(const QByteArray& sessionName, const QString &mgrIP); + void setAvailableRooms(const QList<Room>& m); private: Ui::ConnectWindow *_ui; @@ -70,18 +71,17 @@ private: QString _currentIp; QString _defaultSessionName; NetworkMessage _packet; - bool _tryReconnect; + bool _tryReconnect{}; int _timerHide; void updateUserInterface(); protected: - void timerEvent(QTimerEvent* event); - void closeEvent(QCloseEvent *e); - void showEvent(QShowEvent* event); + void timerEvent(QTimerEvent* event) override; + void closeEvent(QCloseEvent *e) override; + void showEvent(QShowEvent* event) override; protected slots: - void doShow(); void onBtnConnection(); void onBtnHide(); @@ -91,13 +91,15 @@ protected slots: void onConnectionClosed(QObject* connection); void onConnectionDisconnected(ServerConnection* connection); // void onUdpReadyRead(); - void onServerDetected(const QString& host, const quint16 port, const QByteArray& sessionName, const QByteArray& certHash, bool autoConnect); + void onServerDetected(const QString& host, quint16 port, const QByteArray& sessionName, const QByteArray& certHash, bool autoConnect); public slots: /** actually connects the connection **/ void DoConnect(); /** actually disconnects the connection **/ void DoDisconnect(); + + void doShow(); signals: void disconnect(); void connected(ServerConnection* connection); |