7#include <QStringListModel>
9#include "ui_modelmatcherlogcomponent.h"
19using namespace swift::misc::aviation;
21using namespace swift::core::context;
31 &CModelMatcherLogComponent::callsignEntered);
36 bool CModelMatcherLogComponent::hasContexts()
const
38 return sGui && sGui->getIContextSimulator() && sGui->getIContextNetwork();
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())
53 const CCallsign cs(ui->comp_CallsignCompleter->getCallsign());
61 CStatusMessageList allMessages(reverseLookupMessages);
62 allMessages.push_back(matchingMessages);
64 const QString html = allMessages.toHtml();
66 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.
~CModelMatcherLogComponent()
Constructor.
CModelMatcherLogComponent(QWidget *parent=nullptr)
Constructor.
static const QString & htmlStyleSheet()
Default style sheet which can be used with CStatusMessageList::toHtml.
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.
QFrame(QWidget *parent, Qt::WindowFlags f)
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
QObject * parent() const const