Wireshark 4.5.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
voip_calls_info_model.h
Go to the documentation of this file.
1
10#ifndef VOIP_CALLS_INFO_MODEL_H
11#define VOIP_CALLS_INFO_MODEL_H
12
13#include <config.h>
14
15#include "ui/voip_calls.h"
17
18#include <QAbstractTableModel>
19#include <QSortFilterProxyModel>
20
21class VoipCallsInfoModel : public QAbstractTableModel
22{
23 Q_OBJECT
24
25public:
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();
36
37 static voip_calls_info_t *indexToCallInfo(const QModelIndex &index);
38
39 enum Column
40 {
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. */
52 };
53
54private:
55 QList<void *> callinfos_;
56 bool mTimeOfDay_;
57
58 QVariant timeData(nstime_t *abs_ts, nstime_t *rel_ts) const;
59};
60
61class VoipCallsInfoSortedModel : public QSortFilterProxyModel
62{
63public:
64 VoipCallsInfoSortedModel(QObject *parent = 0);
65
66protected:
67 bool lessThan(const QModelIndex &source_left, const QModelIndex &source_right) const;
68};
69
70#endif // VOIP_CALLS_INFO_MODEL_H
Definition voip_calls_info_model.h:22
Definition voip_calls_info_model.h:62
Definition voip_calls.h:144
Definition nstime.h:26