lbrycrd/src/qt/bitcoinaddressvalidator.h
2013-09-02 17:27:27 +02:00

21 lines
487 B
C++

#ifndef BITCOINADDRESSVALIDATOR_H
#define BITCOINADDRESSVALIDATOR_H
#include <QValidator>
/** Base58 entry widget validator.
Corrects near-miss characters and refuses characters that are not part of base58.
*/
class BitcoinAddressValidator : public QValidator
{
Q_OBJECT
public:
explicit BitcoinAddressValidator(QObject *parent = 0);
State validate(QString &input, int &pos) const;
static const int MaxAddressLength = 35;
};
#endif // BITCOINADDRESSVALIDATOR_H