summaryrefslogtreecommitdiff
path: root/ui/qt/uat_model.h
diff options
context:
space:
mode:
authorRoland Knall <rknall@gmail.com>2017-06-21 17:19:36 -0400
committerRoland Knall <rknall@gmail.com>2017-06-27 15:14:56 +0000
commit1426c44281c2b266d7159340f7e75afc56141b18 (patch)
treeb0fdf4f64e89559a216d0511e072b65cb0694d42 /ui/qt/uat_model.h
parent6bd87bdd5d8f114768f5d9777d7e1713c017e488 (diff)
downloadwireshark-1426c44281c2b266d7159340f7e75afc56141b18.tar.gz
Qt: Context menu for toolbar filter buttons
Adds a context menu for the toolbar filter buttons, which allows for opening the preference for the filter buttons, as well as direct edit, removal and disable functionality Change-Id: I5f2d132737c77804cf22834574dfe3c02f85fbdf Reviewed-on: https://code.wireshark.org/review/22327 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Roland Knall <rknall@gmail.com>
Diffstat (limited to 'ui/qt/uat_model.h')
-rw-r--r--ui/qt/uat_model.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/ui/qt/uat_model.h b/ui/qt/uat_model.h
index 36e79ebf83..c52646d7c3 100644
--- a/ui/qt/uat_model.h
+++ b/ui/qt/uat_model.h
@@ -38,7 +38,8 @@ class UatModel : public QAbstractTableModel
Q_OBJECT
public:
- UatModel(QObject *parent = 0, epan_uat *uat = 0);
+ UatModel(QObject *parent, uat_t *uat = 0);
+ UatModel(QObject *parent, QString tableName);
Qt::ItemFlags flags(const QModelIndex &index) const;
QVariant data(const QModelIndex &index, int role) const;
@@ -55,9 +56,12 @@ public:
bool copyRow(int dst_row, int src_row);
bool hasErrors() const;
+ QModelIndex findRowForColumnContent(QVariant columnContent, int columnToCheckAgainst, int role = Qt::DisplayRole);
+
private:
bool checkField(int row, int col, char **error) const;
QList<int> checkRow(int row);
+ void loadUat(uat_t * uat = 0);
epan_uat *uat_;
QList<bool> dirty_records;