Engauge Digitizer  2
DlgEditPointGraphLineEdit.h
1 /******************************************************************************************************
2  * (C) 2016 markummitchell@github.com. This file is part of Engauge Digitizer, which is released *
3  * under GNU General Public License version 2 (GPLv2) or (at your option) any later version. See file *
4  * LICENSE or go to gnu.org/licenses for details. Distribution requires prior written permission. *
5  ******************************************************************************************************/
6 
7 #ifndef DLG_EDIT_POINT_GRAPH_LINE_EDIT_H
8 #define DLG_EDIT_POINT_GRAPH_LINE_EDIT_H
9 
10 #include <QLineEdit>
11 
12 class QWidget;
13 
15 class DlgEditPointGraphLineEdit : public QLineEdit
16 {
17  Q_OBJECT;
18 
19 public:
21  DlgEditPointGraphLineEdit (QWidget *widget = 0);
23 
25  virtual void enterEvent(QEvent *);
26 
28  virtual void leaveEvent (QEvent *);
29 
31  void updateBackground ();
32 
33 private:
34 
35  bool m_hover;
36 };
37 
38 #endif // DLG_EDIT_POINT_GRAPH_LINE_EDIT_H
Adds hover highlighting to QLineEdit.
void updateBackground()
Update background given the current state.
virtual void enterEvent(QEvent *)
Hover entry triggers clearing of the background color so user does not think of widget as disabled an...
virtual void leaveEvent(QEvent *)
Hover exit triggers restoration of the background color.
DlgEditPointGraphLineEdit(QWidget *widget=0)
Single constructor.