From ac73f10eba557588a78a5e9c24a3874c287c5db8 Mon Sep 17 00:00:00 2001 From: kirillpt Date: Mon, 23 Nov 2020 23:33:53 +0300 Subject: move error_matrixid label below matrixid input, made hide/show for the label, made red underline for invalid input, add to TextField class isValid() setValid() for custom validation --- src/ui/TextField.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/ui/TextField.h') diff --git a/src/ui/TextField.h b/src/ui/TextField.h index 85d5036d..966155f4 100644 --- a/src/ui/TextField.h +++ b/src/ui/TextField.h @@ -30,6 +30,7 @@ public: void setLabelFontSize(qreal size); void setShowLabel(bool value); void setUnderlineColor(const QColor &color); + void setValid(bool valid); QColor inkColor() const; QColor labelColor() const; @@ -37,6 +38,7 @@ public: QColor backgroundColor() const; QString label() const; bool hasLabel() const; + bool isValid() const; qreal labelFontSize() const; protected: @@ -54,6 +56,7 @@ private: TextFieldLabel *label_; TextFieldStateMachine *state_machine_; bool show_label_; + bool is_valid_; qreal label_font_size_; }; -- cgit 1.5.1