2011-05-13 22:00:27 +02:00
|
|
|
#ifndef BITCOINADDRESSVALIDATOR_H
|
|
|
|
#define BITCOINADDRESSVALIDATOR_H
|
|
|
|
|
|
|
|
#include <QRegExpValidator>
|
|
|
|
|
2011-11-13 13:19:52 +01:00
|
|
|
/** Base48 entry widget validator.
|
2011-06-03 10:52:49 +02:00
|
|
|
Corrects near-miss characters and refuses characters that are no part of base48.
|
|
|
|
*/
|
|
|
|
class BitcoinAddressValidator : public QValidator
|
2011-05-13 22:00:27 +02:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
explicit BitcoinAddressValidator(QObject *parent = 0);
|
|
|
|
|
2011-06-02 15:57:23 +02:00
|
|
|
State validate(QString &input, int &pos) const;
|
|
|
|
|
2011-05-14 11:18:39 +02:00
|
|
|
static const int MaxAddressLength = 34;
|
2011-05-13 22:00:27 +02:00
|
|
|
signals:
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // BITCOINADDRESSVALIDATOR_H
|