6 #ifndef SWIFT_GUI_MODELS_LISTMODELCALLSIGNOBJECTS_H
7 #define SWIFT_GUI_MODELS_LISTMODELCALLSIGNOBJECTS_H
23 template <
typename T,
bool UseCompare = false>
39 m_highlightCallsigns = callsigns;
56 virtual QVariant
data(
const QModelIndex &
index,
int role)
const override;
70 QColor m_highlightColor = Qt::green;
virtual void clearHighlighting()
Remove all highlighting.
QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const final
QModelIndex parent(const QModelIndex &child) const final
List model for callsign based objects (callsign is unique key)
void setHighlightColor(QColor color)
Set color for highlighting.
T ContainerType
Container type.
virtual ~CListModelCallsignObjects()
Destructor.
virtual QVariant data(const QModelIndex &index, int role) const
Get data for index and role.
bool isHighlightedIndex(const QModelIndex &index) const
Highlight index?
typename T::value_type ObjectType
Container element type.
void setHighlightedCallsigns(const swift::misc::aviation::CCallsignSet &callsigns)
Keys to be highlighted.
swift::misc::aviation::CCallsign callsignForIndex(const QModelIndex &index) const
Callsign for given index.
void clearHighlightedCallsigns()
Clear the highlighted callsign.
virtual void clearHighlighting()
Remove all highlighting.
CListModelCallsignObjects(const QString &translationContext, QObject *parent=nullptr)
Constructor.
void clear()
Removes all elements in the collection.
Value object encapsulating information of a callsign.
Value object for a set of callsigns.
Models to be used with views, mainly QTableView.