LCOV - code coverage report
Current view: top level - src/qt - qvalidatedlineedit.h (source / functions) Hit Total Coverage
Test: total_coverage.info Lines: 0 1 0.0 %
Date: 2015-10-12 22:39:14 Functions: 0 2 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : // Copyright (c) 2011-2013 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             : 
      10             : /** Line edit that can be marked as "invalid" to show input validation feedback. When marked as invalid,
      11             :    it will get a red background until it is focused.
      12             :  */
      13           0 : 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             : 
      22             : protected:
      23             :     void focusInEvent(QFocusEvent *evt);
      24             :     void focusOutEvent(QFocusEvent *evt);
      25             : 
      26             : private:
      27             :     bool valid;
      28             :     const QValidator *checkValidator;
      29             : 
      30             : public Q_SLOTS:
      31             :     void setValid(bool valid);
      32             :     void setEnabled(bool enabled);
      33             : 
      34             : private Q_SLOTS:
      35             :     void markValid();
      36             :     void checkValidity();
      37             : };
      38             : 
      39             : #endif // BITCOIN_QT_QVALIDATEDLINEEDIT_H

Generated by: LCOV version 1.11