Wireshark 2.9.0-477-g68ec514b The Wireshark network protocol analyzer

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

interface_toolbar_lineedit.h
1 /* interface_toolbar_lineedit.h
2 *
3 * Wireshark - Network traffic analyzer
4 * By Gerald Combs <gerald@wireshark.org>
5 * Copyright 1998 Gerald Combs
6 *
7 * SPDX-License-Identifier: GPL-2.0-or-later
8 */
9
10 #ifndef INTERFACE_TOOLBAR_LINEEDIT_H
11 #define INTERFACE_TOOLBAR_LINEEDIT_H
12
13 #include <QLineEdit>
14
15 class StockIconToolButton;
16
17 class InterfaceToolbarLineEdit : public QLineEdit
18 {
19 Q_OBJECT
20
21 public:
22 explicit InterfaceToolbarLineEdit(QWidget *parent = 0, QString validation_regex = QString(), bool is_required = false);
23 void disableApplyButton();
24
25 protected:
26 void resizeEvent(QResizeEvent *);
27
28 signals:
29 void editedTextApplied();
30
31 private slots:
32 void validateText();
33 void validateEditedText();
34 void applyEditedText();
35
36 private:
37 bool isValid();
38 void updateStyleSheet(bool is_valid);
39
40 StockIconToolButton *apply_button_;
41 QRegExp regex_expr_;
42 bool is_required_;
43 bool text_edited_;
44 };
45
46 #endif // INTERFACE_TOOLBAR_LINEEDIT_H
47
48 /*
49 * Editor modelines
50 *
51 * Local Variables:
52 * c-basic-offset: 4
53 * tab-width: 8
54 * indent-tabs-mode: nil
55 * End:
56 *
57 * ex: set shiftwidth=4 tabstop=8 expandtab:
58 * :indentSize=4:tabSize=8:noTabs=true:
59 */
InterfaceToolbarLineEdit
Definition: interface_toolbar_lineedit.h:17
StockIconToolButton
Definition: stock_icon_tool_button.h:15