10 #include "gui/models/allmodelcontainers.h"
13 using namespace swift::misc::aviation;
17 template <
typename T,
bool UseCompare>
23 template <
typename T,
bool UseCompare>
27 return ITimestampBased::canHandleIndex(pi);
30 template <
typename T,
bool UseCompare>
36 "timestamp ms",
"milliseconds since epoch", ObjectType::IndexMSecsSinceEpoch,
new CIntegerFormatter()));
45 template <
typename T,
bool UseCompare>
47 const QString &translationContext, QObject *parent)
51 template <
typename T,
bool UseCompare>
56 this->beginInsertRows(QModelIndex(), 0, 0);
58 this->endInsertRows();
61 template <
typename T,
bool UseCompare>
66 "ms adj.",
"milliseconds adjusted", ObjectType::IndexAdjustedMsWithOffset,
new CIntegerFormatter()));
static CColumn standardString(const QString &headerName, const swift::misc::CPropertyIndex &propertyIndex, int alignment=CDefaultFormatter::alignDefault())
Get a standard string object formatted column.
void addColumn(const CColumn &column)
Add a column.
T ContainerType
Container type.
typename T::value_type ObjectType
Container element type.
CColumns m_columns
columns metadata
List model for timestamp based objects with offset.
void addTimestampColumns()
Standard timestamp columns.
bool isSortedByTimestampProperty() const
Sorted by one of the timestamp columns?
T ContainerType
Container type.
void addTimestampOffsetColumns()
Standard timestamp offset columns.
void push_frontKeepLatestAdjustedFirst(const ObjectType &object, int max)
Insert as first element by keeping maxElements and the latest first.
CListModelTimestampWithOffsetObjects(const QString &translationContext, QObject *parent=nullptr)
Constructor.
Models to be used with views, mainly QTableView.
Free functions in swift::misc.