38class FilterEdit :
public QLineEdit
58 explicit FilterEdit(QWidget *parent =
nullptr);
132 void onTextChanged();
QCompleter base for filter expressions, attachable to any QLineEdit.
Definition filter_completer.h:33
QLineEdit with validation-state tinting plus an injected filter validator and completer.
Definition filter_edit.h:39
QString lastErrorFull() const
Full, location-annotated error message, or empty.
Definition filter_edit.cpp:88
void setState(SyntaxState state)
Sets the state, re-polishes the style for the new QSS property, and emits syntaxStateChanged() if it ...
Definition filter_edit.cpp:123
FilterValidator * validator() const
The installed filter validator, or nullptr.
Definition filter_edit.h:77
QString syntaxStateName() const
Lowercase state name used for QSS property matching.
Definition filter_edit.cpp:44
void syntaxStateChanged(FilterEdit::SyntaxState state)
Emitted whenever the syntax state changes.
SyntaxState
Visual/semantic state of the current text, mapped from the validator.
Definition filter_edit.h:48
@ Deprecated
Definition filter_edit.h:53
@ Valid
Definition filter_edit.h:54
@ Invalid
Definition filter_edit.h:52
@ Intermediate
Definition filter_edit.h:51
@ Empty
Definition filter_edit.h:49
@ Busy
Definition filter_edit.h:50
SyntaxState state() const
Current syntax state.
Definition filter_edit.h:61
void setValidator(FilterValidator *validator)
Installs the filter validator. Widget-owned (deleted with the widget, and replaces any previous valid...
Definition filter_edit.cpp:57
void validateNow()
Runs the validator against the current text and updates the state.
Definition filter_edit.cpp:174
void insertFilter(const QString &filter)
Inserts filter at the cursor, padding with spaces as needed to keep the expression well-formed....
Definition filter_edit.cpp:98
QString syntaxState
Definition filter_edit.h:42
QString lastError() const
Short error message from the last validation, or empty.
Definition filter_edit.cpp:83
FilterCompleter * completer() const
The installed filter completer, or nullptr.
Definition filter_edit.h:86
QString deprecatedToken() const
Deprecated token from the last validation, or empty.
Definition filter_edit.cpp:93
void setCompleter(FilterCompleter *completer)
Installs the filter completer. Widget-owned, and also set as the QLineEdit completer so the native ty...
Definition filter_edit.cpp:68
Abstract QValidator for filter expressions, attachable to any QLineEdit.
Definition filter_validator.h:32