From 798eb9705341bdf330e8e238b6f0f2fb278a64c8 Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Sun, 5 Oct 2014 12:23:33 -0700 Subject: Qt: Packet list column sorting. Sorting behavior should be identical to GTK+. Pass the correct position to beginInsertRows. Add a list of to-do items to packet_list.cpp. Change-Id: Ie6ab4b9f2d780a2af430d0f90529edca5485dada Reviewed-on: https://code.wireshark.org/review/4481 Reviewed-by: Gerald Combs --- ui/qt/packet_list_model.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'ui/qt/packet_list_model.h') diff --git a/ui/qt/packet_list_model.h b/ui/qt/packet_list_model.h index 3775f1958a..9c22be5daa 100644 --- a/ui/qt/packet_list_model.h +++ b/ui/qt/packet_list_model.h @@ -65,9 +65,11 @@ public: int columnTextSize(const char *str); signals: + void goToPacket(int); public slots: void setMonospaceFont(const QFont &mono_font); + void sort(int column, Qt::SortOrder order = Qt::AscendingOrder); private: capture_file *cap_file_; @@ -78,6 +80,12 @@ private: QMap number_to_row_; int header_height_; + + static int sort_column_; + static int text_sort_column_; + static Qt::SortOrder sort_order_; + static capture_file *sort_cap_file_; + static bool recordLessThan(PacketListRecord *r1, PacketListRecord *r2); }; #endif // PACKET_LIST_MODEL_H -- cgit v1.2.1