Rabbit Remote Control 0.0.30
Loading...
Searching...
No Matches
FrmParameterTigerVNC.cpp
1#include "FrmParameterTigerVNC.h"
2#include "ui_FrmParameterTigerVNC.h"
3
4#ifdef HAVE_ICE
5 #include "Ice.h"
6#endif
7
8CFrmParameterTigerVNC::CFrmParameterTigerVNC(CParameterServiceTigerVNC *para, QWidget *parent) :
9 QWidget(parent),
11 m_pParameters(para)
12{
13 ui->setupUi(this);
14
15#ifdef HAVE_ICE
16 QSharedPointer<CIceSignal> signal = CICE::Instance()->GetSignal();
17 if(signal)
18 ui->cbEnableICE->setEnabled(true);
19 else
20 ui->cbEnableICE->setEnabled(false);
21#endif
22
23 ui->cbEnable->setChecked(m_pParameters->getEnable());
24 ui->sbPort->setValue(m_pParameters->getPort());
25 ui->lePassword->setText(m_pParameters->getPassword());
26 ui->cbEnableICE->setChecked(m_pParameters->getIce());
27 ui->cbEnableSocket->setChecked(m_pParameters->GetEnableSocket());
28}
29
30CFrmParameterTigerVNC::~CFrmParameterTigerVNC()
31{
32 delete ui;
33}
34
36{
37 m_pParameters->setEnable(ui->cbEnable->isChecked());
38 m_pParameters->setPort(ui->sbPort->value());
39 m_pParameters->setPassword(ui->lePassword->text());
40 m_pParameters->setIce(ui->cbEnableICE->isChecked());
41 m_pParameters->SetEnableSocket(ui->cbEnableSocket->isChecked());
42}
43
45{
46 if(ui->lePassword->echoMode() == QLineEdit::Password)
47 {
48 ui->lePassword->setEchoMode(QLineEdit::Normal);
49 ui->pbShow->setIcon(QIcon::fromTheme("eye-off"));
50 } else {
51 ui->lePassword->setEchoMode(QLineEdit::Password);
52 ui->pbShow->setIcon(QIcon::fromTheme("eye-on"));
53 }
54}
55
void on_pbShow_clicked()
[Accept parameters]
void slotAccept()
[Accept parameters]
static CICE * Instance()
Single instance.
Definition Ice.cpp:55