![]() |
NDEVR
API Documentation
|
A simple widget for entering in an IP address. More...
Public Member Functions | |
| IPWidget (QWidget *parent=nullptr) | |
| Constructs an IPWidget with four edit fields for each octet of an IPv4 address. | |
| String | address () const |
| Returns the full IP address string assembled from the four edit fields. | |
| bool | checkIfValid () const |
| Checks whether all four octet fields contain valid values. | |
| void | clear () |
| Clears all four octet edit fields. | |
| QCustomLineEdit * | editBox (uint04 index) const |
| Returns the QCustomLineEdit for the given octet index. | |
| void | editedSignal (QLineEdit *pEdit) |
| Signal emitted when an edit field has been modified by the user. | |
| void | setAddress (const StringView &address) |
| Sets the IP address by parsing a dot-separated string into the four edit fields. | |
| QSize | sizeHint () const |
| Returns the recommended size for this widget. | |
| void | slotTextChanged (QLineEdit *pEdit) |
| Slot invoked when the text in an edit field changes, handling auto-advance between octets. | |
A simple widget for entering in an IP address.
Multiple QCustomLineEdits allow the user to enter in the parts of the IP connection.
Definition at line 14 of file IPWidget.h.
| IPWidget::IPWidget | ( | QWidget * | parent = nullptr | ) |
Constructs an IPWidget with four edit fields for each octet of an IPv4 address.
| [in] | parent | The parent widget. |
References IPWidget().
Referenced by IPWidget().
| String IPWidget::address | ( | ) | const |
Returns the full IP address string assembled from the four edit fields.
Referenced by setAddress().
| bool IPWidget::checkIfValid | ( | ) | const |
Checks whether all four octet fields contain valid values.
|
inline |
Returns the QCustomLineEdit for the given octet index.
| [in] | index | The octet index (0-3). |
Definition at line 38 of file IPWidget.h.
| void IPWidget::editedSignal | ( | QLineEdit * | pEdit | ) |
Signal emitted when an edit field has been modified by the user.
| [in] | pEdit | The line edit that was edited. |
| void IPWidget::setAddress | ( | const StringView & | address | ) |
| QSize IPWidget::sizeHint | ( | ) | const |
Returns the recommended size for this widget.
| void IPWidget::slotTextChanged | ( | QLineEdit * | pEdit | ) |
Slot invoked when the text in an edit field changes, handling auto-advance between octets.
| [in] | pEdit | The line edit that was modified. |