From 605d854057eb470a1d75210193b82eb0b1ad6b53 Mon Sep 17 00:00:00 2001 From: treke Date: Wed, 04 Sep 2002 17:53:12 +0000 Subject: 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 --- (limited to 'noncore/comm/keypebble/kvncconndlg.cpp') 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#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; + } + } +} -- cgit v0.9.0.2