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) (side-by-side diff)
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 @@
+#include <qframe.h>
+#include <qvbox.h>
+#include <qcheckbox.h>
+#include <qspinbox.h>
+#include <qlabel.h>
+#include <qlayout.h>
+#include <qwhatsthis.h>
+#include <qapplication.h>
+#include <qlineedit.h>
+#include <qpushbutton.h>
+#include "krfbserver.h"
+
+#include "kvncconndlg.h"
+
+KVNCConnDlg::KVNCConnDlg( KRFBServer *options,
+ QWidget *parent, char *name, bool modal )
+: KVNCConnDlgBase( parent, name, modal )
+{
+ this->options=options;
+ tmpOptions=*options;
+
+ serverHostname->setText(options->hostname);
+ serverDisplay->setValue(options->display);
+ serverPassword->setText(options->password);
+ serverBookmark->setText(options->name);
+
+ hex->setChecked( options->hexTile );
+ corre->setChecked( options->corre );
+ rre->setChecked( options->rre );
+ copyRect->setChecked( options->copyrect );
+
+ // TODO
+ hex->setEnabled( false );
+ corre->setEnabled( false );
+ rre->setEnabled( false );
+ // /TODO
+
+ deIconify->setChecked( options->deIconify );
+ bit->setChecked( options->colors256 );
+ shared->setChecked( options->shared );
+ timeBox->setValue( options->updateRate );
+
+
+}
+
+KVNCConnDlg::~KVNCConnDlg()
+{
+}
+
+void KVNCConnDlg::accept()
+{
+ save();
+ QDialog::accept();
+}
+
+void KVNCConnDlg::save()
+{
+ tmpOptions.hexTile = hex->isChecked();
+ tmpOptions.corre = corre->isChecked();
+ tmpOptions.rre = rre->isChecked();
+ tmpOptions.copyrect = copyRect->isChecked();
+ tmpOptions.deIconify = deIconify->isChecked();
+ tmpOptions.colors256 = bit->isChecked();
+ tmpOptions.shared = shared->isChecked();
+ tmpOptions.hostname = serverHostname->text();
+ tmpOptions.password = serverPassword->text();
+ tmpOptions.display = serverDisplay->value();
+ tmpOptions.name = serverBookmark->text();
+
+ if (!serverBookmark->text().isEmpty()) {
+ if ( options) {
+ *options=tmpOptions;
+ }
+ }
+}