Kerberos: add kerberos_inject_longterm_key() helper function
[wireshark-sm.git] / ui / qt / models / voip_calls_info_model.h
blobafb7ebe310769361c856ebcc19d174cd823ffaf1
1 /** @file
3 * Wireshark - Network traffic analyzer
4 * By Gerald Combs <gerald@wireshark.org>
5 * Copyright 1998 Gerald Combs
7 * SPDX-License-Identifier: GPL-2.0-or-later
8 */
10 #ifndef VOIP_CALLS_INFO_MODEL_H
11 #define VOIP_CALLS_INFO_MODEL_H
13 #include <config.h>
15 #include "ui/voip_calls.h"
16 #include <ui/qt/utils/variant_pointer.h>
18 #include <QAbstractTableModel>
19 #include <QSortFilterProxyModel>
21 class VoipCallsInfoModel : public QAbstractTableModel
23 Q_OBJECT
25 public:
26 VoipCallsInfoModel(QObject *parent = 0);
27 QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
28 QVariant headerData(int section, Qt::Orientation orientation,
29 int role = Qt::DisplayRole) const;
30 int rowCount(const QModelIndex &parent = QModelIndex()) const;
31 int columnCount(const QModelIndex &parent = QModelIndex()) const;
32 void setTimeOfDay(bool timeOfDay);
33 bool timeOfDay() const;
34 void updateCalls(GQueue *callsinfos);
35 void removeAllCalls();
37 static voip_calls_info_t *indexToCallInfo(const QModelIndex &index);
39 enum Column
41 StartTime,
42 StopTime,
43 InitialSpeaker,
44 From,
45 To,
46 Protocol,
47 Duration,
48 Packets,
49 State,
50 Comments,
51 ColumnCount /* not an actual column, but used to find max. cols. */
54 private:
55 QList<void *> callinfos_;
56 bool mTimeOfDay_;
58 QVariant timeData(nstime_t *abs_ts, nstime_t *rel_ts) const;
61 class VoipCallsInfoSortedModel : public QSortFilterProxyModel
63 public:
64 VoipCallsInfoSortedModel(QObject *parent = 0);
66 protected:
67 bool lessThan(const QModelIndex &source_left, const QModelIndex &source_right) const;
70 #endif // VOIP_CALLS_INFO_MODEL_H