Skip to main content

EventTableModel

EventTableModel

#include <EventTableModel.hpp>

Inherits from QAbstractTableModel

Public Functions

Name
EventTableModel(QObject * parent =[nullptr])
void setEvents(DigitalEventSeries const * event_data)
Populate the model from a DigitalEventSeries.
void setGroupManager(GroupManager * group_manager)
Set the GroupManager for group name resolution.
void setGroupFilter(int group_id)
Set a group filter.
void clearGroupFilter()
Clear the group filter (show all groups).
int rowCount(QModelIndex const & parent) const override
int columnCount(QModelIndex const & parent) const override
QVariant data(QModelIndex const & index, int role) const override
QVariant headerData(int section, Qt::Orientation orientation, int role) const override
Qt::ItemFlags flags(QModelIndex const & index) const override
void sort(int column, Qt::SortOrder order) override
EventTableRow getRowData(int row) const
Get the row data at a specific row.
TimeFrameIndex getEvent(int row) const
Get the event time at a specific row (convenience).

Public Functions Documentation

function EventTableModel

explicit EventTableModel(
    QObject * parent =nullptr
)

function setEvents

void setEvents(
    DigitalEventSeries const * event_data
)

Populate the model from a DigitalEventSeries.

Parameters:

  • event_data Pointer to the series (can be nullptr to clear)

function setGroupManager

void setGroupManager(
    GroupManager * group_manager
)

Set the GroupManager for group name resolution.

Parameters:

function setGroupFilter

void setGroupFilter(
    int group_id
)

Set a group filter.

Parameters:

  • group_id Group ID to filter by, or -1 to show all

function clearGroupFilter

void clearGroupFilter()

Clear the group filter (show all groups).

function rowCount

int rowCount(
    QModelIndex const & parent
) const override

function columnCount

int columnCount(
    QModelIndex const & parent
) const override

function data

QVariant data(
    QModelIndex const & index,
    int role
) const override

function headerData

QVariant headerData(
    int section,
    Qt::Orientation orientation,
    int role
) const override

function flags

Qt::ItemFlags flags(
    QModelIndex const & index
) const override

function sort

void sort(
    int column,
    Qt::SortOrder order
) override

function getRowData

EventTableRow getRowData(
    int row
) const

Get the row data at a specific row.

Parameters:

  • row Row index

Return: EventTableRow data

function getEvent

TimeFrameIndex getEvent(
    int row
) const

Get the event time at a specific row (convenience).

Parameters:

  • row Row index

Return: TimeFrameIndex for the event


Updated on 2026-11-13 at 20:25:40 +0000