Improve the performance and usability of the raw FSD message display

* Replaced QListView with QPlainTextEdit
* Added filter options for packet type and text
* Option to globally disable/enable the feature. Default disabled

Maniphest Tasks: Ref T240
This commit is contained in:
Roland Winklmeier
2018-02-01 11:56:23 +01:00
committed by Klaus Basan
parent 58d128a9da
commit b12002caa2
13 changed files with 434 additions and 80 deletions

View File

@@ -34,6 +34,24 @@ namespace BlackMisc
return s.arg(m_receptionTime.toString("dd.MM.yy HH:mm:ss"), m_rawMessage);
}
bool CRawFsdMessage::isPacketType(const QString &type) const
{
return m_rawMessage.startsWith("FSD Sent=>" + type) || m_rawMessage.startsWith("FSD Recv=>" + type);
}
bool CRawFsdMessage::containsString(const QString &str) const
{
return m_rawMessage.contains(str);
}
const QStringList &CRawFsdMessage::getAllPacketTypes()
{
static const QStringList allPacketTypes = { "@", "%", "#AA", "#DA", "#AP", "#DP", "#TM", "#WX", "#DL", "#TD", "#WD"
"#CD", "#PC", "#SB", "$FP", "$AM", "$PI", "$PO", "$HO", "$HA", "$AX", "$AR",
"$CQ", "$CR", "$ER", "$!!" };
return allPacketTypes;
}
CVariant CRawFsdMessage::propertyByIndex(const BlackMisc::CPropertyIndex &index) const
{
if (index.isMyself()) { return CVariant::from(*this); }