aboutsummaryrefslogtreecommitdiff
path: root/src/qt/bitcoinaddressvalidator.h
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2011-06-11 22:11:58 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2011-06-11 22:11:58 +0200
commitba4081c1fcaddf361abd61b2721994eff5475bb3 (patch)
tree8667eac9e13bde9d006407b55b73bacc830f46e6 /src/qt/bitcoinaddressvalidator.h
parent5813089e0b5ab9cff50192f0068d256eb2602316 (diff)
move back to original directory structure
Diffstat (limited to 'src/qt/bitcoinaddressvalidator.h')
-rw-r--r--src/qt/bitcoinaddressvalidator.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/qt/bitcoinaddressvalidator.h b/src/qt/bitcoinaddressvalidator.h
new file mode 100644
index 0000000000..73f6ea1f61
--- /dev/null
+++ b/src/qt/bitcoinaddressvalidator.h
@@ -0,0 +1,24 @@
+#ifndef BITCOINADDRESSVALIDATOR_H
+#define BITCOINADDRESSVALIDATOR_H
+
+#include <QRegExpValidator>
+
+/* Base48 entry widget validator.
+ Corrects near-miss characters and refuses characters that are no part of base48.
+ */
+class BitcoinAddressValidator : public QValidator
+{
+ Q_OBJECT
+public:
+ explicit BitcoinAddressValidator(QObject *parent = 0);
+
+ State validate(QString &input, int &pos) const;
+
+ static const int MaxAddressLength = 34;
+signals:
+
+public slots:
+
+};
+
+#endif // BITCOINADDRESSVALIDATOR_H