PreviewTableModel
PreviewTableModel
Read-only table model that renders a small-window TableView preview. More…
#include <PreviewTableModel.hpp>
Inherits from QAbstractTableModel
Public Functions
| Name | |
|---|---|
| PreviewTableModel(QObject * parent =[nullptr]) | |
| ~PreviewTableModel() override =default | |
| void | setPreview(std::shared_ptr< TableView > view) Replace the current preview with a new TableView. |
| void | clearPreview() Clear any existing preview. |
| int | rowCount(QModelIndex const & parent =QModelIndex()) const override |
| int | columnCount(QModelIndex const & parent =QModelIndex()) const override |
| QVariant | data(QModelIndex const & index, int role =Qt::DisplayRole) const override |
| QVariant | headerData(int section, Qt::Orientation orientation, int role =Qt::DisplayRole) const override |
Detailed Description
class PreviewTableModel;Read-only table model that renders a small-window TableView preview.
Renders scalar columns directly and joins vector elements using commas (e.g., 1,2,3) per the user’s preference.
Public Functions Documentation
function PreviewTableModel
explicit PreviewTableModel(
QObject * parent =nullptr
)function ~PreviewTableModel
~PreviewTableModel() override =defaultfunction setPreview
void setPreview(
std::shared_ptr< TableView > view
)Replace the current preview with a new TableView.
Parameters:
- view Newly built preview TableView.
function clearPreview
void clearPreview()Clear any existing preview.
function rowCount
int rowCount(
QModelIndex const & parent =QModelIndex()
) const overridefunction columnCount
int columnCount(
QModelIndex const & parent =QModelIndex()
) const overridefunction data
QVariant data(
QModelIndex const & index,
int role =Qt::DisplayRole
) const overridefunction headerData
QVariant headerData(
int section,
Qt::Orientation orientation,
int role =Qt::DisplayRole
) const overrideUpdated on 2026-11-13 at 20:25:40 +0000