[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
This commit is contained in:
committed by
Wladimir J. van der Laan
parent
aab8fc58c6
commit
c78bd93701
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user