-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathiisLineEdit.h
executable file
·87 lines (68 loc) · 1.87 KB
/
iisLineEdit.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
/*
* iisLineEdit.h
*
* Created on: 29.07.2008
*
* Industrial Infosystems (c) 2008
* www.ii-system.com
*
* This component is freeware and could be used while building any applications.
* Removal/modification of this information not permitted.
*/
#ifndef IISLINEEDIT_H_
#define IISLINEEDIT_H_
#include <QtWidgets>
/**
* \class iisLineEdit
* \brief This class is the base class for line editor with pick button.
*/
class iisLineEdit : public QWidget
{
Q_OBJECT
public:
iisLineEdit(QWidget *parent = 0);
virtual ~iisLineEdit();
inline QLineEdit* editor() { return myLineEdit; }
void setPickTitle(const QString &title);
static int MinHeight, MaxHeight;
signals:
void buttonClickedOk(QWidget*);
void textEdited(QWidget*, const QString &);
void lostFocus(QWidget*);
void gotFocus(QWidget*);
protected slots:
virtual void buttonClicked() {};
void handleTextEdited(const QString &text) { emit textEdited(this, text); }
protected:
virtual bool eventFilter(QObject *obj, QEvent *event);
QToolButton *myButton;
QLineEdit *myLineEdit;
QString myTitlePicker;
};
/**
* \class iisLineEditDir
* \brief This class is used to pick a path to existing directory into the line editor.
*/
class iisLineEditDir : public iisLineEdit
{
public:
iisLineEditDir(QWidget *parent = 0);
//virtual ~iisLineEditDir();
static QIcon IconPickDir;
protected:
virtual void buttonClicked();
};
/**
* \class iisLineEditFile
* \brief This class is used to pick a path to existing file into the line editor.
*/
class iisLineEditFile : public iisLineEdit
{
public:
iisLineEditFile(QWidget *parent = 0);
//virtual ~iisLineEditDir();
static QIcon IconPickFile;
protected:
virtual void buttonClicked();
};
#endif /* IISLINEEDIT_H_ */