11 #include "gui/models/allmodelcontainers.h"
15 using namespace swift::misc::aviation;
19 template <
typename T,
bool UseCompare>
25 template <
typename T,
bool UseCompare>
29 if (isHighlightedIndex(index)) {
return QBrush(m_highlightColor); }
33 template <
typename T,
bool UseCompare>
37 if (!index.isValid()) {
return CCallsign(); }
38 return this->at(index).getCallsign();
41 template <
typename T,
bool UseCompare>
44 if (!index.isValid()) {
return false; }
45 if (m_highlightCallsigns.isEmpty()) {
return false; }
46 return m_highlightCallsigns.contains(callsignForIndex(index));
QVariant data(const QModelIndex &index, int role) const
List model for callsign based objects (callsign is unique key)
T ContainerType
Container type.
virtual QVariant data(const QModelIndex &index, int role) const
Get data for index and role.
bool isHighlightedIndex(const QModelIndex &index) const
Highlight index?
swift::misc::aviation::CCallsign callsignForIndex(const QModelIndex &index) const
Callsign for given index.
Value object encapsulating information of a callsign.
Models to be used with views, mainly QTableView.
Free functions in swift::misc.