3 * Wireshark - Network traffic analyzer
4 * By Gerald Combs <gerald@wireshark.org>
5 * Copyright 1998 Gerald Combs
7 * SPDX-License-Identifier: GPL-2.0-or-later*/
9 #ifndef UI_QT_APPLY_LINE_EDIT_H_
10 #define UI_QT_APPLY_LINE_EDIT_H_
15 #include <ui/qt/widgets/stock_icon_tool_button.h>
17 class ApplyLineEdit : public QLineEdit
22 explicit ApplyLineEdit(QString linePlaceholderText, QWidget *parent = 0);
25 Q_PROPERTY(QString regex READ regex WRITE setRegEx)
26 Q_PROPERTY(bool emptyAllowed READ emptyAllowed WRITE setEmptyAllowed)
29 void setRegEx(QString);
32 void setEmptyAllowed(bool);
38 void resizeEvent(QResizeEvent *);
45 StockIconToolButton *applyButton;
47 bool isValidText(QString &, bool ignoreEmptyCheck = false);
48 void handleValidation(QString newText);
51 void onTextEdited(const QString &);
52 void onTextChanged(const QString &);
53 void onSubmitContent();
56 #endif /* UI_QT_APPLY_LINE_EDIT_H_ */
64 * indent-tabs-mode: nil
67 * ex: set shiftwidth=4 tabstop=8 expandtab:
68 * :indentSize=4:tabSize=8:noTabs=true: