Wireshark 4.7.0
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
 Returns display or decoration data for the given cell.
 
QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
 Returns column header labels for the VoIP calls table.
 
int rowCount (const QModelIndex &parent=QModelIndex()) const
 Returns the number of call records currently held by the model.
 
int columnCount (const QModelIndex &parent=QModelIndex()) const
 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_tindexToCallInfo (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

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
parentOptional parent QObject.

Member Function Documentation

◆ columnCount()

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

Returns the number of columns in the model.

Parameters
parentUnused.
Returns
Number of columns (Column::ColumnCount).

◆ data()

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

Returns display or decoration data for the given cell.

Parameters
indexModel index of the cell to query.
roleQt 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

Returns column header labels for the VoIP calls table.

Parameters
sectionColumn index.
orientationQt::Horizontal for column headers.
roleQt 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
indexModel 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

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

Parameters
parentUnused; 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
timeOfDaytrue 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
callsinfosGQueue of voip_calls_info_t pointers to display.

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