diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2020-02-10 09:06:26 -0600 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2020-02-10 09:06:26 -0600 |
commit | 8f528ffcdb4ce2f27a015fe7f0867e71a444d614 (patch) | |
tree | c2e9da57ba9fb3aaee1bad4c61b61a00de48981b /ui/qt5/subnetbox.hh | |
parent | 89934d31b65f070b1954ae2f6201841bfd90d3e2 (diff) | |
download | horizon-8f528ffcdb4ce2f27a015fe7f0867e71a444d614.tar.gz horizon-8f528ffcdb4ce2f27a015fe7f0867e71a444d614.tar.bz2 horizon-8f528ffcdb4ce2f27a015fe7f0867e71a444d614.tar.xz horizon-8f528ffcdb4ce2f27a015fe7f0867e71a444d614.zip |
Qt 5: Small tweaks to SubnetBox
* Add setSubnetCIDR, to programmatically change the value.
* Add signal for when the value changes.
* Ensure the proper amount of .0 octets are appended when the spinbox changes.
Diffstat (limited to 'ui/qt5/subnetbox.hh')
-rw-r--r-- | ui/qt5/subnetbox.hh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ui/qt5/subnetbox.hh b/ui/qt5/subnetbox.hh index 9f2edbf..8104a6b 100644 --- a/ui/qt5/subnetbox.hh +++ b/ui/qt5/subnetbox.hh @@ -26,11 +26,15 @@ public: SubnetBox(QWidget *parent = nullptr); QString subnetMask() const; int subnetCIDR() const; + void setSubnetCIDR(int value); public slots: void subnetEdited(const QString &text); void cidrEdited(int value); +signals: + void valueChanged(int value); + private: QHBoxLayout *layout; QLineEdit *subnet; |