Fabcoin Core  0.16.2
P2P Digital Currency
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 FABCOIN_QT_QVALIDATEDLINEEDIT_H
6 #define FABCOIN_QT_QVALIDATEDLINEEDIT_H
7 
8 #include <QLineEdit>
9 
13 class QValidatedLineEdit : public QLineEdit
14 {
15  Q_OBJECT
16 
17 public:
18  explicit QValidatedLineEdit(QWidget *parent);
19  void clear();
20  void setCheckValidator(const QValidator *v);
21  bool isValid();
22 
23  bool getEmptyIsValid() const;
24  void setEmptyIsValid(bool value);
25 
26 protected:
27  void focusInEvent(QFocusEvent *evt);
28  void focusOutEvent(QFocusEvent *evt);
29 
30 private:
31  bool valid;
32  const QValidator *checkValidator;
34 
35 public Q_SLOTS:
36  void setValid(bool valid);
37  void setEnabled(bool enabled);
38  void checkValidity();
39 
40 Q_SIGNALS:
41  void validationDidChange(QValidatedLineEdit *validatedLineEdit);
42 
43 private Q_SLOTS:
44  void markValid();
45 };
46 
47 #endif // FABCOIN_QT_QVALIDATEDLINEEDIT_H
Line edit that can be marked as "invalid" to show input validation feedback.
void setEmptyIsValid(bool value)
void validationDidChange(QValidatedLineEdit *validatedLineEdit)
void focusInEvent(QFocusEvent *evt)
bool getEmptyIsValid() const
QValidatedLineEdit(QWidget *parent)
const QValidator * checkValidator
void focusOutEvent(QFocusEvent *evt)
void setCheckValidator(const QValidator *v)
void setEnabled(bool enabled)
void setValid(bool valid)