8#include <QSortFilterProxyModel>
9#include <QAbstractTableModel>
21 int rowCount(
const QModelIndex& parent = QModelIndex())
const override;
22 int columnCount(
const QModelIndex& parent = QModelIndex())
const override;
23 QVariant
data(
const QModelIndex& index,
int role = Qt::DisplayRole)
const override;
26 QVariant
headerData(
int section, Qt::Orientation orientation,
int role = Qt::DisplayRole)
const override;
39 void sort(
int column, Qt::SortOrder order = Qt::DescendingOrder)
override;
46 virtual bool filterAcceptsRow(
int sourceRow,
const QModelIndex& sourceParent)
const override;
47 virtual bool lessThan(
const QModelIndex& left,
const QModelIndex& right)
const override;
The core String class for the NDEVR API.
Definition String.h:69
Definition VehicleDatabase.h:42
Definition VehicleTable.h:31
String m_search_make
Definition VehicleTable.h:51
uint04 m_search_year
Definition VehicleTable.h:53
VehicleDatabase * m_database
Definition VehicleTable.h:50
void setModelSearchString(const String &search_string)
const std::function< void(uint04, PopupInfo)> & selectedCallback() const
Definition VehicleTable.h:42
void searchByParameterChangedSignal()
void setYearSearchString(const uint04 &search_string)
void setSearchStrings(const String &make, const String &model, uint04 year)
std::function< void(uint04, PopupInfo)> m_selected_callback
Definition VehicleTable.h:54
virtual bool lessThan(const QModelIndex &left, const QModelIndex &right) const override
VehicleTableFilterProxyModel(VehicleDatabase *model, QObject *parent=nullptr)
void setMakeSearchString(const String &search_string)
String m_search_model
Definition VehicleTable.h:52
virtual bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override
void sort(int column, Qt::SortOrder order=Qt::DescendingOrder) override
void setSelectedCallback(const std::function< void(uint04, PopupInfo)> &callback)
Definition VehicleTable.h:41
Definition VehicleTable.h:14
VehicleDatabase * m_database
Definition VehicleTable.h:28
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
int rowCount(const QModelIndex &parent=QModelIndex()) const override
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const override
~VehicleTableModel()
Definition VehicleTable.h:19
int columnCount(const QModelIndex &parent=QModelIndex()) const override
VehicleTableModel(VehicleDatabase *m_database, QObject *parent=nullptr)
Definition VehicleTable.h:57
QSize minimumSizeHint() const override
VehicleTableModel * m_model
Definition VehicleTable.h:70
VehicleTableView(VehicleDatabase *database, QWidget *parent=nullptr)
uint04 recordIndexFromSelection(const QModelIndex &selection_index) const
VehicleTableFilterProxyModel * filter() const
Definition VehicleTable.h:60
VehicleTableFilterProxyModel * m_filter
Definition VehicleTable.h:69
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:96
Defines for a given type (such as sint04, fltp08, UUID, etc) a maximum, minimum, and reserved 'invali...
Definition BaseValues.hpp:233