28 #ifndef BASEVALIDATINGLINEEDIT_H
29 #define BASEVALIDATINGLINEEDIT_H
37 struct BaseValidatingLineEditPrivate;
54 Q_PROPERTY(QString initialText READ initialText WRITE setInitialText DESIGNABLE
true)
55 Q_PROPERTY(QColor errorColor READ errorColor WRITE setErrorColor DESIGNABLE
true)
58 enum State { Invalid, DisplayingInitialText, Valid };
66 QString errorMessage()
const;
68 QString initialText()
const;
69 void setInitialText(
const QString &);
71 QColor errorColor()
const;
72 void setErrorColor(
const QColor &);
75 void triggerChanged();
77 static QColor textColor(
const QWidget *w);
78 static void setTextColor(QWidget *w,
const QColor &c);
82 void validChanged(
bool validState);
83 void validReturnPressed();
86 virtual bool validate(
const QString &value, QString *errorMessage)
const = 0;
91 virtual void slotReturnPressed();
92 virtual void slotChanged(
const QString &
t);
100 #endif // BASEVALIDATINGLINEEDIT_H