7 #include <QStringListModel>
9 #include "ui_modelmatcherlogcomponent.h"
19 using namespace swift::misc::aviation;
21 using namespace swift::core::context;
25 CModelMatcherLogComponent::CModelMatcherLogComponent(QWidget *parent)
29 m_text.setDefaultStyleSheet(CStatusMessageList::htmlStyleSheet());
31 &CModelMatcherLogComponent::callsignEntered);
36 bool CModelMatcherLogComponent::hasContexts()
const
41 bool CModelMatcherLogComponent::enabledMessages()
const
43 return this->hasContexts() &&
44 (ui->comp_EnableLog->isMatchingLogEnabled() || ui->comp_EnableLog->isReverseLookupLogEnabled());
47 void CModelMatcherLogComponent::callsignEntered()
49 if (!this->hasContexts()) {
return; }
50 const CCallsign cs(ui->comp_CallsignCompleter->getCallsign());
51 if (cs.isEmpty()) {
return; }
56 allMessages.push_back(matchingMessages);
58 const QString html = allMessages.toHtml();
60 ui->te_Messages->setDocument(&m_text);
const context::IContextNetwork * getIContextNetwork() const
Direct access to contexts if a CCoreFacade has been initialized.
const context::IContextSimulator * getIContextSimulator() const
Direct access to contexts if a CCoreFacade has been initialized.
virtual swift::misc::CStatusMessageList getReverseLookupMessages(const swift::misc::aviation::CCallsign &callsign) const =0
Get reverse lookup messages.
virtual swift::misc::CStatusMessageList getMatchingMessages(const swift::misc::aviation::CCallsign &callsign) const =0
Get mapping messages.
void validCallsignEnteredDigest()
Changed callsign entered.
Special logs for matching and reverse lookup.
virtual ~CModelMatcherLogComponent()
Constructor.
Status messages, e.g. from Core -> GUI.
Value object encapsulating information of a callsign.
SWIFT_GUI_EXPORT swift::gui::CGuiApplication * sGui
Single instance of GUI application object.
Backend services of the swift project, like dealing with the network or the simulators.
High level reusable GUI components.
Free functions in swift::misc.