MCPcopy Create free account
hub / github.com/KangLin/RabbitRemoteControl / CParameterProxyUI

Method CParameterProxyUI

Src/ParameterCompone/ParameterProxyUI.cpp:6–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4#include <QSpacerItem>
5
6CParameterProxyUI::CParameterProxyUI(QWidget *parent)
7 : CParameterUI(parent)
8 , m_uiHttp(nullptr)
9 , m_uiSockesV5(nullptr)
10 , m_uiSSH(nullptr)
11{
12 bool bCheck = false;
13 setWindowTitle(tr("Proxy"));
14 setLayout(new QBoxLayout(QBoxLayout::TopToBottom, this));
15 Q_ASSERT(layout());
16
17 QHBoxLayout* pType = new QHBoxLayout(this);
18 layout()->addItem(pType);
19
20 m_uiHttp = new CParameterNetUI(this);
21 layout()->addWidget(m_uiHttp);
22
23 m_uiSockesV5 = new CParameterNetUI(this);
24 layout()->addWidget(m_uiSockesV5);
25
26 m_uiSSH = new CParameterSSHTunnelUI(this);
27 layout()->addWidget(m_uiSSH);
28
29 m_lbType = new QLabel(this);
30 m_lbType->setText(tr("Type:"));
31 pType->addWidget(m_lbType);
32
33 m_cbType = new QComboBox(this);
34 m_cbType->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
35 pType->addWidget(m_cbType);
36 bCheck = connect(m_cbType, SIGNAL(currentIndexChanged(int)),
37 this, SLOT(slotTypeChanged(int)));
38 Q_ASSERT(bCheck);
39
40 layout()->addItem(new QSpacerItem(0, 0,
41 QSizePolicy::Preferred,
42 QSizePolicy::Expanding));
43}
44
45void CParameterProxyUI::slotTypeChanged(int nIndex)
46{

Callers

nothing calls this directly

Calls 1

addItemMethod · 0.80

Tested by

no test coverage detected