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;
Definition VehicleDatabase.h:42
Definition VehicleTable.h:31
virtual bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override
Definition VehicleTable.cpp:35
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)
Definition VehicleTable.cpp:14
const std::function< void(uint04, PopupInfo)> & selectedCallback() const
Definition VehicleTable.h:42
void searchByParameterChangedSignal()
void setYearSearchString(const uint04 &search_string)
Definition VehicleTable.cpp:20
void setSearchStrings(const String &make, const String &model, uint04 year)
Definition VehicleTable.cpp:25
std::function< void(uint04, PopupInfo)> m_selected_callback
Definition VehicleTable.h:54
VehicleTableFilterProxyModel(VehicleDatabase *model, QObject *parent=nullptr)
Definition VehicleTable.cpp:76
virtual bool lessThan(const QModelIndex &left, const QModelIndex &right) const override
Definition VehicleTable.cpp:39
void setMakeSearchString(const String &search_string)
Definition VehicleTable.cpp:9
String m_search_model
Definition VehicleTable.h:52
void sort(int column, Qt::SortOrder order=Qt::DescendingOrder) override
Definition VehicleTable.cpp:32
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
Definition VehicleTable.cpp:80
int rowCount(const QModelIndex &parent=QModelIndex()) const override
Definition VehicleTable.cpp:48
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const override
Definition VehicleTable.cpp:56
~VehicleTableModel()
Definition VehicleTable.h:19
int columnCount(const QModelIndex &parent=QModelIndex()) const override
Definition VehicleTable.cpp:52
VehicleTableModel(VehicleDatabase *m_database, QObject *parent=nullptr)
Definition VehicleTable.cpp:45
Definition VehicleTable.h:57
QSize minimumSizeHint() const override
Definition VehicleTable.cpp:138
VehicleTableModel * m_model
Definition VehicleTable.h:70
VehicleTableView(VehicleDatabase *database, QWidget *parent=nullptr)
Definition VehicleTable.cpp:101
uint04 recordIndexFromSelection(const QModelIndex &selection_index) const
Definition VehicleTable.cpp:132
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:120
Definition BaseValues.hpp:272