1 /* display_filter_combo.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 DISPLAY_FILTER_COMBO_H 11 #define DISPLAY_FILTER_COMBO_H 12 13 #include <QComboBox> 14 #include <QList> 15 16 class DisplayFilterCombo : public QComboBox 17 { 18 Q_OBJECT 19 public: 20 explicit DisplayFilterCombo(QWidget *parent = 0); 21 bool addRecentCapture(const char *filter); 22 void writeRecent(FILE *rf); 23 24 protected: 25 virtual bool event(QEvent *event); 26 27 private: 28 void updateStyleSheet(); 29 30 public slots: 31 bool checkDisplayFilter(); 32 void applyDisplayFilter(); 33 void setDisplayFilter(QString filter); 34 35 private slots: 36 void updateMaxCount(); 37 }; 38 39 #endif // DISPLAY_FILTER_COMBO_H 40