aboutsummaryrefslogtreecommitdiff
path: root/src/qt/qvalidatedlineedit.h
diff options
context:
space:
mode:
authorPhilip Kaufmann <phil.kaufmann@t-online.de>2013-11-20 15:56:51 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2014-01-29 14:15:55 +0100
commitc78bd937017212c89c1c7aab07399cec5b6b3bdd (patch)
tree92129bb63c2b9bbb724c3a2b4ad643710484e3ea /src/qt/qvalidatedlineedit.h
parentaab8fc58c6e6dc6e0a104170bd2aa10dc1af5dea (diff)
downloadbitcoin-c78bd937017212c89c1c7aab07399cec5b6b3bdd.tar.xz
[Qt] extend validate line edit and btc address validator
- remove btc address length from address validator - add an optional btc address check in validated line edit that defaults to off and is used in GUIUtil::setupAddressWidget() - an isAcceptable() check is added to validated line edit on focus out which only kicks in, when a validator is used with that widget - remove an isAcceptable() check from sendcoinsentry.cpp - remove obsolete attributes from ui files, which are set by calling GUIUtil::setupAddressWidget() - move some more things to GUIUtil::setupAddressWidget() and remove them from normal code e.g. placeholder text
Diffstat (limited to 'src/qt/qvalidatedlineedit.h')
-rw-r--r--src/qt/qvalidatedlineedit.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/qt/qvalidatedlineedit.h b/src/qt/qvalidatedlineedit.h
index 53ef04e4a0..c2a4817e65 100644
--- a/src/qt/qvalidatedlineedit.h
+++ b/src/qt/qvalidatedlineedit.h
@@ -15,20 +15,25 @@ class QValidatedLineEdit : public QLineEdit
Q_OBJECT
public:
- explicit QValidatedLineEdit(QWidget *parent = 0);
+ explicit QValidatedLineEdit(QWidget *parent);
void clear();
+ void setCheckValidator(const QValidator *v);
protected:
void focusInEvent(QFocusEvent *evt);
+ void focusOutEvent(QFocusEvent *evt);
private:
bool valid;
+ const QValidator *checkValidator;
public slots:
void setValid(bool valid);
+ void setEnabled(bool enabled);
private slots:
void markValid();
+ void checkValidity();
};
#endif // QVALIDATEDLINEEDIT_H