bitcoin/src/qt/bitcoinaddressvalidator.h

22 lines
486 B
C
Raw Normal View History

2011-05-13 13:00:27 -07:00
#ifndef BITCOINADDRESSVALIDATOR_H
#define BITCOINADDRESSVALIDATOR_H
#include <QValidator>
2011-05-13 13:00:27 -07:00
2011-11-13 04:19:52 -08:00
/** Base48 entry widget validator.
2011-06-03 01:52:49 -07:00
Corrects near-miss characters and refuses characters that are no part of base48.
*/
class BitcoinAddressValidator : public QValidator
2011-05-13 13:00:27 -07:00
{
Q_OBJECT
2011-05-13 13:00:27 -07:00
public:
explicit BitcoinAddressValidator(QObject *parent = 0);
State validate(QString &input, int &pos) const;
static const int MaxAddressLength = 35;
2011-05-13 13:00:27 -07:00
};
#endif // BITCOINADDRESSVALIDATOR_H