aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/conversation_dialog.h
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2014-07-23 13:38:55 -0400
committerGerald Combs <gerald@wireshark.org>2014-07-26 20:59:42 +0000
commit31ecdf5b06bff3bb2e706e840c28c519698e6f67 (patch)
tree71b3e59889e862560412d317df71113f66b094b6 /ui/qt/conversation_dialog.h
parent507d07eda6ad562d4567cf0ee83aa9b03997beca (diff)
Refactor "common" Conversation table functionality.
Refactor (non-GUI) conversation table functionality from gtk/Qt to epan. Also refactor "common GUI" conversation table functionality. The idea is to not have to modify the GUI when a dissector adds a new "conversation type" Change-Id: I11f08d0d7edd631218663ba4b902c4a4c849acda Reviewed-on: https://code.wireshark.org/review/3113 Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'ui/qt/conversation_dialog.h')
-rw-r--r--ui/qt/conversation_dialog.h18
1 files changed, 13 insertions, 5 deletions
diff --git a/ui/qt/conversation_dialog.h b/ui/qt/conversation_dialog.h
index 26bf91c102..59c183d22c 100644
--- a/ui/qt/conversation_dialog.h
+++ b/ui/qt/conversation_dialog.h
@@ -27,6 +27,7 @@
#include <file.h>
#include "ui/follow.h"
+#include "epan/conversation_table.h"
#include <QAction>
#include <QMenu>
@@ -42,7 +43,14 @@ class ConversationDialog : public QDialog
Q_OBJECT
public:
- explicit ConversationDialog(QWidget *parent = 0, capture_file *cf = NULL, const char *stat_arg = NULL);
+ /** Create a new conversation window.
+ *
+ * @param parent Parent widget.
+ * @param cf Capture file. No statistics will be calculated if this is NULL.
+ * @param proto_id If valid, add this protocol and bring it to the front.
+ * @param filter Display filter to apply.
+ */
+ explicit ConversationDialog(QWidget *parent = 0, capture_file *cf = NULL, int proto_id = -1, const char *filter = NULL);
~ConversationDialog();
public slots:
@@ -59,16 +67,14 @@ private:
capture_file *cap_file_;
QString filter_;
QMenu conv_type_menu_;
- QMap<conversation_type_e, ConversationTreeWidget *> conv_type_to_tree_;
+ QMap<int, ConversationTreeWidget *> proto_id_to_tree_;
QList<QAction> conv_actions_;
QPushButton *copy_bt_;
QPushButton *follow_bt_;
QPushButton *graph_bt_;
- void initStatCmdMap();
// Adds a conversation tree. Returns true if the tree was freshly created, false if it was cached.
- bool addConversationType(conversation_type_e conv_type);
- conversation_type_e tabType(int index);
+ bool addConversationTable(register_ct_t* table);
conv_item_t *currentConversation();
private slots:
@@ -86,6 +92,8 @@ private slots:
void on_buttonBox_helpRequested();
};
+void init_conversation_table(struct register_ct* ct, const char *filter);
+
#endif // CONVERSATION_DIALOG_H
/*