From e2186a49cb5cbdf01b56f57818a15a760ff25b2e Mon Sep 17 00:00:00 2001 From: treke Date: Thu, 05 Sep 2002 04:42:25 +0000 Subject: Added support for client side scaling of the screen. Slow, but sometimes usable. --- (limited to 'noncore/comm/keypebble/kvncconndlg.cpp') diff --git a/noncore/comm/keypebble/kvncconndlg.cpp b/noncore/comm/keypebble/kvncconndlg.cpp index 6873feb..2f073f8 100644 --- a/noncore/comm/keypebble/kvncconndlg.cpp +++ b/noncore/comm/keypebble/kvncconndlg.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include #include #include @@ -29,6 +30,12 @@ KVNCConnDlg::KVNCConnDlg( KRFBServer *options, rre->setChecked( options->rre ); copyRect->setChecked( options->copyrect ); + for (int i=0; i < scaleFactor->count(); ++i) { + if (scaleFactor->text(i).toInt()==tmpOptions.scaleFactor) { + scaleFactor->setCurrentItem(i); + } + } + // TODO hex->setEnabled( false ); corre->setEnabled( false ); @@ -40,9 +47,12 @@ KVNCConnDlg::KVNCConnDlg( KRFBServer *options, shared->setChecked( options->shared ); timeBox->setValue( options->updateRate ); + serverPassword->setEchoMode(QLineEdit::Password); -} + connect(togglePassword, SIGNAL( stateChanged(int) ), this, SLOT( showPassword(int) ) ); + +} KVNCConnDlg::~KVNCConnDlg() { } @@ -66,6 +76,7 @@ void KVNCConnDlg::save() tmpOptions.password = serverPassword->text(); tmpOptions.display = serverDisplay->value(); tmpOptions.name = serverBookmark->text(); + tmpOptions.scaleFactor = scaleFactor->currentText().toInt(); if (!serverBookmark->text().isEmpty()) { if ( options) { @@ -73,3 +84,11 @@ void KVNCConnDlg::save() } } } + +void KVNCConnDlg::showPassword(int show) +{ + if (show) + serverPassword->setEchoMode(QLineEdit::Normal); + else + serverPassword->setEchoMode(QLineEdit::Password); +} -- cgit v0.9.0.2