/* Copyright (C) 2013 * swift Project Community / Contributors * * This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level * directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project, * including this file, may be copied, modified, propagated, or distributed except according to the terms * contained in the LICENSE file. */ //! \file #ifndef BLACKMISC_SIMULATION_SIMULATORINTERNALS_H #define BLACKMISC_SIMULATION_SIMULATORINTERNALS_H #include "blackmisc/blackmiscexport.h" #include "blackmisc/containerbase.h" #include "blackmisc/dictionary.h" #include "blackmisc/metaclass.h" #include "blackmisc/namevariantpairlist.h" #include "blackmisc/propertyindex.h" #include "blackmisc/valueobject.h" #include "blackmisc/variant.h" #include #include #include #include namespace BlackMisc { namespace Simulation { //! Simulator internals for flight simulators. //! Those are set up at runtime and represent information about the simulator (like a small registry) class BLACKMISC_EXPORT CSimulatorInternals : public CValueObject { public: //! Specific values enum ColumnIndex { IndexData = CPropertyIndex::GlobalIndexCSimulatorInternals }; //! Default constructor CSimulatorInternals() {} //! All values BlackMisc::CNameVariantPairList getData() const { return this->m_data;} //! Settings void setData(const BlackMisc::CNameVariantPairList &data) { this->m_data = data; } //! Set value void setValue(const QString &name, const QString &value); //! Get value CVariant getVariantValue(const QString &name) const; //! Get string value QString getStringValue(const QString &name) const; //! Get sorted names QStringList getSortedNames() const; //! Get the simulator name QString getSimulatorName() const; //! Set simulator name void setSimulatorName(const QString &name); //! Simulator version info, something like "10.3.2" QString getSimulatorVersion() const; //! Simulator version info, something like "10.3.2" void setSimulatorVersion(const QString &versionInfo); //! Path where simulator is installed QString getSimulatorInstallationDirectory() const; //! Path where simulator is installed void setSimulatorInstallationDirectory(const QString &fullFilePath); //! \copydoc BlackMisc::Mixin::Index::propertyByIndex CVariant propertyByIndex(const CPropertyIndex &index) const; //! \copydoc BlackMisc::Mixin::Index::setPropertyByIndex void setPropertyByIndex(const CPropertyIndex &index, const CVariant &variant); //! Register metadata static void registerMetadata(); //! \copydoc BlackMisc::Mixin::String::toQString() QString convertToQString(bool i18n = false) const; private: BlackMisc::CNameVariantPairList m_data; BLACK_METACLASS( CSimulatorInternals, BLACK_METAMEMBER(data) ); }; } // namespace } // namespace Q_DECLARE_METATYPE(BlackMisc::Simulation::CSimulatorInternals) #endif // guard