mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-09 05:28:09 +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:
@@ -21,15 +21,19 @@ namespace BlackGui
|
||||
CTextMessageView::CTextMessageView(QWidget *parent) : CViewBase(parent)
|
||||
{
|
||||
this->standardInit(new CTextMessageListModel(CTextMessageListModel::FromTo, this));
|
||||
this->m_menus |= MenuClear;
|
||||
m_menus |= MenuClear;
|
||||
}
|
||||
|
||||
void CTextMessageView::setTextMessageMode(CTextMessageListModel::TextMessageMode mode)
|
||||
{
|
||||
Q_ASSERT(this->m_model);
|
||||
this->m_model->setTextMessageMode(mode);
|
||||
Q_ASSERT(m_model);
|
||||
m_model->setTextMessageMode(mode);
|
||||
this->setSortIndicator();
|
||||
}
|
||||
|
||||
}
|
||||
bool CTextMessageView::isSortedByTimestampProperty() const
|
||||
{
|
||||
return m_model->isSortedByTimestampProperty();
|
||||
}
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user