diff options
Diffstat (limited to '')
-rw-r--r-- | src/gatscon/mainwnd.cpp | 25 |
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 | ||
4 | MainWnd::MainWnd() | 9 | MainWnd::MainWnd() |
5 | { | 10 | { |
@@ -12,11 +17,29 @@ MainWnd::~MainWnd() | |||
12 | 17 | ||
13 | void MainWnd::connect() | 18 | void 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 | ||
18 | void MainWnd::proxy() | 31 | void 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 | ||
22 | void MainWnd::open() | 45 | void MainWnd::open() |