Bitcoin ABC 0.26.3
P2P Digital Currency
Loading...
Searching...
No Matches
qvalidatedlineedit.h
Go to the documentation of this file.
1// Copyright (c) 2011-2015 The Bitcoin Core developers
2// Distributed under the MIT software license, see the accompanying
3// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
5#ifndef BITCOIN_QT_QVALIDATEDLINEEDIT_H
6#define BITCOIN_QT_QVALIDATEDLINEEDIT_H
7
8#include <QLineEdit>
9
14class QValidatedLineEdit : public QLineEdit {
16
17public:
18 explicit QValidatedLineEdit(QWidget *parent);
19 void clear();
20 void setCheckValidator(const QValidator *v);
21 bool isValid();
22
23protected:
24 void focusInEvent(QFocusEvent *evt) override;
25 void focusOutEvent(QFocusEvent *evt) override;
26
27private:
28 bool valid;
29 const QValidator *checkValidator;
30
31public Q_SLOTS:
32 void setValid(bool valid);
33 void setEnabled(bool enabled);
34
37
38private Q_SLOTS:
39 void markValid();
40 void checkValidity();
41};
42
43#endif // BITCOIN_QT_QVALIDATEDLINEEDIT_H
Line edit that can be marked as "invalid" to show input validation feedback.
void validationDidChange(QValidatedLineEdit *validatedLineEdit)
void focusOutEvent(QFocusEvent *evt) override
void setValid(bool valid)
void focusInEvent(QFocusEvent *evt) override
void setEnabled(bool enabled)
void setCheckValidator(const QValidator *v)
const QValidator * checkValidator
T GetRand(T nMax=std::numeric_limits< T >::max()) noexcept
Generate a uniform random integer of type T in the range [0..nMax) nMax defaults to std::numeric_limi...
Definition random.h:85