10#ifndef VOIP_CALLS_INFO_MODEL_H
11#define VOIP_CALLS_INFO_MODEL_H
18#include <QAbstractTableModel>
19#include <QSortFilterProxyModel>
43 QVariant
data(
const QModelIndex &index,
int role = Qt::DisplayRole)
const;
52 QVariant
headerData(
int section, Qt::Orientation orientation,
53 int role = Qt::DisplayRole)
const;
60 int rowCount(
const QModelIndex &parent = QModelIndex())
const;
67 int columnCount(
const QModelIndex &parent = QModelIndex())
const;
119 QList<void *> callinfos_;
153 bool lessThan(
const QModelIndex &source_left,
const QModelIndex &source_right)
const;
Table model that exposes a list of VoIP call records for display in the VoIP Calls dialog,...
Definition voip_calls_info_model.h:27
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
Returns column header labels for the VoIP calls table.
Definition voip_calls_info_model.cpp:111
void updateCalls(GQueue *callsinfos)
Replaces the model's call list with the contents of callsinfos and notifies the view to refresh.
Definition voip_calls_info_model.cpp:190
int columnCount(const QModelIndex &parent=QModelIndex()) const
Returns the number of columns in the model.
Definition voip_calls_info_model.cpp:152
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
Returns display or decoration data for the given cell.
Definition voip_calls_info_model.cpp:29
static voip_calls_info_t * indexToCallInfo(const QModelIndex &index)
Returns the voip_calls_info_t record associated with index.
Definition voip_calls_info_model.cpp:24
void setTimeOfDay(bool timeOfDay)
Controls whether timestamps are shown as time-of-day or relative times.
Definition voip_calls_info_model.cpp:176
void removeAllCalls()
Removes all call records from the model and notifies the view.
Definition voip_calls_info_model.cpp:223
bool timeOfDay() const
Returns whether timestamps are currently shown as time-of-day values.
Definition voip_calls_info_model.cpp:185
Column
Column indices for the VoIP calls table.
Definition voip_calls_info_model.h:104
@ To
Definition voip_calls_info_model.h:109
@ ColumnCount
Definition voip_calls_info_model.h:115
@ Comments
Definition voip_calls_info_model.h:114
@ StopTime
Definition voip_calls_info_model.h:106
@ Duration
Definition voip_calls_info_model.h:111
@ From
Definition voip_calls_info_model.h:108
@ StartTime
Definition voip_calls_info_model.h:105
@ InitialSpeaker
Definition voip_calls_info_model.h:107
@ Packets
Definition voip_calls_info_model.h:112
@ Protocol
Definition voip_calls_info_model.h:110
@ State
Definition voip_calls_info_model.h:113
int rowCount(const QModelIndex &parent=QModelIndex()) const
Returns the number of call records currently held by the model.
Definition voip_calls_info_model.cpp:142
Sort proxy model for VoipCallsInfoModel that provides column-aware comparisons, handling numeric and ...
Definition voip_calls_info_model.h:137
bool lessThan(const QModelIndex &source_left, const QModelIndex &source_right) const
Compares two rows for sorting, using type-appropriate comparisons for numeric, duration,...
Definition voip_calls_info_model.cpp:236
Unified record describing a single detected VoIP call across all supported protocols.
Definition voip_calls.h:191