-
Notifications
You must be signed in to change notification settings - Fork 156
/
Copy pathlineedit.h
50 lines (40 loc) · 1.09 KB
/
lineedit.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/****************************************************************************
**
** Copyright (c) 2007 Trolltech ASA <[email protected]>
**
** Use, modification and distribution is allowed without limitation,
** warranty, liability or support of any kind.
**
****************************************************************************/
#ifndef LINEEDIT_H
#define LINEEDIT_H
#include <QLineEdit>
class QToolButton;
class LineEdit : public QLineEdit
{
Q_OBJECT
private:
int filterPosition;
QString savedText;
QString defaultText;
QString activeColor;
QString inactiveColor;
public:
LineEdit(QWidget *parent = 0);
void updateSelection();
bool isSet();
void reloadIcons();
protected:
void resizeEvent(QResizeEvent *);
void focusInEvent(QFocusEvent *e);
void focusOutEvent(QFocusEvent *e);
private slots:
void updateCloseButton(const QString &text);
void buildSelection();
void textChanged(QString text);
private:
QToolButton *clearButton;
signals:
void updateSelectionRequested();
};
#endif // LIENEDIT_H