aboutsummaryrefslogtreecommitdiff
path: root/src/gatscon/mainwnd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gatscon/mainwnd.cpp')
-rw-r--r--src/gatscon/mainwnd.cpp25
1 files changed, 24 insertions, 1 deletions
diff --git a/src/gatscon/mainwnd.cpp b/src/gatscon/mainwnd.cpp
index c86e1c2..f20a531 100644
--- a/src/gatscon/mainwnd.cpp
+++ b/src/gatscon/mainwnd.cpp
@@ -1,5 +1,10 @@
1#include "mainwnd.h" 1#include "mainwnd.h"
2
2#include "clientwidget.h" 3#include "clientwidget.h"
4#include "proxywidget.h"
5
6#include "connectdlg.h"
7#include "setupproxydlg.h"
3 8
4MainWnd::MainWnd() 9MainWnd::MainWnd()
5{ 10{
@@ -12,11 +17,29 @@ MainWnd::~MainWnd()
12 17
13void MainWnd::connect() 18void MainWnd::connect()
14{ 19{
15 setCentralWidget( new ClientWidget( this ) ); 20 ConnectDlg dlg( this );
21 if( dlg.exec() == QDialog::Accepted )
22 {
23 setCentralWidget(
24 new ClientWidget(
25 this, dlg.getHostname(), dlg.getPort()
26 )
27 );
28 }
16} 29}
17 30
18void MainWnd::proxy() 31void MainWnd::proxy()
19{ 32{
33 SetupProxyDlg dlg( this );
34
35 if( dlg.exec() == QDialog::Accepted )
36 {
37 setCentralWidget(
38 new ProxyWidget(
39 this, dlg.getPortIn(), dlg.getHostOut(), dlg.getPortOut()
40 )
41 );
42 }
20} 43}
21 44
22void MainWnd::open() 45void MainWnd::open()