Diffstat (limited to 'noncore/comm/keypebble/kvncconndlg.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/comm/keypebble/kvncconndlg.cpp | 21 |
1 files changed, 20 insertions, 1 deletions
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,7 +1,8 @@ #include <qframe.h> #include <qvbox.h> #include <qcheckbox.h> +#include <qcombobox.h> #include <qspinbox.h> #include <qlabel.h> #include <qlayout.h> #include <qwhatsthis.h> @@ -28,8 +29,14 @@ KVNCConnDlg::KVNCConnDlg( KRFBServer *options, corre->setChecked( options->corre ); 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 ); rre->setEnabled( false ); @@ -39,11 +46,14 @@ KVNCConnDlg::KVNCConnDlg( KRFBServer *options, bit->setChecked( options->colors256 ); shared->setChecked( options->shared ); timeBox->setValue( options->updateRate ); + serverPassword->setEchoMode(QLineEdit::Password); -} + connect(togglePassword, SIGNAL( stateChanged(int) ), this, SLOT( showPassword(int) ) ); + +} KVNCConnDlg::~KVNCConnDlg() { } @@ -65,11 +75,20 @@ void KVNCConnDlg::save() tmpOptions.hostname = serverHostname->text(); tmpOptions.password = serverPassword->text(); tmpOptions.display = serverDisplay->value(); tmpOptions.name = serverBookmark->text(); + tmpOptions.scaleFactor = scaleFactor->currentText().toInt(); if (!serverBookmark->text().isEmpty()) { if ( options) { *options=tmpOptions; } } } + +void KVNCConnDlg::showPassword(int show) +{ + if (show) + serverPassword->setEchoMode(QLineEdit::Normal); + else + serverPassword->setEchoMode(QLineEdit::Password); +} |