Issue #77 Move GlobalIndex enum from CPropertyIndex to CPropertyIndexRef

This commit is contained in:
Mat Sutcliffe
2020-11-01 20:12:55 +00:00
parent 0971c8ce68
commit 363758e8ea
92 changed files with 210 additions and 211 deletions

View File

@@ -42,7 +42,7 @@ namespace BlackMisc
//! Properties by index
enum ColumnIndex
{
IndexApplication = CPropertyIndex::GlobalIndexCApplicationInfo,
IndexApplication = CPropertyIndexRef::GlobalIndexCApplicationInfo,
IndexApplicationAsString,
IndexApplicationDataPath,
IndexCompileInfo,

View File

@@ -35,7 +35,7 @@ namespace BlackMisc
//! Properties by index
enum ColumnIndex
{
IndexName = CPropertyIndex::GlobalIndexCAudioDeviceInfo,
IndexName = CPropertyIndexRef::GlobalIndexCAudioDeviceInfo,
IndexDeviceType,
IndexDeviceTypeAsString,
IndexIdentifier

View File

@@ -33,7 +33,7 @@ namespace BlackMisc
//! Properties by index
enum ColumnIndex
{
IndexAfvVoiceServerUrl = CPropertyIndex::GlobalIndexCVoiceSetup,
IndexAfvVoiceServerUrl = CPropertyIndexRef::GlobalIndexCVoiceSetup,
IndexAfvMapUrl
};

View File

@@ -38,7 +38,7 @@ namespace BlackMisc
//! Properties by index
enum ColumnIndex
{
IndexName = CPropertyIndex::GlobalIndexCAircraftCategory,
IndexName = CPropertyIndexRef::GlobalIndexCAircraftCategory,
IndexDescription,
IndexLevelString,
IndexLevelStringAndName,

View File

@@ -39,7 +39,7 @@ namespace BlackMisc
//! Properties by index
enum ColumnIndex
{
IndexAircraftDesignator = CPropertyIndex::GlobalIndexCAircraftIcaoCode,
IndexAircraftDesignator = CPropertyIndexRef::GlobalIndexCAircraftIcaoCode,
IndexIataCode,
IndexFamily,
IndexCombinedAircraftType,

View File

@@ -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,

View File

@@ -40,7 +40,7 @@ namespace BlackMisc
//! Properties by index
enum ColumnIndex
{
IndexLights = CPropertyIndex::GlobalIndexCAircraftParts,
IndexLights = CPropertyIndexRef::GlobalIndexCAircraftParts,
IndexGearDown,
IndexFlapsPercentage,
IndexSpoilersOut,

View File

@@ -54,7 +54,7 @@ namespace BlackMisc
//! Properties by index
enum ColumnIndex
{
IndexPosition = CPropertyIndex::GlobalIndexCAircraftSituation,
IndexPosition = CPropertyIndexRef::GlobalIndexCAircraftSituation,
IndexLatitude,
IndexLongitude,
IndexAltitude,

View File

@@ -38,7 +38,7 @@ namespace BlackMisc
//! Properties by index
enum ColumnIndex
{
IndexCallsign = CPropertyIndex::GlobalIndexCAircraftSituationChange,
IndexCallsign = CPropertyIndexRef::GlobalIndexCAircraftSituationChange,
IndexIsNull,
IndexSituationsCount,
IndexConstAscending,

View File

@@ -41,7 +41,7 @@ namespace BlackMisc
//! Properties by index
enum ColumnIndex
{
IndexAirlineDesignator = CPropertyIndex::GlobalIndexCAirlineIcaoCode,
IndexAirlineDesignator = CPropertyIndexRef::GlobalIndexCAirlineIcaoCode,
IndexIataCode,
IndexAirlineName,
IndexAirlineCountryIso,

View File

@@ -43,7 +43,7 @@ namespace BlackMisc
//! Properties by index
enum ColumnIndex
{
IndexIcao = BlackMisc::CPropertyIndex::GlobalIndexCAirport,
IndexIcao = BlackMisc::CPropertyIndexRef::GlobalIndexCAirport,
IndexLocation,
IndexDescriptiveName,
IndexPosition,

View File

@@ -45,7 +45,7 @@ namespace BlackMisc
//! Properties by index
enum ColumnIndex
{
IndexCallsign = CPropertyIndex::GlobalIndexCAtcStation,
IndexCallsign = CPropertyIndexRef::GlobalIndexCAtcStation,
IndexCallsignString,
IndexCallsignStringCrossCopuled,
IndexController,

View File

@@ -33,7 +33,7 @@ namespace BlackMisc
//! Indexes
enum ColumnIndex
{
IndexCallsignString = CPropertyIndex::GlobalIndexCCallsign,
IndexCallsignString = CPropertyIndexRef::GlobalIndexCCallsign,
IndexCallsignStringAsSet,
IndexTelephonyDesignator,
IndexSuffix,

View File

@@ -171,7 +171,7 @@ namespace BlackMisc
//! Properties by index
enum ColumnIndex
{
IndexCallsign = CPropertyIndex::GlobalIndexCFlightPlan,
IndexCallsign = CPropertyIndexRef::GlobalIndexCFlightPlan,
IndexOriginAirportIcao,
IndexDestinationAirportIcao,
IndexAlternateAirportIcao,

View File

@@ -44,7 +44,7 @@ namespace BlackMisc
//! Properties by index
enum ColumnIndex
{
IndexType = CPropertyIndex::GlobalIndexCInformationMessage,
IndexType = CPropertyIndexRef::GlobalIndexCInformationMessage,
IndexMessage,
};

View File

@@ -39,7 +39,7 @@ namespace BlackMisc
//! Properties by index
enum ColumnIndex
{
IndexDescription = CPropertyIndex::GlobalIndexCLivery,
IndexDescription = CPropertyIndexRef::GlobalIndexCLivery,
IndexAirlineIcaoCode,
IndexCombinedCode,
IndexColorFuselage,

View File

@@ -25,7 +25,7 @@ namespace BlackMisc
//! Column indexes
enum ColumnIndex
{
IndexActiveFrequency = CPropertyIndex::GlobalIndexCModulator,
IndexActiveFrequency = CPropertyIndexRef::GlobalIndexCModulator,
IndexStandbyFrequency,
IndexReceiveVolume,
IndexTransmitVolume,

View File

@@ -40,7 +40,7 @@ namespace BlackMisc
//! Properties by index
enum ColumnIndex
{
IndexUsername = CPropertyIndex::GlobalIndexCSimBriefData,
IndexUsername = CPropertyIndexRef::GlobalIndexCSimBriefData,
IndexUrl
};

View File

@@ -46,7 +46,7 @@ namespace BlackMisc
//! Indexes
enum ColumnIndex
{
IndexMode = CPropertyIndex::GlobalIndexCTransponder,
IndexMode = CPropertyIndexRef::GlobalIndexCTransponder,
IndexModeAsString,
IndexTransponderCode,
IndexTransponderCodeFormatted,

View File

@@ -35,7 +35,7 @@ namespace BlackMisc
//! Properties by index
enum ColumnIndex
{
IndexIsoCode = CPropertyIndex::GlobalIndexCCountry,
IndexIsoCode = CPropertyIndexRef::GlobalIndexCCountry,
IndexIso3Code,
IndexName,
IndexAlias1,

View File

@@ -25,7 +25,7 @@ namespace BlackMisc
//! Properties by index
enum ColumnIndex
{
IndexUserName = CPropertyIndex::GlobalIndexCCrashInfo,
IndexUserName = CPropertyIndexRef::GlobalIndexCCrashInfo,
IndexInfo,
IndexSimulatorString,
IndexFlightNetworkInfo

View File

@@ -26,7 +26,7 @@ namespace BlackMisc
//! Properties by index
enum ColumnIndex
{
IndexEnabled = CPropertyIndex::GlobalIndexCCrashSettings,
IndexEnabled = CPropertyIndexRef::GlobalIndexCCrashSettings,
IndexPrivateInfo
};

View File

@@ -31,7 +31,7 @@ namespace BlackMisc
//! Properties by index
enum ColumnIndex
{
IndexName = CPropertyIndex::GlobalIndexCArtifact,
IndexName = CPropertyIndexRef::GlobalIndexCArtifact,
IndexMd5,
IndexType,
IndexPlatform,

View File

@@ -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,

View File

@@ -31,7 +31,7 @@ namespace BlackMisc
//! Properties by index
enum ColumnIndex
{
IndexTableName = CPropertyIndex::GlobalIndexCDbInfo,
IndexTableName = CPropertyIndexRef::GlobalIndexCDbInfo,
IndexEntries,
IndexEntity
};

View File

@@ -37,7 +37,7 @@ namespace BlackMisc
//! Properties by index
enum ColumnIndex
{
IndexChannel = CPropertyIndex::GlobalIndexCDistribution,
IndexChannel = CPropertyIndexRef::GlobalIndexCDistribution,
IndexStability,
IndexRestricted,
IndexDownloadUrls

View File

@@ -30,7 +30,7 @@ namespace BlackMisc
//! Properties by index
enum ColumnIndex
{
IndexArtifactsPilotClient = CPropertyIndex::GlobalIndexCUpdateInfo,
IndexArtifactsPilotClient = CPropertyIndexRef::GlobalIndexCUpdateInfo,
IndexArtifactsXSwiftBus,
IndexDistributions
};

View File

@@ -30,7 +30,7 @@ namespace BlackMisc
//! Properties by index
enum ColumnIndex
{
IndexDirFlightPlan = CPropertyIndex::GlobalIndexCDirectories,
IndexDirFlightPlan = CPropertyIndexRef::GlobalIndexCDirectories,
IndexDirFlightPlanOrDefault,
IndexDirLastViewJson,
IndexDirLastViewJsonOrDefault,

View File

@@ -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
};

View File

@@ -36,7 +36,7 @@ namespace BlackMisc
//! Properties by index
enum ColumnIndex
{
IndexRadius = CPropertyIndex::GlobalIndexCElevationPlane
IndexRadius = CPropertyIndexRef::GlobalIndexCElevationPlane
};
//! Default constructor

View File

@@ -33,7 +33,7 @@ namespace BlackMisc
//! Properties by index
enum ColumnIndex
{
IndexName = CPropertyIndex::GlobalIndexCIdentifier,
IndexName = CPropertyIndexRef::GlobalIndexCIdentifier,
IndexMachineId,
IndexMachineIdBase64,
IndexMachineName,

View File

@@ -33,7 +33,7 @@ namespace BlackMisc
//! Properties by index
enum ColumnIndex
{
IndexIdentifier = CPropertyIndex::GlobalIndexCSettingKeyboardHotkey,
IndexIdentifier = CPropertyIndexRef::GlobalIndexCSettingKeyboardHotkey,
IndexIdentifierAsString,
IndexCombination,
IndexCombinationAsString,

View File

@@ -32,7 +32,7 @@ namespace BlackMisc
//! Properties by index
enum ColumnIndex
{
IndexDeviceName = CPropertyIndex::GlobalIndexCJoystickButton,
IndexDeviceName = CPropertyIndexRef::GlobalIndexCJoystickButton,
IndexButton,
IndexButtonAsString,
IndexButtonObject, // just for updates

View File

@@ -33,7 +33,7 @@ namespace BlackMisc
//! Properties by index
enum ColumnIndex
{
IndexKey = CPropertyIndex::GlobalIndexCKeyboardKey,
IndexKey = CPropertyIndexRef::GlobalIndexCKeyboardKey,
IndexKeyAsString,
IndexKeyObject, // just for updates
};

View File

@@ -29,7 +29,7 @@ namespace BlackMisc
//! Properties by index
enum ColumnIndex
{
IndexName = BlackMisc::CPropertyIndex::GlobalIndexCNameVariantPair,
IndexName = BlackMisc::CPropertyIndexRef::GlobalIndexCNameVariantPair,
IndexVariant
};

View File

@@ -41,7 +41,7 @@ namespace BlackMisc
//! Properties by index
enum ColumnIndex
{
IndexEmail = BlackMisc::CPropertyIndex::GlobalIndexCAuthenticatedUser,
IndexEmail = BlackMisc::CPropertyIndexRef::GlobalIndexCAuthenticatedUser,
IndexVatsimId,
IndexPassword,
IndexRealName,

View File

@@ -34,7 +34,7 @@ namespace BlackMisc
//! Properties by index
enum ColumnIndex
{
IndexCapabilities = CPropertyIndex::GlobalIndexCClient,
IndexCapabilities = CPropertyIndexRef::GlobalIndexCClient,
IndexCapabilitiesString,
IndexModelString,
IndexServer,

View File

@@ -29,7 +29,7 @@ namespace BlackMisc
//! Properties by index
enum ColumnIndex
{
IndexSystem = CPropertyIndex::GlobalIndexCEcosystem,
IndexSystem = CPropertyIndexRef::GlobalIndexCEcosystem,
IndexSystemString
};

View File

@@ -31,7 +31,7 @@ namespace BlackMisc
//! Properties by index
enum ColumnIndex
{
IndexTextCodec = CPropertyIndex::GlobalIndexCFsdSetup,
IndexTextCodec = CPropertyIndexRef::GlobalIndexCFsdSetup,
IndexSendReceiveDetails
};

View File

@@ -35,7 +35,7 @@ namespace BlackMisc
//! Properties by index
enum ColumnIndex
{
IndexRawMessage = CPropertyIndex::GlobalIndexCRawFsdMessage,
IndexRawMessage = CPropertyIndexRef::GlobalIndexCRawFsdMessage,
};
//! Default constructor.

View File

@@ -38,7 +38,7 @@ namespace BlackMisc
//! Properties by index
enum ColumnIndex
{
IndexName = CPropertyIndex::GlobalIndexCRemoteFile,
IndexName = CPropertyIndexRef::GlobalIndexCRemoteFile,
IndexDescription,
IndexUrl,
IndexSize

View File

@@ -37,7 +37,7 @@ namespace BlackMisc
//! Properties by index
enum ColumnIndex
{
IndexName = CPropertyIndex::GlobalIndexCRole,
IndexName = CPropertyIndexRef::GlobalIndexCRole,
IndexDescription
};

View File

@@ -41,7 +41,7 @@ namespace BlackMisc
//! Properties by index
enum ColumnIndex
{
IndexName = CPropertyIndex::GlobalIndexCServer,
IndexName = CPropertyIndexRef::GlobalIndexCServer,
IndexDescription,
IndexAddress,
IndexPort,

View File

@@ -35,7 +35,7 @@ namespace BlackMisc
//! Properties by index
enum ColumnIndex
{
IndexDynamicOffsetTime = CPropertyIndex::GlobalIndexCNetworkSettings,
IndexDynamicOffsetTime = CPropertyIndexRef::GlobalIndexCNetworkSettings,
};
//! Constructor

View File

@@ -41,7 +41,7 @@ namespace BlackMisc
//! Properties by index
enum ColumnIndex
{
IndexSenderCallsign = CPropertyIndex::GlobalIndexCTextMessage,
IndexSenderCallsign = CPropertyIndexRef::GlobalIndexCTextMessage,
IndexRecipientCallsign,
IndexRecipientCallsignOrFrequency,
IndexMessage

View File

@@ -35,7 +35,7 @@ namespace BlackMisc
//! Properties by index
enum ColumnIndex
{
IndexScheme = CPropertyIndex::GlobalIndexCUrl,
IndexScheme = CPropertyIndexRef::GlobalIndexCUrl,
IndexHost,
IndexPort,
IndexPath,

View File

@@ -33,7 +33,7 @@ namespace BlackMisc
//! Properties by index
enum ColumnIndex
{
IndexId = CPropertyIndex::GlobalIndexCUrlLog,
IndexId = CPropertyIndexRef::GlobalIndexCUrlLog,
IndexSuccess,
IndexUrl,
IndexResponseTimestamp,

View File

@@ -41,7 +41,7 @@ namespace BlackMisc
*/
enum ColumnIndex
{
IndexEmail = CPropertyIndex::GlobalIndexCUser,
IndexEmail = CPropertyIndexRef::GlobalIndexCUser,
IndexId,
IndexIdInteger,
IndexId7Digit,

View File

@@ -26,7 +26,7 @@ namespace BlackMisc
//! Properties by index
enum ColumnIndex
{
IndexOrder = CPropertyIndex::GlobalIndexIOrderable,
IndexOrder = CPropertyIndexRef::GlobalIndexIOrderable,
IndexOrderString
};

View File

@@ -31,7 +31,7 @@ namespace BlackMisc
//! Properties by index
enum ColumnIndex
{
IndexPlatform = CPropertyIndex::GlobalIndexCPlatform
IndexPlatform = CPropertyIndexRef::GlobalIndexCPlatform
};
//! OS

View File

@@ -62,7 +62,7 @@ namespace BlackMisc
//! Index
enum ColumnIndex
{
IndexUnit = CPropertyIndex::GlobalIndexCPhysicalQuantity,
IndexUnit = CPropertyIndexRef::GlobalIndexCPhysicalQuantity,
IndexValue,
IndexValueRounded0DigitsWithUnit,
IndexValueRounded1DigitsWithUnit,

View File

@@ -15,7 +15,7 @@ namespace BlackMisc
{
CPropertyIndex::CPropertyIndex(int singleProperty) : m_indexes { singleProperty }
{
Q_ASSERT(singleProperty >= static_cast<int>(GlobalIndexCValueObject));
Q_ASSERT(singleProperty >= static_cast<int>(CPropertyIndexRef::GlobalIndexCValueObject));
}
CPropertyIndex::CPropertyIndex(std::initializer_list<int> il) : m_indexes(il)
@@ -67,7 +67,7 @@ namespace BlackMisc
QString s;
for (const int i : m_indexes)
{
Q_ASSERT(i >= static_cast<int>(GlobalIndexCValueObject));
Q_ASSERT(i >= static_cast<int>(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<int>(GlobalIndexCValueObject));
Q_ASSERT(i >= static_cast<int>(CPropertyIndexRef::GlobalIndexCValueObject));
m_indexes.append(i);
}
}

View File

@@ -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;

View File

@@ -9,7 +9,6 @@
//! \file
#include "blackmisc/propertyindexref.h"
#include "blackmisc/propertyindex.h"
#include "blackmisc/verify.h"
#include <QtGlobal>
@@ -72,7 +71,7 @@ namespace BlackMisc
auto end = it + (m_begin ? m_sizeOrIndex : 1);
for (; it != end; ++it)
{
Q_ASSERT(*it >= static_cast<int>(CPropertyIndex::GlobalIndexCValueObject));
Q_ASSERT(*it >= static_cast<int>(CPropertyIndexRef::GlobalIndexCValueObject));
if (!s.isEmpty()) { s.append(";"); }
s.append(QString::number(*it));
}

View File

@@ -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);

View File

@@ -33,7 +33,7 @@ namespace BlackMisc
//! Properties by index
enum ColumnIndex
{
IndexRed = BlackMisc::CPropertyIndex::GlobalIndexCRgbColor,
IndexRed = BlackMisc::CPropertyIndexRef::GlobalIndexCRgbColor,
IndexGreen,
IndexBlue,
IndexWebHex

View File

@@ -108,7 +108,7 @@ namespace BlackMisc
//! Properties by index
enum ColumnIndex
{
IndexMatchingAlgorithm = CPropertyIndex::GlobalIndexCAircraftMatcherSetup,
IndexMatchingAlgorithm = CPropertyIndexRef::GlobalIndexCAircraftMatcherSetup,
IndexMatchingMode,
IndexForceMode,
IndexPickStrategy,

View File

@@ -108,7 +108,7 @@ namespace BlackMisc
//! Indexes
enum ColumnIndex
{
IndexModelString = CPropertyIndex::GlobalIndexCAircraftModel,
IndexModelString = CPropertyIndexRef::GlobalIndexCAircraftModel,
IndexModelStringAlias,
IndexAllModelStrings, //!< indluding aliases
IndexCallsign,

View File

@@ -41,7 +41,7 @@ namespace BlackMisc
//! Property indexes
enum ColumnIndex
{
IndexDescription = CPropertyIndex::GlobalIndexCDistributor,
IndexDescription = CPropertyIndexRef::GlobalIndexCDistributor,
IndexAlias1,
IndexAlias2,
IndexSimulator

View File

@@ -39,7 +39,7 @@ namespace BlackMisc
//! Properties by index
enum ColumnIndex
{
IndexEntryIndex = CPropertyIndex::GlobalIndexCAircraftCfgEntries,
IndexEntryIndex = CPropertyIndexRef::GlobalIndexCAircraftCfgEntries,
IndexFileName,
IndexTitle,
IndexAirline,

View File

@@ -39,7 +39,7 @@ namespace BlackMisc
//! Property indexes
enum ColumnIndex
{
IndexModelName = CPropertyIndex::GlobalIndexCVPilotModelRule,
IndexModelName = CPropertyIndexRef::GlobalIndexCVPilotModelRule,
IndexFolder,
IndexTypeCode,
IndexCallsignPrefix

View File

@@ -31,7 +31,7 @@ namespace BlackMisc
//! Properties by index
enum ColumnIndex
{
IndexLogInterpolation = CPropertyIndex::GlobalIndexCInterpolatioRenderingSetup,
IndexLogInterpolation = CPropertyIndexRef::GlobalIndexCInterpolatioRenderingSetup,
IndexSimulatorDebugMessages,
IndexForceFullInterpolation,
IndexSendGndFlagToSimulator,

View File

@@ -29,7 +29,7 @@ namespace BlackMisc
//! Property indexes
enum ColumnIndex
{
IndexSessionId = CPropertyIndex::GlobalIndexCMatchingStatisticsEntry,
IndexSessionId = CPropertyIndexRef::GlobalIndexCMatchingStatisticsEntry,
IndexModelSetId,
IndexEntryType,
IndexEntryTypeAsString,

View File

@@ -29,7 +29,7 @@ namespace BlackMisc
//! Properties by index
enum ColumnIndex
{
IndexAllowExclude = CPropertyIndex::GlobalIndexCSimulatorSettings
IndexAllowExclude = CPropertyIndexRef::GlobalIndexCSimulatorSettings
};
//! Default constructor

View File

@@ -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
};

View File

@@ -30,7 +30,7 @@ namespace BlackMisc
//! Properties by index
enum ColumnIndex
{
IndexEmulatedSimulator = CPropertyIndex::GlobalIndexCSwiftPluignSettings,
IndexEmulatedSimulator = CPropertyIndexRef::GlobalIndexCSwiftPluignSettings,
IndexOwnModel,
IndexDefaultModel,
IndexLoggingFunctionCalls

View File

@@ -36,7 +36,7 @@ namespace BlackMisc
//! Properties by index
enum ColumnIndex
{
IndexDBusServerAddress = CPropertyIndex::GlobalIndexCXSwiftBusSettings,
IndexDBusServerAddress = CPropertyIndexRef::GlobalIndexCXSwiftBusSettings,
IndexMaxPlanes,
IndexDrawingLabels,
IndexBundleTaxiLandingLights,

View File

@@ -65,7 +65,7 @@ namespace BlackMisc
//! Properties by index
enum ColumnIndex
{
IndexCallsign = CPropertyIndex::GlobalIndexCSimulatedAircraft,
IndexCallsign = CPropertyIndexRef::GlobalIndexCSimulatedAircraft,
IndexPilot,
IndexRelativeDistance,
IndexCom1System,

View File

@@ -37,7 +37,7 @@ namespace BlackMisc
//! Specific values
enum ColumnIndex
{
IndexData = CPropertyIndex::GlobalIndexCSimulatorInternals
IndexData = CPropertyIndexRef::GlobalIndexCSimulatorInternals
};
//! Default constructor

View File

@@ -308,7 +308,7 @@ namespace BlackMisc
//! Properties by index
enum ColumnIndex
{
IndexCategoriesAsString = CPropertyIndex::GlobalIndexCStatusMessage,
IndexCategoriesAsString = CPropertyIndexRef::GlobalIndexCStatusMessage,
IndexCategoriesHumanReadableAsString,
IndexCategoryHumanReadableOrTechnicalAsString,
IndexSeverity,

View File

@@ -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;
}

View File

@@ -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
};

View File

@@ -65,7 +65,7 @@ namespace BlackMisc
//! Properties by index
enum ColumnIndex
{
IndexBase = BlackMisc::CPropertyIndex::GlobalIndexCCloudLayer,
IndexBase = BlackMisc::CPropertyIndexRef::GlobalIndexCCloudLayer,
IndexTop,
IndexPrecipitationRate,
IndexPrecipitation,

View File

@@ -41,7 +41,7 @@ namespace BlackMisc
//! Properties by index
enum ColumnIndex
{
IndexIdentifier = CPropertyIndex::GlobalIndexCGridPoint,
IndexIdentifier = CPropertyIndexRef::GlobalIndexCGridPoint,
IndexPosition,
IndexCloudLayers,
IndexTemperatureLayers,

View File

@@ -87,7 +87,7 @@ namespace BlackMisc
//! Properties by index
enum ColumnIndex
{
IndexPresentWeather = BlackMisc::CPropertyIndex::GlobalIndexCPresentWeather,
IndexPresentWeather = BlackMisc::CPropertyIndexRef::GlobalIndexCPresentWeather,
IndexIntensity,
IndexDescriptor,
IndexWeatherPhenomena

View File

@@ -36,7 +36,7 @@ namespace BlackMisc
//! Properties by index
enum ColumnIndex
{
IndexTemperatureLayer = BlackMisc::CPropertyIndex::GlobalIndexCTemperatureLayer,
IndexTemperatureLayer = BlackMisc::CPropertyIndexRef::GlobalIndexCTemperatureLayer,
IndexLevel,
IndexTemperature,
IndexDewPoint,

View File

@@ -36,7 +36,7 @@ namespace BlackMisc
//! Properties by index
enum ColumnIndex
{
IndexBase = BlackMisc::CPropertyIndex::GlobalIndexCVisibilityLayer,
IndexBase = BlackMisc::CPropertyIndexRef::GlobalIndexCVisibilityLayer,
IndexTop,
IndexVisibility,
};

View File

@@ -38,7 +38,7 @@ namespace BlackMisc
//! Properties by index
enum ColumnIndex
{
IndexScenarioIndex = CPropertyIndex::GlobalIndexCWeatherScenario,
IndexScenarioIndex = CPropertyIndexRef::GlobalIndexCWeatherScenario,
IndexScenarioName,
IndexScenarioDescription
};

View File

@@ -36,7 +36,7 @@ namespace BlackMisc
//! Properties by index
enum ColumnIndex
{
IndexLevel = BlackMisc::CPropertyIndex::GlobalIndexCWindLayer,
IndexLevel = BlackMisc::CPropertyIndexRef::GlobalIndexCWindLayer,
IndexDirection,
IndexDirectionVariable,
IndexSpeed,