10#ifndef UI_QT_APPLY_LINE_EDIT_H_
11#define UI_QT_APPLY_LINE_EDIT_H_
31 explicit ApplyLineEdit(QString linePlaceholderText, QWidget *parent = 0);
92 bool isValidText(QString &text,
bool ignoreEmptyCheck = false);
98 void handleValidation(QString newText);
105 void onTextEdited(const QString &text);
111 void onTextChanged(const QString &text);
116 void onSubmitContent();
A QLineEdit with an embedded apply button and optional regex validation.
Definition apply_line_edit.h:22
bool emptyAllowed
Whether an empty string is considered a valid value.
Definition apply_line_edit.h:40
~ApplyLineEdit()
Destroy the ApplyLineEdit and its embedded apply button.
Definition apply_line_edit.cpp:57
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.
Definition apply_line_edit.cpp:132
void setRegEx(QString regex)
Set the validation regex pattern.
Definition apply_line_edit.cpp:59
void setEmptyAllowed(bool emptyAllowed)
Set whether empty input is accepted as valid.
Definition apply_line_edit.cpp:69
QString regex
The regular expression pattern used to validate input text.
Definition apply_line_edit.h:37