mirror of
https://github.com/tnodir/fort
synced 2024-11-15 10:55:10 +00:00
UI: Options: IP Addresses: Tweak "Zones" list
This commit is contained in:
parent
2e5acedf2f
commit
c6b1aab8d3
@ -29,8 +29,6 @@ void AddressesColumn::setZonesCount(qint8 v)
|
||||
|
||||
void AddressesColumn::retranslateUi()
|
||||
{
|
||||
m_btOpenZones->setToolTip(tr("Show Zones"));
|
||||
|
||||
retranslateZonesText();
|
||||
m_btSelectZones->setToolTip(tr("Select Zones"));
|
||||
}
|
||||
@ -46,22 +44,9 @@ void AddressesColumn::setupUi()
|
||||
layout->setContentsMargins(0, 0, 0, 0);
|
||||
|
||||
// Header
|
||||
auto headerLayout = new QHBoxLayout();
|
||||
auto headerLayout = setupHeaderLayout();
|
||||
layout->addLayout(headerLayout);
|
||||
|
||||
m_labelTitle = ControlUtil::createLabel();
|
||||
m_labelTitle->setFont(ControlUtil::fontDemiBold());
|
||||
|
||||
m_cbUseAll = new QCheckBox();
|
||||
|
||||
headerLayout->addWidget(m_labelTitle);
|
||||
headerLayout->addStretch();
|
||||
headerLayout->addWidget(m_cbUseAll);
|
||||
|
||||
// Zones Row
|
||||
auto zonesLayout = setupZonesRow();
|
||||
layout->addLayout(zonesLayout);
|
||||
|
||||
// Text Area
|
||||
m_editIpText = new PlainTextEdit();
|
||||
m_editIpText->setTabChangesFocus(true);
|
||||
@ -70,23 +55,23 @@ void AddressesColumn::setupUi()
|
||||
this->setLayout(layout);
|
||||
}
|
||||
|
||||
QLayout *AddressesColumn::setupZonesRow()
|
||||
QLayout *AddressesColumn::setupHeaderLayout()
|
||||
{
|
||||
auto layout = new QHBoxLayout();
|
||||
layout->setContentsMargins(0, 0, 0, 0);
|
||||
m_labelTitle = ControlUtil::createLabel();
|
||||
m_labelTitle->setFont(ControlUtil::fontDemiBold());
|
||||
|
||||
// Open Zones
|
||||
m_btOpenZones = ControlUtil::createLinkButton(":/icons/ip_class.png");
|
||||
|
||||
connect(m_btOpenZones, &QPushButton::clicked, IoC<WindowManager>(),
|
||||
&WindowManager::showZonesWindow);
|
||||
// Use All
|
||||
m_cbUseAll = new QCheckBox();
|
||||
|
||||
// Select Zones
|
||||
m_btSelectZones = ControlUtil::createButton(QString());
|
||||
m_btSelectZones = ControlUtil::createButton(":/icons/ip_class.png");
|
||||
|
||||
layout->addWidget(m_btOpenZones);
|
||||
layout->addWidget(m_btSelectZones);
|
||||
auto layout = new QHBoxLayout();
|
||||
layout->addWidget(m_labelTitle);
|
||||
layout->addStretch();
|
||||
layout->addWidget(m_cbUseAll);
|
||||
layout->addWidget(ControlUtil::createSeparator(Qt::Vertical));
|
||||
layout->addWidget(m_btSelectZones);
|
||||
|
||||
return layout;
|
||||
}
|
||||
|
@ -31,14 +31,13 @@ private:
|
||||
void retranslateZonesText();
|
||||
|
||||
void setupUi();
|
||||
QLayout *setupZonesRow();
|
||||
QLayout *setupHeaderLayout();
|
||||
|
||||
private:
|
||||
qint8 m_zonesCount = 0;
|
||||
|
||||
QLabel *m_labelTitle = nullptr;
|
||||
QCheckBox *m_cbUseAll = nullptr;
|
||||
QPushButton *m_btOpenZones = nullptr;
|
||||
QPushButton *m_btSelectZones = nullptr;
|
||||
PlainTextEdit *m_editIpText = nullptr;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user