ORE Studio 0.0.4
Loading...
Searching...
No Matches
Public Member Functions | List of all members
SessionHistoryModel Class Reference

Table model for displaying session history. More...

#include <SessionHistoryDialog.hpp>

Inherits QAbstractTableModel.

Collaboration diagram for SessionHistoryModel:
Collaboration graph

Public Member Functions

 SessionHistoryModel (QObject *parent=nullptr)
 
int rowCount (const QModelIndex &parent=QModelIndex()) const override
 
int columnCount (const QModelIndex &parent=QModelIndex()) const override
 
QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const override
 
QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
 
void setSessions (const std::vector< iam::domain::session > &sessions)
 
void clear ()
 
void updateActiveBytesFromClient (std::uint64_t bytes_sent, std::uint64_t bytes_received)
 Inject live byte counters into active (no end_time) session rows.
 
const std::vector< iam::domain::session > & sessions () const
 

Detailed Description

Table model for displaying session history.

Member Function Documentation

◆ updateActiveBytesFromClient()

void updateActiveBytesFromClient ( std::uint64_t  bytes_sent,
std::uint64_t  bytes_received 
)

Inject live byte counters into active (no end_time) session rows.

Called on the UI thread from the auto-refresh timer so that the Sent/ Received columns stay current for the ongoing session without a full model reset (which would clear the table selection).