forked from osmocom/wireshark
Simple statistics export: fill in callback to get item data
Bug: 13942 Change-Id: Ie7d13b1c17083d0a5b98282f04e6ac30319352a7 Reviewed-on: https://code.wireshark.org/review/24853 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
6a5e90f2d9
commit
f4b2263a0b
|
@ -289,6 +289,20 @@ void SimpleStatisticsDialog::fillTree()
|
|||
removeTapListeners();
|
||||
}
|
||||
|
||||
// This is how an item is represented for exporting.
|
||||
QList<QVariant> SimpleStatisticsDialog::treeItemData(QTreeWidgetItem *it) const
|
||||
{
|
||||
// Cast up to our type.
|
||||
SimpleStatisticsTreeWidgetItem *rit = dynamic_cast<SimpleStatisticsTreeWidgetItem*>(it);
|
||||
if (rit) {
|
||||
return rit->rowData();
|
||||
}
|
||||
else {
|
||||
return QList<QVariant>();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
SimpleStatisticsDialog::~SimpleStatisticsDialog()
|
||||
{
|
||||
stu_->refcount--;
|
||||
|
|
|
@ -49,6 +49,9 @@ private:
|
|||
static void tapReset(void *sd_ptr);
|
||||
static void tapDraw(void *sd_ptr);
|
||||
|
||||
// How each item (SimpleStatisticsTreeWidgetItem) will be exported
|
||||
virtual QList<QVariant> treeItemData(QTreeWidgetItem *) const;
|
||||
|
||||
~SimpleStatisticsDialog();
|
||||
|
||||
private slots:
|
||||
|
|
Loading…
Reference in New Issue