diff options
author | Gerald Combs <gerald@wireshark.org> | 2015-03-11 15:22:20 -0700 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2015-05-08 04:29:59 +0000 |
commit | f77e02ccc62c9283eefba416efbb2f94e460066e (patch) | |
tree | 40aa62ed6f8c03e22cdc636e2335f3b810810b65 /ui/qt/expert_info_dialog.h | |
parent | 3d7ff97e4fa9211a064acbac0ec0c025a164d69e (diff) |
Expert Info dialog.
Show all expert messages in a combined view. Group top-level items by a
(severity, group, protocol) tuple.
Let the user enable and disable messages via a check menu.
Add ProtoTree::goToField and expert_info_t.hf_index. Use them to jump to
what we hope is the afflicted item.
Enable the context menu only if the user has selected a packet item.
Add a free-form search field that matches expert summaries.
This differs from the GTK+ version but hopefully provides a smoother
workflow.
Bug: 10931
Change-Id: Ia12cb7c27cdea1634fa2798fb7e4c1b23bd16ad2
Reviewed-on: https://code.wireshark.org/review/8294
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'ui/qt/expert_info_dialog.h')
-rw-r--r-- | ui/qt/expert_info_dialog.h | 116 |
1 files changed, 116 insertions, 0 deletions
diff --git a/ui/qt/expert_info_dialog.h b/ui/qt/expert_info_dialog.h new file mode 100644 index 0000000000..04fb211159 --- /dev/null +++ b/ui/qt/expert_info_dialog.h @@ -0,0 +1,116 @@ +/* expert_info_dialog.h + * + * Wireshark - Network traffic analyzer + * By Gerald Combs <gerald@wireshark.org> + * Copyright 1998 Gerald Combs + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#ifndef EXPERT_INFO_DIALOG_H +#define EXPERT_INFO_DIALOG_H + +#include "config.h" + +#include <glib.h> + +#include "epan/epan_dissect.h" + +#include "filter_action.h" +#include "wireshark_dialog.h" + +#include <QMenu> +#include <QTreeWidgetItem> + +struct expert_info_s; + +namespace Ui { +class ExpertInfoDialog; +} + +class ExpertInfoDialog : public WiresharkDialog +{ + Q_OBJECT + +public: + explicit ExpertInfoDialog(QWidget &parent, CaptureFile& capture_file); + ~ExpertInfoDialog(); + + void clearAllData(); + void setDisplayFilter(const QString &display_filter = QString()); + +signals: + void goToPacket(int packet_num, int hf_id); + void filterAction(QString& filter, FilterAction::Action action, FilterAction::ActionType type); + +private: + Ui::ExpertInfoDialog *ui; + + int comment_events_; +// int disp_events; + int chat_events_; + int note_events_; + int warn_events_; + int error_events_; + + bool need_show_hide_; + + QMenu ctx_menu_; + + QHash<QString, QTreeWidgetItem*> ei_to_ti_; + QList<QAction *> severity_actions_; + + QString display_filter_; + + void retapPackets(); + + // Called from tapPacket + void addExpertInfo(struct expert_info_s *expert_info); + // Called from tapDraw + void updateCounts(); + + // Callbacks for register_tap_listener + static void tapReset(void *eid_ptr); + static gboolean tapPacket(void *eid_ptr, packet_info *pinfo, epan_dissect_t *, const void *data); + static void tapDraw(void *eid_ptr); + +private slots: + void updateWidgets(); + + void actionShowToggled(); + void showProtoHierMenu(QPoint pos); + void filterActionTriggered(); + void captureFileClosing(); + + void on_expertInfoTreeWidget_currentItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *); + void on_limitCheckBox_toggled(bool); + void on_searchLineEdit_textChanged(const QString &search_re); + void on_buttonBox_helpRequested(); +}; + +#endif // EXPERT_INFO_DIALOG_H + +/* + * Editor modelines + * + * Local Variables: + * c-basic-offset: 4 + * tab-width: 8 + * indent-tabs-mode: nil + * End: + * + * ex: set shiftwidth=4 tabstop=8 expandtab: + * :indentSize=4:tabSize=8:noTabs=true: + */ |