-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconnectdialog.cpp
More file actions
46 lines (40 loc) · 825 Bytes
/
connectdialog.cpp
File metadata and controls
46 lines (40 loc) · 825 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
40
41
42
43
44
45
46
#include "connectdialog.h"
#include "ui_connectdialog.h"
#include "mainwindow.h"
#include "client.h"
/**
* Author: Yunus Rahbar
* Date: 6/10/13
*
*/
/**
* ConnectDialog
* Dialog window for connecting to a server
*
*/
ConnectDialog::ConnectDialog(MainWindow *win, QWidget *parent) :
QDialog(parent), window(win),
ui(new Ui::ConnectDialog)
{
ui->setupUi(this);
}
ConnectDialog::~ConnectDialog()
{
delete ui;
}
/**
* On accept, connect to the server and close this window
*
*/
void ConnectDialog::on_buttonBox_accepted()
{
window->startClient(ui->addrEdit->text(),static_cast<quint16>(ui->portEdit->text().toInt()),ui->nameEdit->text());
this->deleteLater();
}
/**
* On reject, close this window
*/
void ConnectDialog::on_buttonBox_rejected()
{
this->deleteLater();
}