diff options
Diffstat (limited to 'src/yuzu/multiplayer/direct_connect.h')
-rw-r--r-- | src/yuzu/multiplayer/direct_connect.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/yuzu/multiplayer/direct_connect.h b/src/yuzu/multiplayer/direct_connect.h new file mode 100644 index 000000000..4e1043053 --- /dev/null +++ b/src/yuzu/multiplayer/direct_connect.h @@ -0,0 +1,43 @@ +// SPDX-FileCopyrightText: Copyright 2017 Citra Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include <memory> +#include <QDialog> +#include <QFutureWatcher> +#include "yuzu/multiplayer/validation.h" + +namespace Ui { +class DirectConnect; +} + +class DirectConnectWindow : public QDialog { + Q_OBJECT + +public: + explicit DirectConnectWindow(Network::RoomNetwork& room_network_, QWidget* parent = nullptr); + ~DirectConnectWindow(); + + void RetranslateUi(); + +signals: + /** + * Signalled by this widget when it is closing itself and destroying any state such as + * connections that it might have. + */ + void Closed(); + +private slots: + void OnConnection(); + +private: + void Connect(); + void BeginConnecting(); + void EndConnecting(); + + QFutureWatcher<void>* watcher; + std::unique_ptr<Ui::DirectConnect> ui; + Validation validation; + Network::RoomNetwork& room_network; +}; |