| Wireshark 4.7.0 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
interface_toolbar_lineedit.h
Go to the documentation of this file.
1
10#ifndef INTERFACE_TOOLBAR_LINEEDIT_H
11#define INTERFACE_TOOLBAR_LINEEDIT_H
12
13#include <QLineEdit>
14#include <QRegularExpression>
15
16class StockIconToolButton;
17
18 class InterfaceToolbarLineEdit : public QLineEdit
19{
20 Q_OBJECT
21
22public:
23 explicit InterfaceToolbarLineEdit(QWidget *parent = 0, QString validation_regex = QString(), bool is_required = false);
24 void disableApplyButton();
25
26protected:
27 void resizeEvent(QResizeEvent *);
28
29signals:
30 void editedTextApplied();
31
32private slots:
33 void validateText();
34 void validateEditedText();
35 void applyEditedText();
36
37private:
38 bool isValid();
39 void updateStyleSheet(bool is_valid);
40
41 StockIconToolButton *apply_button_;
42 QRegularExpression regex_expr_;
43 bool is_required_;
44 bool text_edited_;
45};
46
47#endif // INTERFACE_TOOLBAR_LINEEDIT_H
InterfaceToolbarLineEdit
Definition interface_toolbar_lineedit.h:19
StockIconToolButton
Definition stock_icon_tool_button.h:16