Revert "TODO epan/dissectors/asn1/kerberos/packet-kerberos-template.c new GSS flags"
[wireshark-sm.git] / ui / qt / coloring_rules_dialog.h
blob5581e1067ff46536ff226aebf03f9d67e289408e
1 /** @file
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
8 */
10 #ifndef COLORING_RULES_DIALOG_H
11 #define COLORING_RULES_DIALOG_H
13 #include "geometry_state_dialog.h"
14 #include "filter_action.h"
16 #include <ui/qt/models/coloring_rules_model.h>
17 #include <ui/qt/models/coloring_rules_delegate.h>
19 #include <QMap>
21 class QAbstractButton;
23 namespace Ui {
24 class ColoringRulesDialog;
27 class ColoringRulesDialog : public GeometryStateDialog
29 Q_OBJECT
31 public:
32 explicit ColoringRulesDialog(QWidget *parent = 0, QString add_filter = QString());
33 ~ColoringRulesDialog();
35 signals:
36 void filterAction(QString filter, FilterAction::Action action, FilterAction::ActionType type);
38 protected:
39 void showEvent(QShowEvent *);
41 private slots:
42 void copyFromProfile(QString fileName);
43 void colorRuleSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
44 void colorChanged(bool foreground, const QColor &cc);
45 void on_fGPushButton_clicked();
46 void on_bGPushButton_clicked();
47 void on_displayFilterPushButton_clicked();
48 void on_newToolButton_clicked();
49 void on_deleteToolButton_clicked();
50 void on_copyToolButton_clicked();
51 void on_clearToolButton_clicked();
52 void on_buttonBox_clicked(QAbstractButton *button);
53 void on_buttonBox_accepted();
54 void on_buttonBox_helpRequested();
55 void rowCountChanged();
56 void invalidField(const QModelIndex &index, const QString& errMessage);
57 void validField(const QModelIndex &index);
58 void treeItemClicked(const QModelIndex &index);
60 private:
61 Ui::ColoringRulesDialog *ui;
62 QPushButton *import_button_;
63 QPushButton *export_button_;
64 ColoringRulesModel colorRuleModel_;
65 ColoringRulesDelegate colorRuleDelegate_;
67 QMap<QModelIndex, QString> errors_;
69 void checkUnknownColorfilters();
70 void setColorButtons(QModelIndex &index);
71 void updateHint(QModelIndex idx = QModelIndex());
73 void addRule(bool copy_from_current = false);
74 void changeColor(bool foreground = true);
76 bool isValidFilter(QString filter, QString *error);
79 #endif // COLORING_RULES_DIALOG_H