-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconnectionmethod.cpp
More file actions
39 lines (31 loc) · 960 Bytes
/
connectionmethod.cpp
File metadata and controls
39 lines (31 loc) · 960 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include "connectionmethod.h"
#include "ui_connectionmethod.h"
#include "directserverconnect.h"
#include "scanwindow.h"
QWidget* directServerConnect;
QWidget* scanForServers;
ConnectionMethod::ConnectionMethod(QWidget *parent) :
QWidget(parent),
ui(new Ui::ConnectionMethod)
{
ui->setupUi(this);
directServerConnect = new DirectServerConnect();
scanForServers = new ScanWindow();
ui->stackedWidget->addWidget(directServerConnect);
ui->stackedWidget->addWidget(scanForServers);
ui->stackedWidget->setVisible(false);
}
ConnectionMethod::~ConnectionMethod()
{
delete ui;
}
void ConnectionMethod::on_direct_button_clicked()
{
ui->stackedWidget->setVisible(true);
ui->stackedWidget->setCurrentWidget(directServerConnect);
}
void ConnectionMethod::on_scan_button_clicked()
{
ui->stackedWidget->setVisible(true);
ui->stackedWidget->setCurrentWidget(scanForServers);
}