NDEVR
API Documentation
VehicleTableView

A QTableView subclass that displays vehicle database records with sort and filter support. More...

Collaboration diagram for VehicleTableView:
[legend]

Public Member Functions

 VehicleTableView (VehicleDatabase *database, QWidget *parent=nullptr)
 Constructs the table view for the given vehicle database.
VehicleTableFilterProxyModelfilter () const
 Returns the filter proxy model used by this view.
uint04 recordIndexFromSelection (const QModelIndex &selection_index) const
 Converts a proxy model selection index to the underlying database record index.

Protected Attributes

VehicleTableFilterProxyModelm_filter
 The sort/filter proxy model.
VehicleTableModelm_model
 The underlying table model.

Detailed Description

A QTableView subclass that displays vehicle database records with sort and filter support.


Definition at line 85 of file VehicleTable.h.

Constructor & Destructor Documentation

◆ VehicleTableView()

VehicleTableView::VehicleTableView ( VehicleDatabase * database,
QWidget * parent = nullptr )
explicit

Constructs the table view for the given vehicle database.

Parameters
[in]databaseThe vehicle database to display.
[in]parentOptional parent widget.

Member Function Documentation

◆ filter()

VehicleTableFilterProxyModel * VehicleTableView::filter ( ) const
inlinenodiscard

Returns the filter proxy model used by this view.

Returns
Pointer to the filter proxy model.

Definition at line 94 of file VehicleTable.h.

References m_filter.

◆ recordIndexFromSelection()

uint04 VehicleTableView::recordIndexFromSelection ( const QModelIndex & selection_index) const

Converts a proxy model selection index to the underlying database record index.

Parameters
[in]selection_indexThe proxy model index from the selection.
Returns
The original database record index.

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