A QLineEdit with an embedded apply button and optional regex validation.
More...
#include <apply_line_edit.h>
|
|
void | textApplied () |
| | Emitted when the user applies the current (valid) text.
|
| |
|
| void | resizeEvent (QResizeEvent *event) |
| | Reposition the embedded apply button when the widget is resized.
|
| |
|
|
QString | regex |
| | The regular expression pattern used to validate input text.
|
| |
|
bool | emptyAllowed |
| | Whether an empty string is considered a valid value.
|
| |
A QLineEdit with an embedded apply button and optional regex validation.
◆ ApplyLineEdit()
| ApplyLineEdit::ApplyLineEdit |
( |
QString |
linePlaceholderText, |
|
|
QWidget * |
parent = 0 |
|
) |
| |
|
explicit |
Construct an ApplyLineEdit.
- Parameters
-
| linePlaceholderText | Placeholder text displayed when the field is empty. |
| parent | The parent widget. |
◆ emptyAllowed()
| bool ApplyLineEdit::emptyAllowed |
( |
| ) |
|
Return whether an empty string is accepted as valid input.
- Returns
- true if empty input is allowed; false if it is rejected.
◆ regex()
| QString ApplyLineEdit::regex |
( |
| ) |
|
Return the current validation regex pattern.
- Returns
- The regex string, or an empty string if none is set.
◆ resizeEvent()
| void ApplyLineEdit::resizeEvent |
( |
QResizeEvent * |
event | ) |
|
|
protected |
Reposition the embedded apply button when the widget is resized.
- Parameters
-
◆ setEmptyAllowed()
| void ApplyLineEdit::setEmptyAllowed |
( |
bool |
emptyAllowed | ) |
|
Set whether empty input is accepted as valid.
- Parameters
-
| emptyAllowed | true to allow empty input; false to require at least one character. |
◆ setRegEx()
| void ApplyLineEdit::setRegEx |
( |
QString |
regex | ) |
|
Set the validation regex pattern.
- Parameters
-
| regex | The regular expression pattern to apply. |
The documentation for this class was generated from the following files:
- /builds/wireshark/wireshark/ui/qt/widgets/apply_line_edit.h
- /builds/wireshark/wireshark/ui/qt/widgets/apply_line_edit.cpp