summaryrefslogtreecommitdiff
path: root/noncore/comm/keypebble/kvncconndlg.cpp
authortreke <treke>2002-09-04 17:53:12 (UTC)
committer treke <treke>2002-09-04 17:53:12 (UTC)
commit605d854057eb470a1d75210193b82eb0b1ad6b53 (patch) (unidiff)
treec411b661d5211fefbd83a7c8f63eef8c9cca72ee /noncore/comm/keypebble/kvncconndlg.cpp
parentc35a5eabd8f5ed18e4216f6c88ee6794bacfb491 (diff)
downloadopie-605d854057eb470a1d75210193b82eb0b1ad6b53.zip
opie-605d854057eb470a1d75210193b82eb0b1ad6b53.tar.gz
opie-605d854057eb470a1d75210193b82eb0b1ad6b53.tar.bz2
Major modifications to the User Interface
1) Bookmark support added, all options are stored on a per bookmark basis 2) 16 Bit color is now a supported bit depth for the server
Diffstat (limited to 'noncore/comm/keypebble/kvncconndlg.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/comm/keypebble/kvncconndlg.cpp75
1 files changed, 75 insertions, 0 deletions
diff --git a/noncore/comm/keypebble/kvncconndlg.cpp b/noncore/comm/keypebble/kvncconndlg.cpp
new file mode 100644
index 0000000..6873feb
--- a/dev/null
+++ b/noncore/comm/keypebble/kvncconndlg.cpp
@@ -0,0 +1,75 @@
1#include <qframe.h>
2#include <qvbox.h>
3#include <qcheckbox.h>
4#include <qspinbox.h>
5#include <qlabel.h>
6#include <qlayout.h>
7#include <qwhatsthis.h>
8#include <qapplication.h>
9#include <qlineedit.h>
10#include <qpushbutton.h>
11#include "krfbserver.h"
12
13#include "kvncconndlg.h"
14
15KVNCConnDlg::KVNCConnDlg( KRFBServer *options,
16 QWidget *parent, char *name, bool modal )
17: KVNCConnDlgBase( parent, name, modal )
18{
19 this->options=options;
20 tmpOptions=*options;
21
22 serverHostname->setText(options->hostname);
23 serverDisplay->setValue(options->display);
24 serverPassword->setText(options->password);
25 serverBookmark->setText(options->name);
26
27 hex->setChecked( options->hexTile );
28 corre->setChecked( options->corre );
29 rre->setChecked( options->rre );
30 copyRect->setChecked( options->copyrect );
31
32 // TODO
33 hex->setEnabled( false );
34 corre->setEnabled( false );
35 rre->setEnabled( false );
36 // /TODO
37
38 deIconify->setChecked( options->deIconify );
39 bit->setChecked( options->colors256 );
40 shared->setChecked( options->shared );
41 timeBox->setValue( options->updateRate );
42
43
44}
45
46KVNCConnDlg::~KVNCConnDlg()
47{
48}
49
50void KVNCConnDlg::accept()
51{
52 save();
53 QDialog::accept();
54}
55
56void KVNCConnDlg::save()
57{
58 tmpOptions.hexTile = hex->isChecked();
59 tmpOptions.corre = corre->isChecked();
60 tmpOptions.rre = rre->isChecked();
61 tmpOptions.copyrect = copyRect->isChecked();
62 tmpOptions.deIconify = deIconify->isChecked();
63 tmpOptions.colors256 = bit->isChecked();
64 tmpOptions.shared = shared->isChecked();
65 tmpOptions.hostname = serverHostname->text();
66 tmpOptions.password = serverPassword->text();
67 tmpOptions.display = serverDisplay->value();
68 tmpOptions.name = serverBookmark->text();
69
70 if (!serverBookmark->text().isEmpty()) {
71 if ( options) {
72 *options=tmpOptions;
73 }
74 }
75}