2018-01-19 13:42:21 +00:00
|
|
|
// Copyright 2017 Citra Emulator Project
|
|
|
|
// Licensed under GPLv2 or any later version
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
#include <QDialog>
|
|
|
|
#include <QFutureWatcher>
|
2018-04-18 05:33:54 +00:00
|
|
|
#include "ui_direct_connect.h"
|
2018-01-19 13:42:21 +00:00
|
|
|
|
|
|
|
class DirectConnectWindow : public QDialog {
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit DirectConnectWindow(QWidget* parent = nullptr);
|
|
|
|
|
|
|
|
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;
|
2018-04-18 05:06:02 +00:00
|
|
|
std::unique_ptr<Ui::DirectConnect> ui;
|
2018-01-19 13:42:21 +00:00
|
|
|
};
|