From ae63c79a31a3216ce134723ee1cfcb091f2c42d8 Mon Sep 17 00:00:00 2001 From: Nodir Temirkhodjaev Date: Fri, 3 Feb 2023 19:47:25 +0300 Subject: [PATCH] UI: Options: IP Addresses: Add "Show Zones" button --- .../form/opt/pages/addresses/addressescolumn.cpp | 12 +++++++++++- src/ui/form/opt/pages/addresses/addressescolumn.h | 1 + src/ui/fort_icons.qrc | 1 + src/ui/icons/application_go.png | Bin 0 -> 920 bytes 4 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 src/ui/icons/application_go.png diff --git a/src/ui/form/opt/pages/addresses/addressescolumn.cpp b/src/ui/form/opt/pages/addresses/addressescolumn.cpp index 7e37d929..06a766f6 100644 --- a/src/ui/form/opt/pages/addresses/addressescolumn.cpp +++ b/src/ui/form/opt/pages/addresses/addressescolumn.cpp @@ -4,10 +4,13 @@ #include #include #include +#include #include #include
#include +#include +#include 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()->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); diff --git a/src/ui/form/opt/pages/addresses/addressescolumn.h b/src/ui/form/opt/pages/addresses/addressescolumn.h index 35a52511..af6bcf53 100644 --- a/src/ui/form/opt/pages/addresses/addressescolumn.h +++ b/src/ui/form/opt/pages/addresses/addressescolumn.h @@ -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; diff --git a/src/ui/fort_icons.qrc b/src/ui/fort_icons.qrc index 926a1738..c79a1825 100644 --- a/src/ui/fort_icons.qrc +++ b/src/ui/fort_icons.qrc @@ -6,6 +6,7 @@ icons/application.png icons/application-window-96.png icons/application_double.png + icons/application_go.png icons/arrow_refresh_small.png icons/bin_closed.png icons/cancel.png diff --git a/src/ui/icons/application_go.png b/src/ui/icons/application_go.png new file mode 100644 index 0000000000000000000000000000000000000000..7485e3408dd1f194ed4f8e39baf7e653858ce6ee GIT binary patch literal 920 zcmV;J184k+P)8Fc;+_OA|^_ z6cL^G-tGHl-m`JWc{)0;k9X(&%*;FIp6}dyzbgR9Lwzr!me3+fDS(bZLeL=uq;g`@ zz30x;6N?{9YDE^b$j#;k*p35D1cUET$8=3Y&-2j;V^Ul42!w6rU~foAXY41WE>LI= zEUINI+>O+Lu^2O*fM9lIA&H}vVHhMqp;h4bC+LGQ9OWe>6-q2s~96rdLRzXUi77f)Zqfzlb= zf74C`D*RHg{kRcr!LyGqauzQP%(VrdHLV2A^=%mZ{0PU)S$rx40S1qD-NT|4Bj?EU zB4>lAl(I?YN_?4lil+K@=;i>b`bdmkv~isxcQdi9So0W}h$o?iPdx}hN|6`Feh=Wx z$;%M(VXJ-%(O2DQ)zW9Fd${4hlh& zUbcc6=pk&mdU&M(lXm1PMkmIwwulc5%>-0O1)h zp<*8bDpl@T32&wazE1(~-eYK}ADvtx@_$RIaWz_%rzwr5e#HF<^Q>;s{^!z#)b->f z@OCf>-bG*kptc~q-I2Rl$j1#O)b_dOoFvcQM!ch)a{rBb9wYEO>)`X=D6rgJ%2J*- zSa4rr`240^XW0pEWEgV?0=2O1`?NAC40000