13 using namespace swift::misc::simulation;
17 CDbModelKeyCompleter::CDbModelKeyCompleter(QWidget *parent) : QLineEdit(parent)
19 Q_ASSERT_X(
sGui, Q_FUNC_INFO,
"Need sGui");
23 this->initCompleter();
25 &CDbModelKeyCompleter::onModelsRead);
30 if (m_simulator == simulator) {
return; }
31 m_simulator = simulator;
32 this->initCompleter();
40 void CDbModelKeyCompleter::onModelsRead() { this->initCompleter(); }
42 void CDbModelKeyCompleter::initCompleter()
45 if (models.isEmpty()) {
return; }
46 this->setCompleter(
new QCompleter(models,
this));
bool hasWebDataServices() const
Web data services available?
CWebDataServices * getWebDataServices() const
Get the web data services.
QStringList getModelCompleterStrings(bool sorted=true, const swift::misc::simulation::CSimulatorInfo &simulator={ swift::misc::simulation::CSimulatorInfo::All }) const
Model completer string.
swift::misc::simulation::CAircraftModel getModelForModelString(const QString &modelString) const
Model for model string if any.
void setSimulator(const swift::misc::simulation::CSimulatorInfo &simulator)
Limit models to simulator, or add unspecified.
swift::misc::simulation::CAircraftModel getAircraftModel() const
Aircraft model for current string (searched in DB data)
Aircraft model (used by another pilot, my models on disk)
Simple hardcoded info about the corresponding simulator.
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.