Skip to main content

IntervalTableModel

IntervalTableModel

#include <IntervalTableModel.hpp>

Inherits from QAbstractTableModel

Public Functions

Name
IntervalTableModel(QObject * parent =[nullptr])
void setIntervals(DigitalIntervalSeries const * interval_data)
Populate the model from a DigitalIntervalSeries.
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
IntervalTableRow getRowData(int row) const
Get the row data at a specific row.
TimeFrameInterval getInterval(int row) const
Get the interval at a specific row (convenience).

Public Functions Documentation

function IntervalTableModel

explicit IntervalTableModel(
    QObject * parent =nullptr
)

function setIntervals

void setIntervals(
    DigitalIntervalSeries const * interval_data
)

Populate the model from a DigitalIntervalSeries.

Parameters:

  • interval_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

IntervalTableRow getRowData(
    int row
) const

Get the row data at a specific row.

Parameters:

  • row Row index

Return: IntervalTableRow data

function getInterval

TimeFrameInterval getInterval(
    int row
) const

Get the interval at a specific row (convenience).

Parameters:

  • row Row index

Return: Interval data


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