summaryrefslogtreecommitdiff
path: root/ui/qt/interface_tree_model.h
diff options
context:
space:
mode:
authorRoland Knall <roland.knall@br-automation.com>2016-10-03 16:31:36 +0200
committerRoland Knall <rknall@gmail.com>2016-10-03 17:06:03 +0000
commita50bed094bdb03ce68b65c6a69696ce446f9dd3d (patch)
treee401234babf57832582a86a815a98ea1e74ae5db /ui/qt/interface_tree_model.h
parent542c3c6f3a87ba147dd85f2909270cc2ad320e93 (diff)
downloadwireshark-a50bed094bdb03ce68b65c6a69696ce446f9dd3d.tar.gz
Interface List: Allow column filtering in model
This change allows for the definition of columns to be shown to the enduser if instanting the proxy model. The tree model will allways transport ALL data, and it is the job of the proxy model to determine which data is actually shown. Additionally, this removes the final definitions of the global interface array from interface_frame as well as sort_filter, so that knowledge about the inner workings of the interface list is contained to interface_tree_model Change-Id: Ib34b150066ee344ad0d18bec1d90826eb0fa28b2 Reviewed-on: https://code.wireshark.org/review/18039 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Roland Knall <rknall@gmail.com>
Diffstat (limited to 'ui/qt/interface_tree_model.h')
-rw-r--r--ui/qt/interface_tree_model.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/ui/qt/interface_tree_model.h b/ui/qt/interface_tree_model.h
index 9e1b7808ca..0e5e9e6aac 100644
--- a/ui/qt/interface_tree_model.h
+++ b/ui/qt/interface_tree_model.h
@@ -35,6 +35,7 @@
#include <QAbstractTableModel>
#include <QList>
#include <QMap>
+#include <QItemSelection>
typedef QList<int> PointList;
@@ -42,8 +43,12 @@ enum InterfaceTreeColumns
{
#ifdef HAVE_EXTCAP
IFTREE_COL_EXTCAP,
+ IFTREE_COL_EXTCAP_PATH,
#endif
IFTREE_COL_NAME,
+ IFTREE_COL_INTERFACE_NAME,
+ IFTREE_COL_HIDDEN,
+ IFTREE_COL_TYPE,
IFTREE_COL_STATS,
IFTREE_COL_MAX /* is not being displayed, it is the definition for the maximum numbers of columns */
};
@@ -64,6 +69,12 @@ public:
void stopStatistic();
#endif
+ QString interfaceError();
+ QItemSelection selectedDevices();
+ bool updateSelectedDevices(QItemSelection sourceSelection);
+
+ QVariant getColumnContent(int idx, int col);
+
public slots:
void getPoints(int idx, PointList *pts);