Wireshark 4.5.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
apply_line_edit.h
Go to the documentation of this file.
1
10#ifndef UI_QT_APPLY_LINE_EDIT_H_
11#define UI_QT_APPLY_LINE_EDIT_H_
12
13#include <QLineEdit>
14#include <QString>
15
17
18class ApplyLineEdit : public QLineEdit
19{
20 Q_OBJECT
21
22public:
23 explicit ApplyLineEdit(QString linePlaceholderText, QWidget *parent = 0);
25
26 Q_PROPERTY(QString regex READ regex WRITE setRegEx)
27 Q_PROPERTY(bool emptyAllowed READ emptyAllowed WRITE setEmptyAllowed)
28
29 QString regex();
30 void setRegEx(QString);
31
32 bool emptyAllowed();
33 void setEmptyAllowed(bool);
34
35signals:
36 void textApplied();
37
38protected:
39 void resizeEvent(QResizeEvent *);
40
41private:
42
43 QString regex_;
44 bool emptyAllowed_;
45
46 StockIconToolButton *apply_button_;
47
48 bool isValidText(QString &, bool ignoreEmptyCheck = false);
49 void handleValidation(QString newText);
50
51private slots:
52 void onTextEdited(const QString &);
53 void onTextChanged(const QString &);
54 void onSubmitContent();
55};
56
57#endif /* UI_QT_APPLY_LINE_EDIT_H_ */
Definition apply_line_edit.h:19
Definition stock_icon_tool_button.h:16