summaryrefslogtreecommitdiff
path: root/noncore/comm/keypebble/kvncconndlg.cpp
Unidiff
Diffstat (limited to 'noncore/comm/keypebble/kvncconndlg.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/comm/keypebble/kvncconndlg.cpp21
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,6 +1,7 @@
1#include <qframe.h> 1#include <qframe.h>
2#include <qvbox.h> 2#include <qvbox.h>
3#include <qcheckbox.h> 3#include <qcheckbox.h>
4#include <qcombobox.h>
4#include <qspinbox.h> 5#include <qspinbox.h>
5#include <qlabel.h> 6#include <qlabel.h>
6#include <qlayout.h> 7#include <qlayout.h>
@@ -29,6 +30,12 @@ KVNCConnDlg::KVNCConnDlg( KRFBServer *options,
29 rre->setChecked( options->rre ); 30 rre->setChecked( options->rre );
30 copyRect->setChecked( options->copyrect ); 31 copyRect->setChecked( options->copyrect );
31 32
33 for (int i=0; i < scaleFactor->count(); ++i) {
34 if (scaleFactor->text(i).toInt()==tmpOptions.scaleFactor) {
35 scaleFactor->setCurrentItem(i);
36 }
37 }
38
32 // TODO 39 // TODO
33 hex->setEnabled( false ); 40 hex->setEnabled( false );
34 corre->setEnabled( false ); 41 corre->setEnabled( false );
@@ -40,9 +47,12 @@ KVNCConnDlg::KVNCConnDlg( KRFBServer *options,
40 shared->setChecked( options->shared ); 47 shared->setChecked( options->shared );
41 timeBox->setValue( options->updateRate ); 48 timeBox->setValue( options->updateRate );
42 49
50 serverPassword->setEchoMode(QLineEdit::Password);
43 51
44} 52 connect(togglePassword, SIGNAL( stateChanged(int) ), this, SLOT( showPassword(int) ) );
45 53
54
55}
46KVNCConnDlg::~KVNCConnDlg() 56KVNCConnDlg::~KVNCConnDlg()
47{ 57{
48} 58}
@@ -66,6 +76,7 @@ void KVNCConnDlg::save()
66 tmpOptions.password = serverPassword->text(); 76 tmpOptions.password = serverPassword->text();
67 tmpOptions.display = serverDisplay->value(); 77 tmpOptions.display = serverDisplay->value();
68 tmpOptions.name = serverBookmark->text(); 78 tmpOptions.name = serverBookmark->text();
79 tmpOptions.scaleFactor = scaleFactor->currentText().toInt();
69 80
70 if (!serverBookmark->text().isEmpty()) { 81 if (!serverBookmark->text().isEmpty()) {
71 if ( options) { 82 if ( options) {
@@ -73,3 +84,11 @@ void KVNCConnDlg::save()
73 } 84 }
74 } 85 }
75} 86}
87
88void KVNCConnDlg::showPassword(int show)
89{
90 if (show)
91 serverPassword->setEchoMode(QLineEdit::Normal);
92 else
93 serverPassword->setEchoMode(QLineEdit::Password);
94}