diff options
Diffstat (limited to 'ui/qt/widgets/dissector_syntax_line_edit.h')
-rw-r--r-- | ui/qt/widgets/dissector_syntax_line_edit.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/ui/qt/widgets/dissector_syntax_line_edit.h b/ui/qt/widgets/dissector_syntax_line_edit.h new file mode 100644 index 0000000..adcee8c --- /dev/null +++ b/ui/qt/widgets/dissector_syntax_line_edit.h @@ -0,0 +1,39 @@ +/** @file + * + * Wireshark - Network traffic analyzer + * By Gerald Combs <gerald@wireshark.org> + * Copyright 1998 Gerald Combs + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#ifndef DISSECTOR_SYNTAX_LINEEDIT_H +#define DISSECTOR_SYNTAX_LINEEDIT_H + +#include <ui/qt/widgets/syntax_line_edit.h> + +class QEvent; +class StockIconToolButton; + +class DissectorSyntaxLineEdit : public SyntaxLineEdit +{ + Q_OBJECT +public: + explicit DissectorSyntaxLineEdit(QWidget *parent = 0); + +protected: + void keyPressEvent(QKeyEvent *event) { completionKeyPressEvent(event); } + void focusInEvent(QFocusEvent *event) { completionFocusInEvent(event); } + +private slots: + void checkDissectorName(const QString &dissector); + void changeEvent(QEvent* event); + +private: + QString placeholder_text_; + + void setDefaultPlaceholderText(); + void buildCompletionList(const QString &field_word, const QString &preamble); +}; + +#endif // DISSECTOR_SYNTAX_LINEEDIT_H |