TableViewerWidget
TableViewerWidget
Widget for viewing TableView objects with efficient scrolling. More…
#include <TableViewerWidget.hpp>
Inherits from QWidget
Public Signals
| Name | |
|---|---|
| void | rowScrolled(size_t row_index) Emitted when the user scrolls to a specific row. |
| void | columnsReordered(QStringList const & newOrder) Emitted when columns are reordered via the header. |
Public Functions
| Name | |
|---|---|
| TableViewerWidget(QWidget * parent =[nullptr]) | |
| ~TableViewerWidget() override | |
| void | setTableView(std::shared_ptr< TableView > table_view, QString const & table_name =““) Display a complete TableView object. |
| void | setTableConfiguration(std::unique_ptr< IRowSelector > row_selector, std::vector< ColumnInfo > column_infos, std::shared_ptr< DataManager > data_manager, QString const & table_name =““, QString const & row_source =QString()) Display a table using pagination with mini selectors. |
| void | clearTable() Clear the current table display. |
| void | setPageSize(size_t page_size) Set the page size for pagination. |
| QString | getTableName() const Get the current table name being displayed. |
| bool | hasTable() const Check if a table is currently loaded. |
| QStringList | getCurrentColumnOrder() const Get current visual column order (left-to-right column names). |
| void | applyColumnOrder(QStringList const & desiredOrder) Apply a desired column order by column names. |
Detailed Description
class TableViewerWidget;Widget for viewing TableView objects with efficient scrolling.
This widget provides a read-only interface for viewing table data. It can display either:
- Pre-built TableView objects (complete tables)
- Table configurations using mini selectors for efficient pagination
The widget handles large datasets by creating small TableView windows on-demand rather than materializing entire tables.
Public Signals Documentation
signal rowScrolled
void rowScrolled(
size_t row_index
)Emitted when the user scrolls to a specific row.
Parameters:
- row_index Global row index (0-based)
signal columnsReordered
void columnsReordered(
QStringList const & newOrder
)Emitted when columns are reordered via the header.
Public Functions Documentation
function TableViewerWidget
explicit TableViewerWidget(
QWidget * parent =nullptr
)function ~TableViewerWidget
~TableViewerWidget() overridefunction setTableView
void setTableView(
std::shared_ptr< TableView > table_view,
QString const & table_name =""
)Display a complete TableView object.
Parameters:
- table_view Pre-built table to display
- table_name Display name for the table (optional)
function setTableConfiguration
void setTableConfiguration(
std::unique_ptr< IRowSelector > row_selector,
std::vector< ColumnInfo > column_infos,
std::shared_ptr< DataManager > data_manager,
QString const & table_name ="",
QString const & row_source =QString()
)Display a table using pagination with mini selectors.
Parameters:
- row_selector Row selector defining all rows
- column_infos Column definitions
- data_manager Data manager for building mini tables
- table_name Display name for the table (optional)
function clearTable
void clearTable()Clear the current table display.
function setPageSize
void setPageSize(
size_t page_size
)Set the page size for pagination.
Parameters:
- page_size Number of rows per page
default: 1000 rows per page
function getTableName
QString getTableName() constGet the current table name being displayed.
function hasTable
bool hasTable() constCheck if a table is currently loaded.
function getCurrentColumnOrder
inline QStringList getCurrentColumnOrder() constGet current visual column order (left-to-right column names).
function applyColumnOrder
void applyColumnOrder(
QStringList const & desiredOrder
)Apply a desired column order by column names.
Updated on 2026-11-13 at 20:25:39 +0000