diff --git a/src/blackcore/data/globalsetup.h b/src/blackcore/data/globalsetup.h index e91e1a276..e8a0e6ea1 100644 --- a/src/blackcore/data/globalsetup.h +++ b/src/blackcore/data/globalsetup.h @@ -41,7 +41,7 @@ namespace BlackCore //! Properties by index enum ColumnIndex { - IndexDbRootDirectory = BlackMisc::CPropertyIndex::GlobalIndexCGlobalSetup, + IndexDbRootDirectory = BlackMisc::CPropertyIndexRef::GlobalIndexCGlobalSetup, IndexDbHttpPort, IndexDbHttpsPort, IndexDbLoginService, diff --git a/src/blackcore/data/launchersetup.h b/src/blackcore/data/launchersetup.h index 9c650f220..e7fd28344 100644 --- a/src/blackcore/data/launchersetup.h +++ b/src/blackcore/data/launchersetup.h @@ -28,7 +28,7 @@ namespace BlackCore //! Properties by index enum ColumnIndex { - IndexDBusAddress = BlackMisc::CPropertyIndex::GlobalIndexCLauncherSetup, + IndexDBusAddress = BlackMisc::CPropertyIndexRef::GlobalIndexCLauncherSetup, IndexFramelessWindow, IndexCoreMode, IndexAudioMode diff --git a/src/blackcore/data/vatsimsetup.h b/src/blackcore/data/vatsimsetup.h index 76ade5282..d89d9de8d 100644 --- a/src/blackcore/data/vatsimsetup.h +++ b/src/blackcore/data/vatsimsetup.h @@ -38,7 +38,7 @@ namespace BlackCore //! Properties by index enum ColumnIndex { - IndexServerFiles = BlackMisc::CPropertyIndex::GlobalIndexCVatsimSetup, + IndexServerFiles = BlackMisc::CPropertyIndexRef::GlobalIndexCVatsimSetup, IndexDataFiles, IndexMetarFiles, IndexFsdServers, diff --git a/src/blackcore/vatsim/vatsimsettings.h b/src/blackcore/vatsim/vatsimsettings.h index 93c696e55..f8512a325 100644 --- a/src/blackcore/vatsim/vatsimsettings.h +++ b/src/blackcore/vatsim/vatsimsettings.h @@ -33,7 +33,7 @@ namespace BlackCore //! Properties by index enum ColumnIndex { - IndexInitialTime = BlackMisc::CPropertyIndex::GlobalIndexCSettingsReaders, + IndexInitialTime = BlackMisc::CPropertyIndexRef::GlobalIndexCSettingsReaders, IndexPeriodicTime, IndexNeverUpdate }; @@ -151,7 +151,7 @@ namespace BlackCore //! Properties by index enum ColumnIndex { - IndexRawFsdMessagesEnabled = BlackMisc::CPropertyIndex::GlobalIndexRawFsdMessageSettings, + IndexRawFsdMessagesEnabled = BlackMisc::CPropertyIndexRef::GlobalIndexRawFsdMessageSettings, IndexFileDir, IndexFileWriteMode }; diff --git a/src/blackgui/models/columns.cpp b/src/blackgui/models/columns.cpp index 89fdd5a18..1044bc964 100644 --- a/src/blackgui/models/columns.cpp +++ b/src/blackgui/models/columns.cpp @@ -84,7 +84,7 @@ namespace BlackGui CColumn CColumn::emptyColumn() { - CColumn col = CColumn("", "", CPropertyIndex::GlobalIndexEmpty, new CEmptyFormatter()); + CColumn col = CColumn("", "", CPropertyIndexRef::GlobalIndexEmpty, new CEmptyFormatter()); col.setWidthPercentage(1); return col; } @@ -276,7 +276,7 @@ namespace BlackGui { if (m_columns.isEmpty()) { return false; } const CColumn c = m_columns.last(); - return c.getPropertyIndex() == CPropertyIndex::GlobalIndexEmpty; + return c.getPropertyIndex() == CPropertyIndexRef::GlobalIndexEmpty; } const CDefaultFormatter *CColumns::getFormatter(const QModelIndex &index) const diff --git a/src/blackgui/models/columns.h b/src/blackgui/models/columns.h index c7700a2ec..e8e84a1b4 100644 --- a/src/blackgui/models/columns.h +++ b/src/blackgui/models/columns.h @@ -119,7 +119,7 @@ namespace BlackGui static CColumn standardString(const QString &headerName, const QString &toolTip, const BlackMisc::CPropertyIndex &propertyIndex, int alignment = CDefaultFormatter::alignDefault()); //! Get a standard string object formatted column - static CColumn orderColumn(const BlackMisc::CPropertyIndex &propertyIndex = BlackMisc::CPropertyIndex::GlobalIndexIOrderable, int alignment = CDefaultFormatter::alignRightVCenter()); + static CColumn orderColumn(const BlackMisc::CPropertyIndex &propertyIndex = BlackMisc::CPropertyIndexRef::GlobalIndexIOrderable, int alignment = CDefaultFormatter::alignRightVCenter()); //! Get a standard integer value formatted column static CColumn standardInteger(const QString &headerName, const QString &toolTip, const BlackMisc::CPropertyIndex &propertyIndex, int alignment = CDefaultFormatter::alignRightVCenter()); diff --git a/src/blackgui/models/listmodelbase.cpp b/src/blackgui/models/listmodelbase.cpp index 3f1ff1663..3a9781520 100644 --- a/src/blackgui/models/listmodelbase.cpp +++ b/src/blackgui/models/listmodelbase.cpp @@ -107,8 +107,8 @@ namespace BlackGui // special cases switch (propertyIndexFront) { - case CPropertyIndex::GlobalIndexLineNumber: return QVariant::fromValue(row + 1); - case CPropertyIndex::GlobalIndexEmpty: return {}; + case CPropertyIndexRef::GlobalIndexLineNumber: return QVariant::fromValue(row + 1); + case CPropertyIndexRef::GlobalIndexEmpty: return {}; default: break; // continue here } diff --git a/src/blackgui/settings/atcstationssettings.h b/src/blackgui/settings/atcstationssettings.h index 35d84097a..decbea585 100644 --- a/src/blackgui/settings/atcstationssettings.h +++ b/src/blackgui/settings/atcstationssettings.h @@ -26,7 +26,7 @@ namespace BlackGui //! Properties by index enum ColumnIndex { - IndexInRangeOnly = BlackMisc::CPropertyIndex::GlobalIndexCAtcStationsSettings, + IndexInRangeOnly = BlackMisc::CPropertyIndexRef::GlobalIndexCAtcStationsSettings, IndexValidFrequencyOnly }; diff --git a/src/blackgui/settings/dockwidgetsettings.h b/src/blackgui/settings/dockwidgetsettings.h index ee923679d..ff784c680 100644 --- a/src/blackgui/settings/dockwidgetsettings.h +++ b/src/blackgui/settings/dockwidgetsettings.h @@ -33,7 +33,7 @@ namespace BlackGui //! Properties by index enum ColumnIndex { - IndexFloatingMargins = BlackMisc::CPropertyIndex::GlobalIndexCDockWidgetSettings, + IndexFloatingMargins = BlackMisc::CPropertyIndexRef::GlobalIndexCDockWidgetSettings, IndexFloatingFramelessMargins, IndexDockedMargins, IndexFrameless, diff --git a/src/blackgui/settings/guisettings.h b/src/blackgui/settings/guisettings.h index 90a161e13..d8e0189dc 100644 --- a/src/blackgui/settings/guisettings.h +++ b/src/blackgui/settings/guisettings.h @@ -30,7 +30,7 @@ namespace BlackGui //! Properties by index enum ColumnIndex { - IndexWidgetStyle = BlackMisc::CPropertyIndex::GlobalIndexCGeneralGuiSettings, + IndexWidgetStyle = BlackMisc::CPropertyIndexRef::GlobalIndexCGeneralGuiSettings, IndexPreferredSelection }; diff --git a/src/blackgui/settings/navigatorsettings.h b/src/blackgui/settings/navigatorsettings.h index a45b6de7a..e85a51ea3 100644 --- a/src/blackgui/settings/navigatorsettings.h +++ b/src/blackgui/settings/navigatorsettings.h @@ -32,7 +32,7 @@ namespace BlackGui //! Properties by index enum ColumnIndex { - IndexMargins = BlackMisc::CPropertyIndex::GlobalIndexCNavigatorSettings, + IndexMargins = BlackMisc::CPropertyIndexRef::GlobalIndexCNavigatorSettings, IndexFrameless, IndexColumns }; diff --git a/src/blackgui/settings/textmessagesettings.h b/src/blackgui/settings/textmessagesettings.h index 412eb00f2..80a11cba6 100644 --- a/src/blackgui/settings/textmessagesettings.h +++ b/src/blackgui/settings/textmessagesettings.h @@ -32,7 +32,7 @@ namespace BlackGui //! Properties by index enum ColumnIndex { - IndexPopupPrivateMessages = BlackMisc::CPropertyIndex::GlobalIndexCTextMessageSettings, + IndexPopupPrivateMessages = BlackMisc::CPropertyIndexRef::GlobalIndexCTextMessageSettings, IndexPopupSupervisorMessages, IndexPopupFrequencyMessages, IndexPopupAllMessages, diff --git a/src/blackgui/settings/viewupdatesettings.h b/src/blackgui/settings/viewupdatesettings.h index 00598a0c1..48753413e 100644 --- a/src/blackgui/settings/viewupdatesettings.h +++ b/src/blackgui/settings/viewupdatesettings.h @@ -33,7 +33,7 @@ namespace BlackGui //! Properties by index enum ColumnIndex { - IndexAtc = BlackMisc::CPropertyIndex::GlobalIndexCViewUpdateSettings, + IndexAtc = BlackMisc::CPropertyIndexRef::GlobalIndexCViewUpdateSettings, IndexAircraft, IndexRendering, IndexUser diff --git a/src/blackmisc/applicationinfo.h b/src/blackmisc/applicationinfo.h index 6dc1e89c5..61ad408af 100644 --- a/src/blackmisc/applicationinfo.h +++ b/src/blackmisc/applicationinfo.h @@ -42,7 +42,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexApplication = CPropertyIndex::GlobalIndexCApplicationInfo, + IndexApplication = CPropertyIndexRef::GlobalIndexCApplicationInfo, IndexApplicationAsString, IndexApplicationDataPath, IndexCompileInfo, diff --git a/src/blackmisc/audio/audiodeviceinfo.h b/src/blackmisc/audio/audiodeviceinfo.h index d75fea80f..bfa902900 100644 --- a/src/blackmisc/audio/audiodeviceinfo.h +++ b/src/blackmisc/audio/audiodeviceinfo.h @@ -35,7 +35,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexName = CPropertyIndex::GlobalIndexCAudioDeviceInfo, + IndexName = CPropertyIndexRef::GlobalIndexCAudioDeviceInfo, IndexDeviceType, IndexDeviceTypeAsString, IndexIdentifier diff --git a/src/blackmisc/audio/voicesetup.h b/src/blackmisc/audio/voicesetup.h index 63c5e8b7b..76e9c87eb 100644 --- a/src/blackmisc/audio/voicesetup.h +++ b/src/blackmisc/audio/voicesetup.h @@ -33,7 +33,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexAfvVoiceServerUrl = CPropertyIndex::GlobalIndexCVoiceSetup, + IndexAfvVoiceServerUrl = CPropertyIndexRef::GlobalIndexCVoiceSetup, IndexAfvMapUrl }; diff --git a/src/blackmisc/aviation/aircraftcategory.h b/src/blackmisc/aviation/aircraftcategory.h index 0ad18d614..6e4812708 100644 --- a/src/blackmisc/aviation/aircraftcategory.h +++ b/src/blackmisc/aviation/aircraftcategory.h @@ -38,7 +38,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexName = CPropertyIndex::GlobalIndexCAircraftCategory, + IndexName = CPropertyIndexRef::GlobalIndexCAircraftCategory, IndexDescription, IndexLevelString, IndexLevelStringAndName, diff --git a/src/blackmisc/aviation/aircrafticaocode.h b/src/blackmisc/aviation/aircrafticaocode.h index 916b34e71..094ae431e 100644 --- a/src/blackmisc/aviation/aircrafticaocode.h +++ b/src/blackmisc/aviation/aircrafticaocode.h @@ -39,7 +39,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexAircraftDesignator = CPropertyIndex::GlobalIndexCAircraftIcaoCode, + IndexAircraftDesignator = CPropertyIndexRef::GlobalIndexCAircraftIcaoCode, IndexIataCode, IndexFamily, IndexCombinedAircraftType, diff --git a/src/blackmisc/aviation/aircraftlights.h b/src/blackmisc/aviation/aircraftlights.h index c706ab282..591f3e564 100644 --- a/src/blackmisc/aviation/aircraftlights.h +++ b/src/blackmisc/aviation/aircraftlights.h @@ -33,8 +33,8 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexIsNull = CPropertyIndex::GlobalIndexINullable, - IndexStrobe = CPropertyIndex::GlobalIndexCAircraftLights, + IndexIsNull = CPropertyIndexRef::GlobalIndexINullable, + IndexStrobe = CPropertyIndexRef::GlobalIndexCAircraftLights, IndexLanding, IndexTaxi, IndexBeacon, diff --git a/src/blackmisc/aviation/aircraftparts.h b/src/blackmisc/aviation/aircraftparts.h index bafd3ad3b..2ce99216f 100644 --- a/src/blackmisc/aviation/aircraftparts.h +++ b/src/blackmisc/aviation/aircraftparts.h @@ -40,7 +40,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexLights = CPropertyIndex::GlobalIndexCAircraftParts, + IndexLights = CPropertyIndexRef::GlobalIndexCAircraftParts, IndexGearDown, IndexFlapsPercentage, IndexSpoilersOut, diff --git a/src/blackmisc/aviation/aircraftsituation.h b/src/blackmisc/aviation/aircraftsituation.h index 5bb8de58f..5c58baa49 100644 --- a/src/blackmisc/aviation/aircraftsituation.h +++ b/src/blackmisc/aviation/aircraftsituation.h @@ -54,7 +54,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexPosition = CPropertyIndex::GlobalIndexCAircraftSituation, + IndexPosition = CPropertyIndexRef::GlobalIndexCAircraftSituation, IndexLatitude, IndexLongitude, IndexAltitude, diff --git a/src/blackmisc/aviation/aircraftsituationchange.h b/src/blackmisc/aviation/aircraftsituationchange.h index f0a8c10a6..9c2695ea5 100644 --- a/src/blackmisc/aviation/aircraftsituationchange.h +++ b/src/blackmisc/aviation/aircraftsituationchange.h @@ -38,7 +38,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexCallsign = CPropertyIndex::GlobalIndexCAircraftSituationChange, + IndexCallsign = CPropertyIndexRef::GlobalIndexCAircraftSituationChange, IndexIsNull, IndexSituationsCount, IndexConstAscending, diff --git a/src/blackmisc/aviation/airlineicaocode.h b/src/blackmisc/aviation/airlineicaocode.h index 30aa8fcf6..4654b26df 100644 --- a/src/blackmisc/aviation/airlineicaocode.h +++ b/src/blackmisc/aviation/airlineicaocode.h @@ -41,7 +41,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexAirlineDesignator = CPropertyIndex::GlobalIndexCAirlineIcaoCode, + IndexAirlineDesignator = CPropertyIndexRef::GlobalIndexCAirlineIcaoCode, IndexIataCode, IndexAirlineName, IndexAirlineCountryIso, diff --git a/src/blackmisc/aviation/airport.h b/src/blackmisc/aviation/airport.h index 8c5891332..ec32106ed 100644 --- a/src/blackmisc/aviation/airport.h +++ b/src/blackmisc/aviation/airport.h @@ -43,7 +43,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexIcao = BlackMisc::CPropertyIndex::GlobalIndexCAirport, + IndexIcao = BlackMisc::CPropertyIndexRef::GlobalIndexCAirport, IndexLocation, IndexDescriptiveName, IndexPosition, diff --git a/src/blackmisc/aviation/atcstation.h b/src/blackmisc/aviation/atcstation.h index a5f1d3106..0db410e91 100644 --- a/src/blackmisc/aviation/atcstation.h +++ b/src/blackmisc/aviation/atcstation.h @@ -45,7 +45,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexCallsign = CPropertyIndex::GlobalIndexCAtcStation, + IndexCallsign = CPropertyIndexRef::GlobalIndexCAtcStation, IndexCallsignString, IndexCallsignStringCrossCopuled, IndexController, diff --git a/src/blackmisc/aviation/callsign.h b/src/blackmisc/aviation/callsign.h index 2368ef358..69b26ce0c 100644 --- a/src/blackmisc/aviation/callsign.h +++ b/src/blackmisc/aviation/callsign.h @@ -33,7 +33,7 @@ namespace BlackMisc //! Indexes enum ColumnIndex { - IndexCallsignString = CPropertyIndex::GlobalIndexCCallsign, + IndexCallsignString = CPropertyIndexRef::GlobalIndexCCallsign, IndexCallsignStringAsSet, IndexTelephonyDesignator, IndexSuffix, diff --git a/src/blackmisc/aviation/flightplan.h b/src/blackmisc/aviation/flightplan.h index 283a4bfd7..1b55945a3 100644 --- a/src/blackmisc/aviation/flightplan.h +++ b/src/blackmisc/aviation/flightplan.h @@ -171,7 +171,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexCallsign = CPropertyIndex::GlobalIndexCFlightPlan, + IndexCallsign = CPropertyIndexRef::GlobalIndexCFlightPlan, IndexOriginAirportIcao, IndexDestinationAirportIcao, IndexAlternateAirportIcao, diff --git a/src/blackmisc/aviation/informationmessage.h b/src/blackmisc/aviation/informationmessage.h index 0d93c7385..f95d56870 100644 --- a/src/blackmisc/aviation/informationmessage.h +++ b/src/blackmisc/aviation/informationmessage.h @@ -44,7 +44,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexType = CPropertyIndex::GlobalIndexCInformationMessage, + IndexType = CPropertyIndexRef::GlobalIndexCInformationMessage, IndexMessage, }; diff --git a/src/blackmisc/aviation/livery.h b/src/blackmisc/aviation/livery.h index 4559c3853..a78eef14f 100644 --- a/src/blackmisc/aviation/livery.h +++ b/src/blackmisc/aviation/livery.h @@ -39,7 +39,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexDescription = CPropertyIndex::GlobalIndexCLivery, + IndexDescription = CPropertyIndexRef::GlobalIndexCLivery, IndexAirlineIcaoCode, IndexCombinedCode, IndexColorFuselage, diff --git a/src/blackmisc/aviation/modulator.h b/src/blackmisc/aviation/modulator.h index da32bf226..f81a5723f 100644 --- a/src/blackmisc/aviation/modulator.h +++ b/src/blackmisc/aviation/modulator.h @@ -25,7 +25,7 @@ namespace BlackMisc //! Column indexes enum ColumnIndex { - IndexActiveFrequency = CPropertyIndex::GlobalIndexCModulator, + IndexActiveFrequency = CPropertyIndexRef::GlobalIndexCModulator, IndexStandbyFrequency, IndexReceiveVolume, IndexTransmitVolume, diff --git a/src/blackmisc/aviation/simbriefdata.h b/src/blackmisc/aviation/simbriefdata.h index 5e7ad4f2d..2d854653e 100644 --- a/src/blackmisc/aviation/simbriefdata.h +++ b/src/blackmisc/aviation/simbriefdata.h @@ -40,7 +40,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexUsername = CPropertyIndex::GlobalIndexCSimBriefData, + IndexUsername = CPropertyIndexRef::GlobalIndexCSimBriefData, IndexUrl }; diff --git a/src/blackmisc/aviation/transponder.h b/src/blackmisc/aviation/transponder.h index a2f1a48d9..cd57753b0 100644 --- a/src/blackmisc/aviation/transponder.h +++ b/src/blackmisc/aviation/transponder.h @@ -46,7 +46,7 @@ namespace BlackMisc //! Indexes enum ColumnIndex { - IndexMode = CPropertyIndex::GlobalIndexCTransponder, + IndexMode = CPropertyIndexRef::GlobalIndexCTransponder, IndexModeAsString, IndexTransponderCode, IndexTransponderCodeFormatted, diff --git a/src/blackmisc/country.h b/src/blackmisc/country.h index 78978844d..6dd21edb4 100644 --- a/src/blackmisc/country.h +++ b/src/blackmisc/country.h @@ -35,7 +35,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexIsoCode = CPropertyIndex::GlobalIndexCCountry, + IndexIsoCode = CPropertyIndexRef::GlobalIndexCCountry, IndexIso3Code, IndexName, IndexAlias1, diff --git a/src/blackmisc/crashinfo.h b/src/blackmisc/crashinfo.h index 89b363d42..514af3b0c 100644 --- a/src/blackmisc/crashinfo.h +++ b/src/blackmisc/crashinfo.h @@ -25,7 +25,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexUserName = CPropertyIndex::GlobalIndexCCrashInfo, + IndexUserName = CPropertyIndexRef::GlobalIndexCCrashInfo, IndexInfo, IndexSimulatorString, IndexFlightNetworkInfo diff --git a/src/blackmisc/crashsettings.h b/src/blackmisc/crashsettings.h index 229aa8bf9..275be6cca 100644 --- a/src/blackmisc/crashsettings.h +++ b/src/blackmisc/crashsettings.h @@ -26,7 +26,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexEnabled = CPropertyIndex::GlobalIndexCCrashSettings, + IndexEnabled = CPropertyIndexRef::GlobalIndexCCrashSettings, IndexPrivateInfo }; diff --git a/src/blackmisc/db/artifact.h b/src/blackmisc/db/artifact.h index 9b502da04..cbc800488 100644 --- a/src/blackmisc/db/artifact.h +++ b/src/blackmisc/db/artifact.h @@ -31,7 +31,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexName = CPropertyIndex::GlobalIndexCArtifact, + IndexName = CPropertyIndexRef::GlobalIndexCArtifact, IndexMd5, IndexType, IndexPlatform, diff --git a/src/blackmisc/db/datastore.h b/src/blackmisc/db/datastore.h index 4f81b13de..962ce5693 100644 --- a/src/blackmisc/db/datastore.h +++ b/src/blackmisc/db/datastore.h @@ -47,7 +47,7 @@ namespace BlackMisc { // since we use different keys all the compares, set, get are in the derived class // in general we can say, it was a bad decision to use different key types - // IndexDbIntegerKey = CPropertyIndex::GlobalIndexIDatastore for future usage + // IndexDbIntegerKey = CPropertyIndexRef::GlobalIndexIDatastore for future usage public: //! Version info @@ -78,7 +78,7 @@ namespace BlackMisc //! Property index enum ColumnIndex { - IndexDbIntegerKey = CPropertyIndex::GlobalIndexIDatastoreInteger, + IndexDbIntegerKey = CPropertyIndexRef::GlobalIndexIDatastoreInteger, IndexDbKeyAsString, IndexIsLoadedFromDb, IndexDatabaseIcon, @@ -166,7 +166,7 @@ namespace BlackMisc //! Property index enum ColumnIndex { - IndexDbStringKey = CPropertyIndex::GlobalIndexIDatastoreString, + IndexDbStringKey = CPropertyIndexRef::GlobalIndexIDatastoreString, IndexDbKeyAsString, IndexIsLoadedFromDb, IndexDatabaseIcon, diff --git a/src/blackmisc/db/dbinfo.h b/src/blackmisc/db/dbinfo.h index 7d3e7e877..1d6629f1a 100644 --- a/src/blackmisc/db/dbinfo.h +++ b/src/blackmisc/db/dbinfo.h @@ -31,7 +31,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexTableName = CPropertyIndex::GlobalIndexCDbInfo, + IndexTableName = CPropertyIndexRef::GlobalIndexCDbInfo, IndexEntries, IndexEntity }; diff --git a/src/blackmisc/db/distribution.h b/src/blackmisc/db/distribution.h index 337dbc200..4cb1ac63b 100644 --- a/src/blackmisc/db/distribution.h +++ b/src/blackmisc/db/distribution.h @@ -37,7 +37,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexChannel = CPropertyIndex::GlobalIndexCDistribution, + IndexChannel = CPropertyIndexRef::GlobalIndexCDistribution, IndexStability, IndexRestricted, IndexDownloadUrls diff --git a/src/blackmisc/db/updateinfo.h b/src/blackmisc/db/updateinfo.h index 796df5b6c..b935a21d7 100644 --- a/src/blackmisc/db/updateinfo.h +++ b/src/blackmisc/db/updateinfo.h @@ -30,7 +30,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexArtifactsPilotClient = CPropertyIndex::GlobalIndexCUpdateInfo, + IndexArtifactsPilotClient = CPropertyIndexRef::GlobalIndexCUpdateInfo, IndexArtifactsXSwiftBus, IndexDistributions }; diff --git a/src/blackmisc/directories.h b/src/blackmisc/directories.h index 2272e4e42..8d5f759cf 100644 --- a/src/blackmisc/directories.h +++ b/src/blackmisc/directories.h @@ -30,7 +30,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexDirFlightPlan = CPropertyIndex::GlobalIndexCDirectories, + IndexDirFlightPlan = CPropertyIndexRef::GlobalIndexCDirectories, IndexDirFlightPlanOrDefault, IndexDirLastViewJson, IndexDirLastViewJsonOrDefault, diff --git a/src/blackmisc/geo/coordinategeodetic.h b/src/blackmisc/geo/coordinategeodetic.h index ee2408a5c..4e792a93a 100644 --- a/src/blackmisc/geo/coordinategeodetic.h +++ b/src/blackmisc/geo/coordinategeodetic.h @@ -47,7 +47,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexLatitude = CPropertyIndex::GlobalIndexICoordinateGeodetic, + IndexLatitude = CPropertyIndexRef::GlobalIndexICoordinateGeodetic, IndexLongitude, IndexLatitudeAsString, IndexLongitudeAsString, @@ -171,7 +171,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexRelativeDistance = CPropertyIndex::GlobalIndexICoordinateWithRelativePosition, + IndexRelativeDistance = CPropertyIndexRef::GlobalIndexICoordinateWithRelativePosition, IndexRelativeBearing }; diff --git a/src/blackmisc/geo/elevationplane.h b/src/blackmisc/geo/elevationplane.h index 99896761b..698da07c2 100644 --- a/src/blackmisc/geo/elevationplane.h +++ b/src/blackmisc/geo/elevationplane.h @@ -36,7 +36,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexRadius = CPropertyIndex::GlobalIndexCElevationPlane + IndexRadius = CPropertyIndexRef::GlobalIndexCElevationPlane }; //! Default constructor diff --git a/src/blackmisc/identifier.h b/src/blackmisc/identifier.h index ec1f78601..24947182e 100644 --- a/src/blackmisc/identifier.h +++ b/src/blackmisc/identifier.h @@ -33,7 +33,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexName = CPropertyIndex::GlobalIndexCIdentifier, + IndexName = CPropertyIndexRef::GlobalIndexCIdentifier, IndexMachineId, IndexMachineIdBase64, IndexMachineName, diff --git a/src/blackmisc/input/actionhotkey.h b/src/blackmisc/input/actionhotkey.h index 6d0072650..5e33144b3 100644 --- a/src/blackmisc/input/actionhotkey.h +++ b/src/blackmisc/input/actionhotkey.h @@ -33,7 +33,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexIdentifier = CPropertyIndex::GlobalIndexCSettingKeyboardHotkey, + IndexIdentifier = CPropertyIndexRef::GlobalIndexCSettingKeyboardHotkey, IndexIdentifierAsString, IndexCombination, IndexCombinationAsString, diff --git a/src/blackmisc/input/joystickbutton.h b/src/blackmisc/input/joystickbutton.h index 297e8f255..f5e38101f 100644 --- a/src/blackmisc/input/joystickbutton.h +++ b/src/blackmisc/input/joystickbutton.h @@ -32,7 +32,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexDeviceName = CPropertyIndex::GlobalIndexCJoystickButton, + IndexDeviceName = CPropertyIndexRef::GlobalIndexCJoystickButton, IndexButton, IndexButtonAsString, IndexButtonObject, // just for updates diff --git a/src/blackmisc/input/keyboardkey.h b/src/blackmisc/input/keyboardkey.h index 0478f730c..a024f444c 100644 --- a/src/blackmisc/input/keyboardkey.h +++ b/src/blackmisc/input/keyboardkey.h @@ -33,7 +33,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexKey = CPropertyIndex::GlobalIndexCKeyboardKey, + IndexKey = CPropertyIndexRef::GlobalIndexCKeyboardKey, IndexKeyAsString, IndexKeyObject, // just for updates }; diff --git a/src/blackmisc/namevariantpair.h b/src/blackmisc/namevariantpair.h index 822f78633..57017b02d 100644 --- a/src/blackmisc/namevariantpair.h +++ b/src/blackmisc/namevariantpair.h @@ -29,7 +29,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexName = BlackMisc::CPropertyIndex::GlobalIndexCNameVariantPair, + IndexName = BlackMisc::CPropertyIndexRef::GlobalIndexCNameVariantPair, IndexVariant }; diff --git a/src/blackmisc/network/authenticateduser.h b/src/blackmisc/network/authenticateduser.h index b8e4e6736..93e697d42 100644 --- a/src/blackmisc/network/authenticateduser.h +++ b/src/blackmisc/network/authenticateduser.h @@ -41,7 +41,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexEmail = BlackMisc::CPropertyIndex::GlobalIndexCAuthenticatedUser, + IndexEmail = BlackMisc::CPropertyIndexRef::GlobalIndexCAuthenticatedUser, IndexVatsimId, IndexPassword, IndexRealName, diff --git a/src/blackmisc/network/client.h b/src/blackmisc/network/client.h index b91a55c4c..4dd7dd0bd 100644 --- a/src/blackmisc/network/client.h +++ b/src/blackmisc/network/client.h @@ -34,7 +34,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexCapabilities = CPropertyIndex::GlobalIndexCClient, + IndexCapabilities = CPropertyIndexRef::GlobalIndexCClient, IndexCapabilitiesString, IndexModelString, IndexServer, diff --git a/src/blackmisc/network/ecosystem.h b/src/blackmisc/network/ecosystem.h index 85f7c7594..48acc30fb 100644 --- a/src/blackmisc/network/ecosystem.h +++ b/src/blackmisc/network/ecosystem.h @@ -29,7 +29,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexSystem = CPropertyIndex::GlobalIndexCEcosystem, + IndexSystem = CPropertyIndexRef::GlobalIndexCEcosystem, IndexSystemString }; diff --git a/src/blackmisc/network/fsdsetup.h b/src/blackmisc/network/fsdsetup.h index 4727414d5..d0bcdfb02 100644 --- a/src/blackmisc/network/fsdsetup.h +++ b/src/blackmisc/network/fsdsetup.h @@ -31,7 +31,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexTextCodec = CPropertyIndex::GlobalIndexCFsdSetup, + IndexTextCodec = CPropertyIndexRef::GlobalIndexCFsdSetup, IndexSendReceiveDetails }; diff --git a/src/blackmisc/network/rawfsdmessage.h b/src/blackmisc/network/rawfsdmessage.h index fb3da90c9..98bc80961 100644 --- a/src/blackmisc/network/rawfsdmessage.h +++ b/src/blackmisc/network/rawfsdmessage.h @@ -35,7 +35,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexRawMessage = CPropertyIndex::GlobalIndexCRawFsdMessage, + IndexRawMessage = CPropertyIndexRef::GlobalIndexCRawFsdMessage, }; //! Default constructor. diff --git a/src/blackmisc/network/remotefile.h b/src/blackmisc/network/remotefile.h index a43a009bd..acafc890e 100644 --- a/src/blackmisc/network/remotefile.h +++ b/src/blackmisc/network/remotefile.h @@ -38,7 +38,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexName = CPropertyIndex::GlobalIndexCRemoteFile, + IndexName = CPropertyIndexRef::GlobalIndexCRemoteFile, IndexDescription, IndexUrl, IndexSize diff --git a/src/blackmisc/network/role.h b/src/blackmisc/network/role.h index 54d07af14..0c78a554f 100644 --- a/src/blackmisc/network/role.h +++ b/src/blackmisc/network/role.h @@ -37,7 +37,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexName = CPropertyIndex::GlobalIndexCRole, + IndexName = CPropertyIndexRef::GlobalIndexCRole, IndexDescription }; diff --git a/src/blackmisc/network/server.h b/src/blackmisc/network/server.h index a178ccc5b..70fb288a1 100644 --- a/src/blackmisc/network/server.h +++ b/src/blackmisc/network/server.h @@ -41,7 +41,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexName = CPropertyIndex::GlobalIndexCServer, + IndexName = CPropertyIndexRef::GlobalIndexCServer, IndexDescription, IndexAddress, IndexPort, diff --git a/src/blackmisc/network/settings/networksettings.h b/src/blackmisc/network/settings/networksettings.h index 94d4d18e4..f8cbf8771 100644 --- a/src/blackmisc/network/settings/networksettings.h +++ b/src/blackmisc/network/settings/networksettings.h @@ -35,7 +35,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexDynamicOffsetTime = CPropertyIndex::GlobalIndexCNetworkSettings, + IndexDynamicOffsetTime = CPropertyIndexRef::GlobalIndexCNetworkSettings, }; //! Constructor diff --git a/src/blackmisc/network/textmessage.h b/src/blackmisc/network/textmessage.h index 0ba91f7f6..8f57ffc3b 100644 --- a/src/blackmisc/network/textmessage.h +++ b/src/blackmisc/network/textmessage.h @@ -41,7 +41,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexSenderCallsign = CPropertyIndex::GlobalIndexCTextMessage, + IndexSenderCallsign = CPropertyIndexRef::GlobalIndexCTextMessage, IndexRecipientCallsign, IndexRecipientCallsignOrFrequency, IndexMessage diff --git a/src/blackmisc/network/url.h b/src/blackmisc/network/url.h index 34c04eb39..990c7e874 100644 --- a/src/blackmisc/network/url.h +++ b/src/blackmisc/network/url.h @@ -35,7 +35,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexScheme = CPropertyIndex::GlobalIndexCUrl, + IndexScheme = CPropertyIndexRef::GlobalIndexCUrl, IndexHost, IndexPort, IndexPath, diff --git a/src/blackmisc/network/urllog.h b/src/blackmisc/network/urllog.h index f065f0dca..285a02901 100644 --- a/src/blackmisc/network/urllog.h +++ b/src/blackmisc/network/urllog.h @@ -33,7 +33,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexId = CPropertyIndex::GlobalIndexCUrlLog, + IndexId = CPropertyIndexRef::GlobalIndexCUrlLog, IndexSuccess, IndexUrl, IndexResponseTimestamp, diff --git a/src/blackmisc/network/user.h b/src/blackmisc/network/user.h index 036156f85..475b70f07 100644 --- a/src/blackmisc/network/user.h +++ b/src/blackmisc/network/user.h @@ -41,7 +41,7 @@ namespace BlackMisc */ enum ColumnIndex { - IndexEmail = CPropertyIndex::GlobalIndexCUser, + IndexEmail = CPropertyIndexRef::GlobalIndexCUser, IndexId, IndexIdInteger, IndexId7Digit, diff --git a/src/blackmisc/orderable.h b/src/blackmisc/orderable.h index b0371b336..7b46d51f0 100644 --- a/src/blackmisc/orderable.h +++ b/src/blackmisc/orderable.h @@ -26,7 +26,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexOrder = CPropertyIndex::GlobalIndexIOrderable, + IndexOrder = CPropertyIndexRef::GlobalIndexIOrderable, IndexOrderString }; diff --git a/src/blackmisc/platform.h b/src/blackmisc/platform.h index 8a200c7fc..8760d8858 100644 --- a/src/blackmisc/platform.h +++ b/src/blackmisc/platform.h @@ -31,7 +31,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexPlatform = CPropertyIndex::GlobalIndexCPlatform + IndexPlatform = CPropertyIndexRef::GlobalIndexCPlatform }; //! OS diff --git a/src/blackmisc/pq/physicalquantity.h b/src/blackmisc/pq/physicalquantity.h index 93a1980bf..321284036 100644 --- a/src/blackmisc/pq/physicalquantity.h +++ b/src/blackmisc/pq/physicalquantity.h @@ -62,7 +62,7 @@ namespace BlackMisc //! Index enum ColumnIndex { - IndexUnit = CPropertyIndex::GlobalIndexCPhysicalQuantity, + IndexUnit = CPropertyIndexRef::GlobalIndexCPhysicalQuantity, IndexValue, IndexValueRounded0DigitsWithUnit, IndexValueRounded1DigitsWithUnit, diff --git a/src/blackmisc/propertyindex.cpp b/src/blackmisc/propertyindex.cpp index be640ef2c..b2afdb2f8 100644 --- a/src/blackmisc/propertyindex.cpp +++ b/src/blackmisc/propertyindex.cpp @@ -15,7 +15,7 @@ namespace BlackMisc { CPropertyIndex::CPropertyIndex(int singleProperty) : m_indexes { singleProperty } { - Q_ASSERT(singleProperty >= static_cast(GlobalIndexCValueObject)); + Q_ASSERT(singleProperty >= static_cast(CPropertyIndexRef::GlobalIndexCValueObject)); } CPropertyIndex::CPropertyIndex(std::initializer_list il) : m_indexes(il) @@ -67,7 +67,7 @@ namespace BlackMisc QString s; for (const int i : m_indexes) { - Q_ASSERT(i >= static_cast(GlobalIndexCValueObject)); + Q_ASSERT(i >= static_cast(CPropertyIndexRef::GlobalIndexCValueObject)); if (!s.isEmpty()) { s.append(";"); } s.append(QString::number(i)); } @@ -84,7 +84,7 @@ namespace BlackMisc bool ok; int i = index.toInt(&ok); Q_ASSERT(ok); - Q_ASSERT(i >= static_cast(GlobalIndexCValueObject)); + Q_ASSERT(i >= static_cast(CPropertyIndexRef::GlobalIndexCValueObject)); m_indexes.append(i); } } diff --git a/src/blackmisc/propertyindex.h b/src/blackmisc/propertyindex.h index 745f81b90..153f59801 100644 --- a/src/blackmisc/propertyindex.h +++ b/src/blackmisc/propertyindex.h @@ -75,113 +75,6 @@ namespace BlackMisc // CIndexVariantMap is used in CValueObject, CPropertyIndex in CIndexVariantMap public: - //! Global index, make sure the indexes are unqiue (for using them in class hierarchy) - enum GlobalIndex - { - GlobalIndexCValueObject = 10, - GlobalIndexCPhysicalQuantity = 100, - GlobalIndexCStatusMessage = 200, - GlobalIndexCNameVariantPair = 300, - GlobalIndexITimestampBased = 400, - GlobalIndexIOrderable = 500, - GlobalIndexINullable = 600, - GlobalIndexCIdentifier = 700, - GlobalIndexCRgbColor = 800, - GlobalIndexCCountry = 900, - GlobalIndexCPlatform = 1000, - GlobalIndexCApplicationInfo = 1100, - GlobalIndexCDirectories = 1200, - GlobalIndexCCrashInfo = 1300, - GlobalIndexCCrashSettings = 1400, - GlobalIndexCCallsign = 2000, - GlobalIndexCAircraftSituation = 2100, - GlobalIndexCAircraftSituationChange = 2200, - GlobalIndexCAtcStation = 2300, - GlobalIndexCInformationMessage = 2400, - GlobalIndexCAirport = 2500, - GlobalIndexCAircraftParts = 2600, - GlobalIndexCAircraftLights = 2700, - GlobalIndexCLivery = 2800, - GlobalIndexCFlightPlan = 2900, - GlobalIndexCSimBriefData = 3000, - GlobalIndexCComSystem = 3100, - GlobalIndexCModulator = 3200, - GlobalIndexCTransponder = 3300, - GlobalIndexCAircraftCategory = 3500, - GlobalIndexCAircraftIcaoCode = 3600, - GlobalIndexCAirlineIcaoCode = 3700, - GlobalIndexCAirportIcaoCode = 3800, - GlobalIndexCMetar = 4000, - GlobalIndexCCloudLayer = 4100, - GlobalIndexCPresentWeather = 4200, - GlobalIndexCWindLayer = 4300, - GlobalIndexCTemperatureLayer = 4400, - GlobalIndexCGridPoint = 4500, - GlobalIndexCVisibilityLayer = 4600, - GlobalIndexCWeatherScenario = 4700, - GlobalIndexICoordinateGeodetic = 5000, - GlobalIndexICoordinateWithRelativePosition = 5100, - GlobalIndexCCoordinateGeodetic = 5200, - GlobalIndexCElevationPlane = 5300, - GlobalIndexCClient = 6000, - GlobalIndexCUser = 6100, - GlobalIndexCAuthenticatedUser = 6200, - GlobalIndexCRole = 6300, - GlobalIndexCServer = 6400, - GlobalIndexCFsdSetup = 6500, - GlobalIndexCVoiceSetup = 6600, - GlobalIndexCNetworkSettings = 6700, - GlobalIndexCUrl = 6800, - GlobalIndexCUrlLog = 6900, - GlobalIndexCRemoteFile = 7000, - GlobalIndexCEcosystem = 7100, - GlobalIndexCRawFsdMessage = 7200, - GlobalIndexCAircraftModel = 8000, - GlobalIndexCSimulatedAircraft = 8100, - GlobalIndexCTextMessage = 8200, - GlobalIndexCSimulatorInternals = 8300, - GlobalIndexCSimulatorSettings = 8400, - GlobalIndexCSwiftPluignSettings = 8500, - GlobalIndexCSimulatorMessageSettings = 8600, - GlobalIndexCModelSettings = 8700, - GlobalIndexCAircraftCfgEntries = 8800, - GlobalIndexCDistributor = 8900, - GlobalIndexCVPilotModelRule = 9000, - GlobalIndexCAudioDeviceInfo = 10000, - GlobalIndexCSettingKeyboardHotkey = 11000, - GlobalIndexCKeyboardKey = 11100, - GlobalIndexCJoystickButton = 11200, - GlobalIndexIDatastore = 12000, - GlobalIndexIDatastoreInteger = 12100, - GlobalIndexIDatastoreString = 12200, - GlobalIndexCDbInfo = 12300, - GlobalIndexCGlobalSetup = 13000, - GlobalIndexCArtifact = 13100, - GlobalIndexCDistribution = 13200, - GlobalIndexCUpdateInfo = 13300, - GlobalIndexCVatsimSetup = 13400, - GlobalIndexCLauncherSetup = 13500, - GlobalIndexCGuiStateDbOwnModelsComponent = 14000, - GlobalIndexCGuiStateDbOwnModelSetComponent = 14100, - GlobalIndexCDockWidgetSettings = 14200, - GlobalIndexCNavigatorSettings = 14300, - GlobalIndexCSettingsReaders = 14400, - GlobalIndexCViewUpdateSettings = 14500, - GlobalIndexCGeneralGuiSettings = 14600, - GlobalIndexCTextMessageSettings = 14700, - GlobalIndexCAtcStationsSettings = 14800, - GlobalIndexRawFsdMessageSettings = 14900, - GlobalIndexCInterpolatioRenderingSetup = 16000, - GlobalIndexCMatchingStatisticsEntry = 16100, - GlobalIndexCAircraftMatcherSetup = 16200, - GlobalIndexCXSwiftBusSettings = 16300, - GlobalIndexSwiftPilotClient = 17000, - GlobalIndexSwiftCore = 17100, - GlobalIndexSwiftLauncher = 17200, - GlobalIndexLineNumber = 20000, //!< pseudo index for line numbers - GlobalIndexEmpty = 20001 - }; - //! Default constructor. CPropertyIndex() = default; diff --git a/src/blackmisc/propertyindexref.cpp b/src/blackmisc/propertyindexref.cpp index 030307d70..6c3ad5255 100644 --- a/src/blackmisc/propertyindexref.cpp +++ b/src/blackmisc/propertyindexref.cpp @@ -9,7 +9,6 @@ //! \file #include "blackmisc/propertyindexref.h" -#include "blackmisc/propertyindex.h" #include "blackmisc/verify.h" #include @@ -72,7 +71,7 @@ namespace BlackMisc auto end = it + (m_begin ? m_sizeOrIndex : 1); for (; it != end; ++it) { - Q_ASSERT(*it >= static_cast(CPropertyIndex::GlobalIndexCValueObject)); + Q_ASSERT(*it >= static_cast(CPropertyIndexRef::GlobalIndexCValueObject)); if (!s.isEmpty()) { s.append(";"); } s.append(QString::number(*it)); } diff --git a/src/blackmisc/propertyindexref.h b/src/blackmisc/propertyindexref.h index fca735dab..ac557c77f 100644 --- a/src/blackmisc/propertyindexref.h +++ b/src/blackmisc/propertyindexref.h @@ -48,6 +48,113 @@ namespace BlackMisc class BLACKMISC_EXPORT CPropertyIndexRef { public: + //! Global index, make sure the indexes are unqiue (for using them in class hierarchy) + enum GlobalIndex + { + GlobalIndexCValueObject = 10, + GlobalIndexCPhysicalQuantity = 100, + GlobalIndexCStatusMessage = 200, + GlobalIndexCNameVariantPair = 300, + GlobalIndexITimestampBased = 400, + GlobalIndexIOrderable = 500, + GlobalIndexINullable = 600, + GlobalIndexCIdentifier = 700, + GlobalIndexCRgbColor = 800, + GlobalIndexCCountry = 900, + GlobalIndexCPlatform = 1000, + GlobalIndexCApplicationInfo = 1100, + GlobalIndexCDirectories = 1200, + GlobalIndexCCrashInfo = 1300, + GlobalIndexCCrashSettings = 1400, + GlobalIndexCCallsign = 2000, + GlobalIndexCAircraftSituation = 2100, + GlobalIndexCAircraftSituationChange = 2200, + GlobalIndexCAtcStation = 2300, + GlobalIndexCInformationMessage = 2400, + GlobalIndexCAirport = 2500, + GlobalIndexCAircraftParts = 2600, + GlobalIndexCAircraftLights = 2700, + GlobalIndexCLivery = 2800, + GlobalIndexCFlightPlan = 2900, + GlobalIndexCSimBriefData = 3000, + GlobalIndexCComSystem = 3100, + GlobalIndexCModulator = 3200, + GlobalIndexCTransponder = 3300, + GlobalIndexCAircraftCategory = 3500, + GlobalIndexCAircraftIcaoCode = 3600, + GlobalIndexCAirlineIcaoCode = 3700, + GlobalIndexCAirportIcaoCode = 3800, + GlobalIndexCMetar = 4000, + GlobalIndexCCloudLayer = 4100, + GlobalIndexCPresentWeather = 4200, + GlobalIndexCWindLayer = 4300, + GlobalIndexCTemperatureLayer = 4400, + GlobalIndexCGridPoint = 4500, + GlobalIndexCVisibilityLayer = 4600, + GlobalIndexCWeatherScenario = 4700, + GlobalIndexICoordinateGeodetic = 5000, + GlobalIndexICoordinateWithRelativePosition = 5100, + GlobalIndexCCoordinateGeodetic = 5200, + GlobalIndexCElevationPlane = 5300, + GlobalIndexCClient = 6000, + GlobalIndexCUser = 6100, + GlobalIndexCAuthenticatedUser = 6200, + GlobalIndexCRole = 6300, + GlobalIndexCServer = 6400, + GlobalIndexCFsdSetup = 6500, + GlobalIndexCVoiceSetup = 6600, + GlobalIndexCNetworkSettings = 6700, + GlobalIndexCUrl = 6800, + GlobalIndexCUrlLog = 6900, + GlobalIndexCRemoteFile = 7000, + GlobalIndexCEcosystem = 7100, + GlobalIndexCRawFsdMessage = 7200, + GlobalIndexCAircraftModel = 8000, + GlobalIndexCSimulatedAircraft = 8100, + GlobalIndexCTextMessage = 8200, + GlobalIndexCSimulatorInternals = 8300, + GlobalIndexCSimulatorSettings = 8400, + GlobalIndexCSwiftPluignSettings = 8500, + GlobalIndexCSimulatorMessageSettings = 8600, + GlobalIndexCModelSettings = 8700, + GlobalIndexCAircraftCfgEntries = 8800, + GlobalIndexCDistributor = 8900, + GlobalIndexCVPilotModelRule = 9000, + GlobalIndexCAudioDeviceInfo = 10000, + GlobalIndexCSettingKeyboardHotkey = 11000, + GlobalIndexCKeyboardKey = 11100, + GlobalIndexCJoystickButton = 11200, + GlobalIndexIDatastore = 12000, + GlobalIndexIDatastoreInteger = 12100, + GlobalIndexIDatastoreString = 12200, + GlobalIndexCDbInfo = 12300, + GlobalIndexCGlobalSetup = 13000, + GlobalIndexCArtifact = 13100, + GlobalIndexCDistribution = 13200, + GlobalIndexCUpdateInfo = 13300, + GlobalIndexCVatsimSetup = 13400, + GlobalIndexCLauncherSetup = 13500, + GlobalIndexCGuiStateDbOwnModelsComponent = 14000, + GlobalIndexCGuiStateDbOwnModelSetComponent = 14100, + GlobalIndexCDockWidgetSettings = 14200, + GlobalIndexCNavigatorSettings = 14300, + GlobalIndexCSettingsReaders = 14400, + GlobalIndexCViewUpdateSettings = 14500, + GlobalIndexCGeneralGuiSettings = 14600, + GlobalIndexCTextMessageSettings = 14700, + GlobalIndexCAtcStationsSettings = 14800, + GlobalIndexRawFsdMessageSettings = 14900, + GlobalIndexCInterpolatioRenderingSetup = 16000, + GlobalIndexCMatchingStatisticsEntry = 16100, + GlobalIndexCAircraftMatcherSetup = 16200, + GlobalIndexCXSwiftBusSettings = 16300, + GlobalIndexSwiftPilotClient = 17000, + GlobalIndexSwiftCore = 17100, + GlobalIndexSwiftLauncher = 17200, + GlobalIndexLineNumber = 20000, //!< pseudo index for line numbers + GlobalIndexEmpty = 20001 + }; + //! Construct from a single index. CPropertyIndexRef(int index); diff --git a/src/blackmisc/rgbcolor.h b/src/blackmisc/rgbcolor.h index c26e5ba53..301e18e2b 100644 --- a/src/blackmisc/rgbcolor.h +++ b/src/blackmisc/rgbcolor.h @@ -33,7 +33,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexRed = BlackMisc::CPropertyIndex::GlobalIndexCRgbColor, + IndexRed = BlackMisc::CPropertyIndexRef::GlobalIndexCRgbColor, IndexGreen, IndexBlue, IndexWebHex diff --git a/src/blackmisc/simulation/aircraftmatchersetup.h b/src/blackmisc/simulation/aircraftmatchersetup.h index 603ba57b4..2527e40f4 100644 --- a/src/blackmisc/simulation/aircraftmatchersetup.h +++ b/src/blackmisc/simulation/aircraftmatchersetup.h @@ -108,7 +108,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexMatchingAlgorithm = CPropertyIndex::GlobalIndexCAircraftMatcherSetup, + IndexMatchingAlgorithm = CPropertyIndexRef::GlobalIndexCAircraftMatcherSetup, IndexMatchingMode, IndexForceMode, IndexPickStrategy, diff --git a/src/blackmisc/simulation/aircraftmodel.h b/src/blackmisc/simulation/aircraftmodel.h index 4316418ea..9bcaea7ad 100644 --- a/src/blackmisc/simulation/aircraftmodel.h +++ b/src/blackmisc/simulation/aircraftmodel.h @@ -108,7 +108,7 @@ namespace BlackMisc //! Indexes enum ColumnIndex { - IndexModelString = CPropertyIndex::GlobalIndexCAircraftModel, + IndexModelString = CPropertyIndexRef::GlobalIndexCAircraftModel, IndexModelStringAlias, IndexAllModelStrings, //!< indluding aliases IndexCallsign, diff --git a/src/blackmisc/simulation/distributor.h b/src/blackmisc/simulation/distributor.h index 15106ae0e..493bf11fa 100644 --- a/src/blackmisc/simulation/distributor.h +++ b/src/blackmisc/simulation/distributor.h @@ -41,7 +41,7 @@ namespace BlackMisc //! Property indexes enum ColumnIndex { - IndexDescription = CPropertyIndex::GlobalIndexCDistributor, + IndexDescription = CPropertyIndexRef::GlobalIndexCDistributor, IndexAlias1, IndexAlias2, IndexSimulator diff --git a/src/blackmisc/simulation/fscommon/aircraftcfgentries.h b/src/blackmisc/simulation/fscommon/aircraftcfgentries.h index 533f288df..ade4e6f3e 100644 --- a/src/blackmisc/simulation/fscommon/aircraftcfgentries.h +++ b/src/blackmisc/simulation/fscommon/aircraftcfgentries.h @@ -39,7 +39,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexEntryIndex = CPropertyIndex::GlobalIndexCAircraftCfgEntries, + IndexEntryIndex = CPropertyIndexRef::GlobalIndexCAircraftCfgEntries, IndexFileName, IndexTitle, IndexAirline, diff --git a/src/blackmisc/simulation/fscommon/vpilotmodelrule.h b/src/blackmisc/simulation/fscommon/vpilotmodelrule.h index 1648a5f20..b602b60ee 100644 --- a/src/blackmisc/simulation/fscommon/vpilotmodelrule.h +++ b/src/blackmisc/simulation/fscommon/vpilotmodelrule.h @@ -39,7 +39,7 @@ namespace BlackMisc //! Property indexes enum ColumnIndex { - IndexModelName = CPropertyIndex::GlobalIndexCVPilotModelRule, + IndexModelName = CPropertyIndexRef::GlobalIndexCVPilotModelRule, IndexFolder, IndexTypeCode, IndexCallsignPrefix diff --git a/src/blackmisc/simulation/interpolationrenderingsetup.h b/src/blackmisc/simulation/interpolationrenderingsetup.h index 0aa079baa..fb0513506 100644 --- a/src/blackmisc/simulation/interpolationrenderingsetup.h +++ b/src/blackmisc/simulation/interpolationrenderingsetup.h @@ -31,7 +31,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexLogInterpolation = CPropertyIndex::GlobalIndexCInterpolatioRenderingSetup, + IndexLogInterpolation = CPropertyIndexRef::GlobalIndexCInterpolatioRenderingSetup, IndexSimulatorDebugMessages, IndexForceFullInterpolation, IndexSendGndFlagToSimulator, diff --git a/src/blackmisc/simulation/matchingstatisticsentry.h b/src/blackmisc/simulation/matchingstatisticsentry.h index fe6c2cc58..8abb56bc5 100644 --- a/src/blackmisc/simulation/matchingstatisticsentry.h +++ b/src/blackmisc/simulation/matchingstatisticsentry.h @@ -29,7 +29,7 @@ namespace BlackMisc //! Property indexes enum ColumnIndex { - IndexSessionId = CPropertyIndex::GlobalIndexCMatchingStatisticsEntry, + IndexSessionId = CPropertyIndexRef::GlobalIndexCMatchingStatisticsEntry, IndexModelSetId, IndexEntryType, IndexEntryTypeAsString, diff --git a/src/blackmisc/simulation/settings/modelsettings.h b/src/blackmisc/simulation/settings/modelsettings.h index bee3fcb7d..15742e593 100644 --- a/src/blackmisc/simulation/settings/modelsettings.h +++ b/src/blackmisc/simulation/settings/modelsettings.h @@ -29,7 +29,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexAllowExclude = CPropertyIndex::GlobalIndexCSimulatorSettings + IndexAllowExclude = CPropertyIndexRef::GlobalIndexCSimulatorSettings }; //! Default constructor diff --git a/src/blackmisc/simulation/settings/simulatorsettings.h b/src/blackmisc/simulation/settings/simulatorsettings.h index 4bdb4d0b9..cce08cca4 100644 --- a/src/blackmisc/simulation/settings/simulatorsettings.h +++ b/src/blackmisc/simulation/settings/simulatorsettings.h @@ -39,7 +39,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexSimulatorDirectory = CPropertyIndex::GlobalIndexCSimulatorSettings, + IndexSimulatorDirectory = CPropertyIndexRef::GlobalIndexCSimulatorSettings, IndexModelDirectories, IndexModelExcludeDirectoryPatterns, IndexComIntegration, //!< COM unit integration @@ -524,7 +524,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexTechnicalLogSeverity = CPropertyIndex::GlobalIndexCSimulatorMessageSettings, + IndexTechnicalLogSeverity = CPropertyIndexRef::GlobalIndexCSimulatorMessageSettings, IndexRelayTextMessage, IndexRelayGloballyEnabled }; diff --git a/src/blackmisc/simulation/settings/swiftpluginsettings.h b/src/blackmisc/simulation/settings/swiftpluginsettings.h index 0ad0b724e..712128eb4 100644 --- a/src/blackmisc/simulation/settings/swiftpluginsettings.h +++ b/src/blackmisc/simulation/settings/swiftpluginsettings.h @@ -30,7 +30,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexEmulatedSimulator = CPropertyIndex::GlobalIndexCSwiftPluignSettings, + IndexEmulatedSimulator = CPropertyIndexRef::GlobalIndexCSwiftPluignSettings, IndexOwnModel, IndexDefaultModel, IndexLoggingFunctionCalls diff --git a/src/blackmisc/simulation/settings/xswiftbussettings.h b/src/blackmisc/simulation/settings/xswiftbussettings.h index fced2e242..99fa59906 100644 --- a/src/blackmisc/simulation/settings/xswiftbussettings.h +++ b/src/blackmisc/simulation/settings/xswiftbussettings.h @@ -36,7 +36,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexDBusServerAddress = CPropertyIndex::GlobalIndexCXSwiftBusSettings, + IndexDBusServerAddress = CPropertyIndexRef::GlobalIndexCXSwiftBusSettings, IndexMaxPlanes, IndexDrawingLabels, IndexBundleTaxiLandingLights, diff --git a/src/blackmisc/simulation/simulatedaircraft.h b/src/blackmisc/simulation/simulatedaircraft.h index 9e3a7a43f..518ce7e63 100644 --- a/src/blackmisc/simulation/simulatedaircraft.h +++ b/src/blackmisc/simulation/simulatedaircraft.h @@ -65,7 +65,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexCallsign = CPropertyIndex::GlobalIndexCSimulatedAircraft, + IndexCallsign = CPropertyIndexRef::GlobalIndexCSimulatedAircraft, IndexPilot, IndexRelativeDistance, IndexCom1System, diff --git a/src/blackmisc/simulation/simulatorinternals.h b/src/blackmisc/simulation/simulatorinternals.h index b9fcd02cc..f56f45cd8 100644 --- a/src/blackmisc/simulation/simulatorinternals.h +++ b/src/blackmisc/simulation/simulatorinternals.h @@ -37,7 +37,7 @@ namespace BlackMisc //! Specific values enum ColumnIndex { - IndexData = CPropertyIndex::GlobalIndexCSimulatorInternals + IndexData = CPropertyIndexRef::GlobalIndexCSimulatorInternals }; //! Default constructor diff --git a/src/blackmisc/statusmessage.h b/src/blackmisc/statusmessage.h index 1f315f447..edf5aa5f2 100644 --- a/src/blackmisc/statusmessage.h +++ b/src/blackmisc/statusmessage.h @@ -308,7 +308,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexCategoriesAsString = CPropertyIndex::GlobalIndexCStatusMessage, + IndexCategoriesAsString = CPropertyIndexRef::GlobalIndexCStatusMessage, IndexCategoriesHumanReadableAsString, IndexCategoryHumanReadableOrTechnicalAsString, IndexSeverity, diff --git a/src/blackmisc/statusmessagelist.cpp b/src/blackmisc/statusmessagelist.cpp index dc68ff020..5a92b2770 100644 --- a/src/blackmisc/statusmessagelist.cpp +++ b/src/blackmisc/statusmessagelist.cpp @@ -242,9 +242,9 @@ namespace BlackMisc if (indexes.isEmpty() || this->isEmpty()) { return {}; } QString html; int line = 1; - const bool withLineNumbers = indexes.contains(CPropertyIndex::GlobalIndexLineNumber); + const bool withLineNumbers = indexes.contains(CPropertyIndexRef::GlobalIndexLineNumber); CPropertyIndexList usedIndexes(indexes); - if (withLineNumbers) { usedIndexes.remove(CPropertyIndex::GlobalIndexLineNumber); } + if (withLineNumbers) { usedIndexes.remove(CPropertyIndexRef::GlobalIndexLineNumber); } for (const CStatusMessage &statusMessage : *this) { QString rowHtml; @@ -268,7 +268,7 @@ namespace BlackMisc const CPropertyIndexList &CStatusMessageList::simpleHtmlOutput() { - static const CPropertyIndexList properties({ CPropertyIndex::GlobalIndexLineNumber, CStatusMessage::IndexMessage }); + static const CPropertyIndexList properties({ CPropertyIndexRef::GlobalIndexLineNumber, CStatusMessage::IndexMessage }); return properties; } diff --git a/src/blackmisc/timestampbased.h b/src/blackmisc/timestampbased.h index 296e219c4..df6977494 100644 --- a/src/blackmisc/timestampbased.h +++ b/src/blackmisc/timestampbased.h @@ -28,7 +28,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexUtcTimestamp = CPropertyIndex::GlobalIndexITimestampBased, + IndexUtcTimestamp = CPropertyIndexRef::GlobalIndexITimestampBased, IndexUtcTimestampFormattedYmdhms, IndexUtcTimestampFormattedYmdhmsz, IndexUtcTimestampFormattedMdhms, @@ -173,7 +173,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexOffsetMs = CPropertyIndex::GlobalIndexITimestampBased + ITimestampBased::IndexMSecsSinceEpoch + 1, + IndexOffsetMs = CPropertyIndexRef::GlobalIndexITimestampBased + ITimestampBased::IndexMSecsSinceEpoch + 1, IndexAdjustedMsWithOffset, IndexOffsetWithUnit // keep this as last item }; diff --git a/src/blackmisc/weather/cloudlayer.h b/src/blackmisc/weather/cloudlayer.h index 03dac4a1e..413ff4bd5 100644 --- a/src/blackmisc/weather/cloudlayer.h +++ b/src/blackmisc/weather/cloudlayer.h @@ -65,7 +65,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexBase = BlackMisc::CPropertyIndex::GlobalIndexCCloudLayer, + IndexBase = BlackMisc::CPropertyIndexRef::GlobalIndexCCloudLayer, IndexTop, IndexPrecipitationRate, IndexPrecipitation, diff --git a/src/blackmisc/weather/gridpoint.h b/src/blackmisc/weather/gridpoint.h index c3dabd0d5..a8aa05f7a 100644 --- a/src/blackmisc/weather/gridpoint.h +++ b/src/blackmisc/weather/gridpoint.h @@ -41,7 +41,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexIdentifier = CPropertyIndex::GlobalIndexCGridPoint, + IndexIdentifier = CPropertyIndexRef::GlobalIndexCGridPoint, IndexPosition, IndexCloudLayers, IndexTemperatureLayers, diff --git a/src/blackmisc/weather/presentweather.h b/src/blackmisc/weather/presentweather.h index d980b37e8..bcb0ab208 100644 --- a/src/blackmisc/weather/presentweather.h +++ b/src/blackmisc/weather/presentweather.h @@ -87,7 +87,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexPresentWeather = BlackMisc::CPropertyIndex::GlobalIndexCPresentWeather, + IndexPresentWeather = BlackMisc::CPropertyIndexRef::GlobalIndexCPresentWeather, IndexIntensity, IndexDescriptor, IndexWeatherPhenomena diff --git a/src/blackmisc/weather/temperaturelayer.h b/src/blackmisc/weather/temperaturelayer.h index fb40e5bbd..04a2430e3 100644 --- a/src/blackmisc/weather/temperaturelayer.h +++ b/src/blackmisc/weather/temperaturelayer.h @@ -36,7 +36,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexTemperatureLayer = BlackMisc::CPropertyIndex::GlobalIndexCTemperatureLayer, + IndexTemperatureLayer = BlackMisc::CPropertyIndexRef::GlobalIndexCTemperatureLayer, IndexLevel, IndexTemperature, IndexDewPoint, diff --git a/src/blackmisc/weather/visibilitylayer.h b/src/blackmisc/weather/visibilitylayer.h index cb6585a06..8c951b9ca 100644 --- a/src/blackmisc/weather/visibilitylayer.h +++ b/src/blackmisc/weather/visibilitylayer.h @@ -36,7 +36,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexBase = BlackMisc::CPropertyIndex::GlobalIndexCVisibilityLayer, + IndexBase = BlackMisc::CPropertyIndexRef::GlobalIndexCVisibilityLayer, IndexTop, IndexVisibility, }; diff --git a/src/blackmisc/weather/weatherscenario.h b/src/blackmisc/weather/weatherscenario.h index 7ea63c848..2198931a4 100644 --- a/src/blackmisc/weather/weatherscenario.h +++ b/src/blackmisc/weather/weatherscenario.h @@ -38,7 +38,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexScenarioIndex = CPropertyIndex::GlobalIndexCWeatherScenario, + IndexScenarioIndex = CPropertyIndexRef::GlobalIndexCWeatherScenario, IndexScenarioName, IndexScenarioDescription }; diff --git a/src/blackmisc/weather/windlayer.h b/src/blackmisc/weather/windlayer.h index a633d87ae..f9e81130c 100644 --- a/src/blackmisc/weather/windlayer.h +++ b/src/blackmisc/weather/windlayer.h @@ -36,7 +36,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexLevel = BlackMisc::CPropertyIndex::GlobalIndexCWindLayer, + IndexLevel = BlackMisc::CPropertyIndexRef::GlobalIndexCWindLayer, IndexDirection, IndexDirectionVariable, IndexSpeed,