mirror of
https://github.com/tnodir/fort
synced 2024-11-15 07:45:22 +00:00
UI: Options: IP Addresses: Add "Show Zones" button
This commit is contained in:
parent
a71ba9dd45
commit
ae63c79a31
@ -4,10 +4,13 @@
|
||||
#include <QHBoxLayout>
|
||||
#include <QLabel>
|
||||
#include <QPushButton>
|
||||
#include <QToolButton>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
#include <form/controls/controlutil.h>
|
||||
#include <form/controls/plaintextedit.h>
|
||||
#include <manager/windowmanager.h>
|
||||
#include <util/ioc/ioccontainer.h>
|
||||
|
||||
AddressesColumn::AddressesColumn(QWidget *parent) : QWidget(parent)
|
||||
{
|
||||
@ -16,6 +19,8 @@ AddressesColumn::AddressesColumn(QWidget *parent) : QWidget(parent)
|
||||
|
||||
void AddressesColumn::retranslateUi()
|
||||
{
|
||||
m_btOpenZones->setToolTip(tr("Show Zones"));
|
||||
|
||||
m_btSelectZones->setText(tr("Zones"));
|
||||
m_btSelectZones->setToolTip(tr("Select Zones"));
|
||||
}
|
||||
@ -55,6 +60,12 @@ QLayout *AddressesColumn::setupZonesRow()
|
||||
auto layout = new QHBoxLayout();
|
||||
layout->setContentsMargins(0, 0, 0, 0);
|
||||
|
||||
// Open Zones
|
||||
m_btOpenZones = ControlUtil::createFlatToolButton(
|
||||
":/icons/application_go.png", [&] { IoC<WindowManager>()->showZonesWindow(); });
|
||||
layout->addWidget(m_btOpenZones);
|
||||
|
||||
// Select Zones
|
||||
m_btSelectZones = ControlUtil::createButton(":/icons/ip_class.png");
|
||||
layout->addWidget(m_btSelectZones);
|
||||
|
||||
@ -62,7 +73,6 @@ QLayout *AddressesColumn::setupZonesRow()
|
||||
m_labelZones->setWordWrap(true);
|
||||
|
||||
auto font = ControlUtil::fontDemiBold();
|
||||
font.setItalic(true);
|
||||
m_labelZones->setFont(font);
|
||||
|
||||
layout->addWidget(m_labelZones, 1);
|
||||
|
@ -32,6 +32,7 @@ private:
|
||||
private:
|
||||
QLabel *m_labelTitle = nullptr;
|
||||
QCheckBox *m_cbUseAll = nullptr;
|
||||
QToolButton *m_btOpenZones = nullptr;
|
||||
QPushButton *m_btSelectZones = nullptr;
|
||||
QLabel *m_labelZones = nullptr;
|
||||
PlainTextEdit *m_editIpText = nullptr;
|
||||
|
@ -6,6 +6,7 @@
|
||||
<file>icons/application.png</file>
|
||||
<file>icons/application-window-96.png</file>
|
||||
<file>icons/application_double.png</file>
|
||||
<file>icons/application_go.png</file>
|
||||
<file>icons/arrow_refresh_small.png</file>
|
||||
<file>icons/bin_closed.png</file>
|
||||
<file>icons/cancel.png</file>
|
||||
|
BIN
src/ui/icons/application_go.png
Normal file
BIN
src/ui/icons/application_go.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 920 B |
Loading…
Reference in New Issue
Block a user