mirror of
https://github.com/AskDavis/Casinotest.git
synced 2026-01-05 20:59:47 -08:00
Initial commit.
This commit is contained in:
29
src/qt/qvalidatedlineedit.h
Normal file
29
src/qt/qvalidatedlineedit.h
Normal file
@@ -0,0 +1,29 @@
|
||||
#ifndef QVALIDATEDLINEEDIT_H
|
||||
#define QVALIDATEDLINEEDIT_H
|
||||
|
||||
#include <QLineEdit>
|
||||
|
||||
/** Line edit that can be marked as "invalid" to show input validation feedback. When marked as invalid,
|
||||
it will get a red background until it is focused.
|
||||
*/
|
||||
class QValidatedLineEdit : public QLineEdit
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit QValidatedLineEdit(QWidget *parent = 0);
|
||||
void clear();
|
||||
|
||||
protected:
|
||||
void focusInEvent(QFocusEvent *evt);
|
||||
|
||||
private:
|
||||
bool valid;
|
||||
|
||||
public slots:
|
||||
void setValid(bool valid);
|
||||
|
||||
private slots:
|
||||
void markValid();
|
||||
};
|
||||
|
||||
#endif // QVALIDATEDLINEEDIT_H
|
||||
Reference in New Issue
Block a user