NDEVR
API Documentation
QCustomTableWidget

Provides a standard way to show table data within the application. More...

Public Member Functions

 QCustomTableWidget (int rows, int columns, QWidget *parent=nullptr)
 Constructs a table widget with the specified number of rows and columns.
 QCustomTableWidget (QWidget *parent=nullptr)
 Constructs a table widget with no initial rows or columns.
void resizeColumnsEvenly (QSize widget_size)
 Resizes all columns to be evenly distributed across the given widget size.
void setColumnColor (int column, const RGBColor &color)
 Sets the background color for all cells in a column.
void setColumnHeaderColor (int column, const RGBColor &color)
 Sets the background color for a column header cell.

Protected Member Functions

void onClicked ()
 Slot called when a cell is clicked.
void setup ()
 Performs initial setup of the table widget, including touch scrolling and signal connections.

Private Member Functions

void resizeEvent (QResizeEvent *event) override
 Handles resize events to optionally resize columns evenly.

Detailed Description

Provides a standard way to show table data within the application.


Definition at line 44 of file QCustomTableWidget.h.

Constructor & Destructor Documentation

◆ QCustomTableWidget() [1/2]

QCustomTableWidget::QCustomTableWidget ( QWidget * parent = nullptr)

Constructs a table widget with no initial rows or columns.

Parameters
[in]parentThe parent widget, or nullptr for no parent.

Referenced by QCustomTableWidget().

◆ QCustomTableWidget() [2/2]

QCustomTableWidget::QCustomTableWidget ( int rows,
int columns,
QWidget * parent = nullptr )

Constructs a table widget with the specified number of rows and columns.

Parameters
[in]rowsThe initial number of rows.
[in]columnsThe initial number of columns.
[in]parentThe parent widget, or nullptr for no parent.

References QCustomTableWidget().

Member Function Documentation

◆ resizeColumnsEvenly()

void QCustomTableWidget::resizeColumnsEvenly ( QSize widget_size)

Resizes all columns to be evenly distributed across the given widget size.

Parameters
[in]widget_sizeThe total available size for the table.

◆ resizeEvent()

void QCustomTableWidget::resizeEvent ( QResizeEvent * event)
overrideprivate

Handles resize events to optionally resize columns evenly.

Parameters
[in]eventThe resize event.

◆ setColumnColor()

void QCustomTableWidget::setColumnColor ( int column,
const RGBColor & color )

Sets the background color for all cells in a column.

Parameters
[in]columnThe column index.
[in]colorThe color to apply to the column cells.

◆ setColumnHeaderColor()

void QCustomTableWidget::setColumnHeaderColor ( int column,
const RGBColor & color )

Sets the background color for a column header cell.

Parameters
[in]columnThe column index.
[in]colorThe color to apply to the header cell.

The documentation for this class was generated from the following file: