17 using namespace swift::misc::physical_quantities;
18 using namespace swift::misc::network;
19 using namespace swift::misc::aviation;
23 CTextMessageListModel::CTextMessageListModel(
TextMessageMode mode, QObject *parent)
29 (void)QT_TRANSLATE_NOOP(
"ModelTextMessageList",
"time");
30 (void)QT_TRANSLATE_NOOP(
"ModelTextMessageList",
"from");
31 (void)QT_TRANSLATE_NOOP(
"ModelTextMessageList",
"to");
32 (void)QT_TRANSLATE_NOOP(
"ModelTextMessageList",
"message");
37 if (m_textMessageMode == mode)
return;
38 m_textMessageMode = mode;
75 default: qFatal(
"Wrong mode");
break;
81 if (role == Qt::ToolTipRole)
static CColumn standardString(const QString &headerName, const swift::misc::CPropertyIndex &propertyIndex, int alignment=CDefaultFormatter::alignDefault())
Get a standard string object formatted column.
void setSortPropertyIndex(const swift::misc::CPropertyIndex &propertyIndex)
Property index used when sorting, option alternative.
void addColumn(const CColumn &column)
Add a column.
virtual const ObjectType & at(const QModelIndex &index) const
Object at row position.
QVariant data(const QModelIndex &index, int role) const
virtual bool setSortColumnByPropertyIndex(const swift::misc::CPropertyIndex &propertyIndex)
Set column for sorting.
QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const final
CColumns m_columns
columns metadata
Qt::SortOrder m_sortOrder
sort order (asc/desc)
List model for timestamp based objects with offset.
void setTextMessageMode(TextMessageMode mode)
Set mode.
TextMessageMode
What kind of stations.
virtual QVariant data(const QModelIndex &index, int role) const
Value object encapsulating information of a text message.
QString asHtmlSummary(const QString &separator="<br>") const
Summary HTML code.
Models to be used with views, mainly QTableView.