Bitcoin ABC  0.22.13
P2P Digital Currency
bitcoinaddressvalidator.h
Go to the documentation of this file.
1 // Copyright (c) 2011-2014 The Bitcoin Core developers
2 // Copyright (c) 2017-2018 The Bitcoin developers
3 // Distributed under the MIT software license, see the accompanying
4 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 
6 #ifndef BITCOIN_QT_BITCOINADDRESSVALIDATOR_H
7 #define BITCOIN_QT_BITCOINADDRESSVALIDATOR_H
8 
9 #include <QValidator>
10 
15 class BitcoinAddressEntryValidator : public QValidator {
16  Q_OBJECT
17 
18 public:
19  explicit BitcoinAddressEntryValidator(const std::string &cashaddrprefixIn,
20  QObject *parent);
21 
22  State validate(QString &input, int &pos) const override;
23 
24 private:
25  std::string cashaddrprefix;
26 };
27 
30 class BitcoinAddressCheckValidator : public QValidator {
31  Q_OBJECT
32 
33 public:
34  explicit BitcoinAddressCheckValidator(QObject *parent);
35 
36  State validate(QString &input, int &pos) const override;
37 };
38 
39 #endif // BITCOIN_QT_BITCOINADDRESSVALIDATOR_H
State validate(QString &input, int &pos) const override
Bitcoin address entry widget validator, checks for valid characters and removes some whitespace...
BitcoinAddressEntryValidator(const std::string &cashaddrprefixIn, QObject *parent)
std::string cashaddrprefix
Bitcoin address widget validator, checks for a valid bitcoin address.