1 // Copyright (c) 2011-2015 The Bitcoin Core developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 #ifndef BITCOIN_QT_QVALIDATEDLINEEDIT_H
6 #define BITCOIN_QT_QVALIDATEDLINEEDIT_H
10 /** Line edit that can be marked as "invalid" to show input validation feedback. When marked as invalid,
11 it will get a red background until it is focused.
13 class QValidatedLineEdit
: public QLineEdit
18 explicit QValidatedLineEdit(QWidget
*parent
);
20 void setCheckValidator(const QValidator
*v
);
24 void focusInEvent(QFocusEvent
*evt
);
25 void focusOutEvent(QFocusEvent
*evt
);
29 const QValidator
*checkValidator
;
32 void setValid(bool valid
);
33 void setEnabled(bool enabled
);
36 void validationDidChange(QValidatedLineEdit
*validatedLineEdit
);
43 #endif // BITCOIN_QT_QVALIDATEDLINEEDIT_H