| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
#pragma once |
| 5 |
|
| 6 |
#include <QDialog> |
| 7 |
|
| 8 |
#include "DolphinQt/GameList/GameListModel.h" |
| 9 |
|
| 10 |
class QCheckBox; |
| 11 |
class QComboBox; |
| 12 |
class QDialogButtonBox; |
| 13 |
class QLabel; |
| 14 |
class QLineEdit; |
| 15 |
class QListWidget; |
| 16 |
class QGridLayout; |
| 17 |
class QPushButton; |
| 18 |
class QSpinBox; |
| 19 |
class QTabWidget; |
| 20 |
|
| 21 |
namespace UICommon |
| 22 |
{ |
| 23 |
class GameFile; |
| 24 |
} |
| 25 |
|
| 26 |
class NetPlaySetupDialog : public QDialog |
| 27 |
{ |
| 28 |
Q_OBJECT |
| 29 |
public: |
| 30 |
explicit NetPlaySetupDialog(const GameListModel& game_list_model, QWidget* parent); |
| 31 |
|
| 32 |
void accept() override; |
| 33 |
void show(); |
| 34 |
|
| 35 |
signals: |
| 36 |
bool Join(); |
| 37 |
bool Host(const UICommon::GameFile& game); |
| 38 |
|
| 39 |
private: |
| 40 |
void CreateMainLayout(); |
| 41 |
void ConnectWidgets(); |
| 42 |
void PopulateGameList(); |
| 43 |
void ResetTraversalHost(); |
| 44 |
|
| 45 |
void SaveSettings(); |
| 46 |
|
| 47 |
void OnConnectionTypeChanged(int index); |
| 48 |
|
| 49 |
|
| 50 |
QDialogButtonBox* m_button_box; |
| 51 |
QComboBox* m_connection_type; |
| 52 |
QLineEdit* m_nickname_edit; |
| 53 |
QGridLayout* m_main_layout; |
| 54 |
QTabWidget* m_tab_widget; |
| 55 |
QPushButton* m_reset_traversal_button; |
| 56 |
|
| 57 |
|
| 58 |
QLabel* m_ip_label; |
| 59 |
QLineEdit* m_ip_edit; |
| 60 |
QLabel* m_connect_port_label; |
| 61 |
QSpinBox* m_connect_port_box; |
| 62 |
QPushButton* m_connect_button; |
| 63 |
|
| 64 |
|
| 65 |
QLabel* m_host_port_label; |
| 66 |
QSpinBox* m_host_port_box; |
| 67 |
QListWidget* m_host_games; |
| 68 |
QPushButton* m_host_button; |
| 69 |
QCheckBox* m_host_force_port_check; |
| 70 |
QSpinBox* m_host_force_port_box; |
| 71 |
QCheckBox* m_host_chunked_upload_limit_check; |
| 72 |
QSpinBox* m_host_chunked_upload_limit_box; |
| 73 |
QCheckBox* m_host_server_browser; |
| 74 |
QLineEdit* m_host_server_name; |
| 75 |
QLineEdit* m_host_server_password; |
| 76 |
QComboBox* m_host_server_region; |
| 77 |
|
| 78 |
#ifdef USE_UPNP |
| 79 |
QCheckBox* m_host_upnp; |
| 80 |
#endif |
| 81 |
|
| 82 |
const GameListModel& m_game_list_model; |
| 83 |
}; |