| Wireshark 4.7.3 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | List of all members
VoipCallsInfoModel Class Reference

Table model that exposes a list of VoIP call records for display in the VoIP Calls dialog, supporting both relative and time-of-day timestamp formatting. More...

`#include <voip_calls_info_model.h>`

Inheritance diagram for VoipCallsInfoModel:

## Public Types
enum | Column { StartTime , StopTime , InitialSpeaker , From , To , Protocol , Duration , Packets , State , Comments , ColumnCount }
| Column indices for the VoIP calls table. More...

## Public Member Functions
| VoipCallsInfoModel (QObject *parent=0)
| Constructs the model with an empty call list.
QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const override
| Returns display or decoration data for the given cell.
QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
| Returns column header labels for the VoIP calls table.
int | rowCount (const QModelIndex &parent=QModelIndex()) const override
| Returns the number of call records currently held by the model.
int | columnCount (const QModelIndex &parent=QModelIndex()) const override
| Returns the number of columns in the model.
void | setTimeOfDay (bool timeOfDay)
| Controls whether timestamps are shown as time-of-day or relative times.
bool | timeOfDay () const
| Returns whether timestamps are currently shown as time-of-day values.
void | updateCalls (GQueue *callsinfos)
| Replaces the model's call list with the contents of `callsinfos` and notifies the view to refresh.
void | removeAllCalls ()
| Removes all call records from the model and notifies the view.

## Static Public Member Functions
static voip_calls_info_t * | indexToCallInfo (const QModelIndex &index)
| Returns the voip_calls_info_t record associated with `index`.

## Detailed Description

Table model that exposes a list of VoIP call records for display in the VoIP Calls dialog, supporting both relative and time-of-day timestamp formatting.

## Member Enumeration Documentation

## ◆ Column

enum VoipCallsInfoModel::Column

Column indices for the VoIP calls table.

Enumerator
StartTime | Timestamp of the first packet in the call.
StopTime | Timestamp of the last packet in the call.
InitialSpeaker | Address of the party that initiated the call.
From | Calling party address or URI.
To | Called party address or URI.
Protocol | Signalling protocol (e.g. SIP, H.323).
Duration | Total duration of the call.
Packets | Number of packets belonging to the call.
State | Current call state (e.g. CALL, COMPLETED).
Comments | Free-text comments or extra protocol info.
ColumnCount | Sentinel value; not an actual column.

## Constructor & Destructor Documentation

## ◆ VoipCallsInfoModel()

VoipCallsInfoModel::VoipCallsInfoModel | ( | QObject * | parent = 0 | ) |

Constructs the model with an empty call list.

Parameters

  parent | Optional parent QObject.

## Member Function Documentation

## ◆ columnCount()

int VoipCallsInfoModel::columnCount | ( | const QModelIndex & | parent = QModelIndex() | ) | const
| override

Returns the number of columns in the model.

Parameters

  parent | Unused.

Returns
  Number of columns (Column::ColumnCount).

## ◆ data()

QVariant VoipCallsInfoModel::data | ( | const QModelIndex & | index,
|  | int | role = Qt::DisplayRole ) const
| override

Returns display or decoration data for the given cell.

Parameters

  index | Model index of the cell to query.
  role | Qt item data role.

Returns
  The requested data, or an invalid QVariant if not applicable.

## ◆ headerData()

QVariant VoipCallsInfoModel::headerData | ( | int | section,
|  | Qt::Orientation | orientation,
|  | int | role = Qt::DisplayRole ) const
| override

Returns column header labels for the VoIP calls table.

Parameters

  section | Column index.
  orientation | Qt::Horizontal for column headers.
  role | Qt item data role.

Returns
  Header label string, or an invalid QVariant if not applicable.

## ◆ indexToCallInfo()

voip_calls_info_t * VoipCallsInfoModel::indexToCallInfo | ( | const QModelIndex & | index | ) |
| static

Returns the voip_calls_info_t record associated with `index`.

Parameters

  index | Model index whose row identifies the call record.

Returns
  Pointer to the voip_calls_info_t, or `nullptr` if the index is invalid.

## ◆ rowCount()

int VoipCallsInfoModel::rowCount | ( | const QModelIndex & | parent = QModelIndex() | ) | const
| override

Returns the number of call records currently held by the model.

Parameters

  parent | Unused; must be an invalid index for table models.

Returns
  Number of rows.

## ◆ setTimeOfDay()

void VoipCallsInfoModel::setTimeOfDay | ( | bool | timeOfDay | ) |

Controls whether timestamps are shown as time-of-day or relative times.

Parameters

  timeOfDay | `true` to display absolute time-of-day; `false` for relative.

## ◆ timeOfDay()

bool VoipCallsInfoModel::timeOfDay | ( |  | ) | const

Returns whether timestamps are currently shown as time-of-day values.

Returns
  `true` if time-of-day display is active.

## ◆ updateCalls()

void VoipCallsInfoModel::updateCalls | ( | GQueue * | callsinfos | ) |

Replaces the model's call list with the contents of `callsinfos` and notifies the view to refresh.

Parameters

  callsinfos | GQueue of voip_calls_info_t pointers to display.

The documentation for this class was generated from the following files:

- /builds/wireshark/wireshark/ui/qt/models/voip_calls_info_model.h
- /builds/wireshark/wireshark/ui/qt/models/voip_calls_info_model.cpp