mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-12 07:15:34 +08:00
Utility functions to sort text messages by timestamp (ascending/descending)
* compare function for text message * resort function * text message edit can display HTML text messages with ascending/descending timestamp * made CTextMessageListModel -> CListModelTimestampObject
This commit is contained in:
committed by
Mat Sutcliffe
parent
25eb13a83f
commit
e12dc3a73a
@@ -19,11 +19,18 @@ namespace BlackGui
|
||||
{
|
||||
namespace Models
|
||||
{
|
||||
template <typename T, bool UseCompare>
|
||||
template<typename T, bool UseCompare>
|
||||
CListModelTimestampObjects<T, UseCompare>::CListModelTimestampObjects(const QString &translationContext, QObject *parent) :
|
||||
CListModelBase<ContainerType, UseCompare>(translationContext, parent)
|
||||
{ }
|
||||
|
||||
template<typename T, bool UseCompare>
|
||||
bool CListModelTimestampObjects<T, UseCompare>::isSortedByTimestampProperty() const
|
||||
{
|
||||
const CPropertyIndex pi = this->getSortProperty();
|
||||
return ITimestampBased::canHandleIndex(pi);
|
||||
}
|
||||
|
||||
template<typename T, bool UseCompare>
|
||||
void CListModelTimestampObjects<T, UseCompare>::addTimestampColumns()
|
||||
{
|
||||
@@ -32,6 +39,7 @@ namespace BlackGui
|
||||
}
|
||||
|
||||
template class CListModelTimestampObjects<BlackMisc::CStatusMessageList, true>;
|
||||
template class CListModelTimestampObjects<BlackMisc::Network::CTextMessageList, true>;
|
||||
template class CListModelTimestampObjects<BlackMisc::Aviation::CAircraftPartsList, true>;
|
||||
template class CListModelTimestampObjects<BlackMisc::Aviation::CAircraftSituationList, true>;
|
||||
template class CListModelTimestampObjects<BlackMisc::Aviation::CAircraftSituationChangeList, true>;
|
||||
|
||||
Reference in New Issue
Block a user