diff --git a/src/blackmisc/country.h b/src/blackmisc/country.h index 356983745..3eac021d4 100644 --- a/src/blackmisc/country.h +++ b/src/blackmisc/country.h @@ -30,7 +30,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexIsoCode = BlackMisc::CPropertyIndex::GlobalIndexCountry, + IndexIsoCode = BlackMisc::CPropertyIndex::GlobalIndexCCountry, IndexName, IndexNameIso, IndexIsoName diff --git a/src/blackmisc/identifier.h b/src/blackmisc/identifier.h index bdfeef9ea..c17f4821e 100644 --- a/src/blackmisc/identifier.h +++ b/src/blackmisc/identifier.h @@ -33,7 +33,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexName = BlackMisc::CPropertyIndex::GlobalIndexIdentifier, + IndexName = BlackMisc::CPropertyIndex::GlobalIndexCIdentifier, IndexMachineId, IndexMachineIdBase64, IndexMachineName, diff --git a/src/blackmisc/math/mathutils.h b/src/blackmisc/math/mathutils.h index f9576efcf..c59c877e2 100644 --- a/src/blackmisc/math/mathutils.h +++ b/src/blackmisc/math/mathutils.h @@ -100,7 +100,7 @@ namespace BlackMisc static double normalizeDegrees(double degrees); //! Random number between low and high - static int randomIntger(int low, int high) + static int randomInteger(int low, int high) { return qrand() % ((high + 1) - low) + low; } diff --git a/src/blackmisc/project.cpp b/src/blackmisc/project.cpp index 2211be4c1..eb157a22e 100644 --- a/src/blackmisc/project.cpp +++ b/src/blackmisc/project.cpp @@ -190,6 +190,12 @@ namespace BlackMisc #endif } + bool CProject::isBetaTest() + { + //! \todo however we do it + return false; + } + bool CProject::isRunningOnWindowsNtPlatform() { #ifdef Q_OS_WIN @@ -214,6 +220,11 @@ namespace BlackMisc return p.cd("samples"); } + bool CProject::isRunningInBetaOrDeveloperEnvironment() + { + return isBetaTest() || isRunningInDeveloperEnvironment(); + } + int CProject::getMajorMinor(int index) { QString v = version(); diff --git a/src/blackmisc/project.h b/src/blackmisc/project.h index 6c4b37b56..1516738a3 100644 --- a/src/blackmisc/project.h +++ b/src/blackmisc/project.h @@ -88,12 +88,18 @@ namespace BlackMisc //! Release build? static bool isReleaseBuild(); + //! Beta test? + static bool isBetaTest(); + //! Running on Windows NT platform? static bool isRunningOnWindowsNtPlatform(); //! Running in dev.environment, so on a programmers machine static bool isRunningInDeveloperEnvironment(); + //! Beta / dev.environment? + static bool isRunningInBetaOrDeveloperEnvironment(); + //! Application directory where current application is located static QString getApplicationDir(); diff --git a/src/blackmisc/propertyindex.h b/src/blackmisc/propertyindex.h index 95453cb20..1dc9ea817 100644 --- a/src/blackmisc/propertyindex.h +++ b/src/blackmisc/propertyindex.h @@ -49,43 +49,45 @@ namespace BlackMisc GlobalIndexCPhysicalQuantity = 100, GlobalIndexCStatusMessage = 200, GlobalIndexCNameVariantPair = 300, - GlobalIndexTimestampBased = 400, - GlobalIndexIdentifier = 500, - GlobalIndexRgbColor = 600, - GlobalIndexCountry = 700, + GlobalIndexITimestampBased = 400, + GlobalIndexCIdentifier = 500, + GlobalIndexCRgbColor = 600, + GlobalIndexCCountry = 700, GlobalIndexCCallsign = 1000, - GlobalIndexCAircraftSituation = 1200, - GlobalIndexCAtcStation = 1300, - GlobalIndexCAirport = 1400, - GlobalIndexCAircraftParts = 1500, - GlobalIndexCAircraftLights = 1600, - GlobalIndexCLivery = 1700, + GlobalIndexCAircraftSituation = 1100, + GlobalIndexCAtcStation = 1200, + GlobalIndexCAirport = 1300, + GlobalIndexCAircraftParts = 1400, + GlobalIndexCAircraftLights = 1500, + GlobalIndexCLivery = 1600, GlobalIndexCModulator = 2000, GlobalIndexCTransponder = 2100, GlobalIndexCAircraftIcaoData = 2500, GlobalIndexCAircraftIcaoCode = 2600, GlobalIndexCAirlineIcaoCode = 2700, GlobalIndexCAirportIcaoCode = 2800, - GlobalIndexCMetar = 2900, - GlobalIndexCCloudLayer = 2910, - GlobalIndexCPresentWeather = 2920, - GlobalIndexCWindLayer = 2930, - GlobalIndexICoordinateGeodetic = 3000, - GlobalIndexCCoordinateGeodetic = 3100, - GlobalIndexCClient = 4000, - GlobalIndexCUser = 4100, - GlobalIndexCServer = 4200, - GlobalIndexCAircraftModel = 4300, - GlobalIndexCSimulatedAircraft = 4400, - GlobalIndexCTextMessage = 4600, - GlobalIndexCSimulatorSetup = 4700, - GlobalIndexCAircraftCfgEntries = 4800, - GlobalIndexCDistributor = 4900, - GlobalIndexVPilotModelRule = 5000, - GlobalIndexCVoiceRoom = 6000, - GlobalIndexCSettingKeyboardHotkey = 7000, - GlobalIndexIDatastoreInteger = 8000, - GlobalIndexIDatastoreString = 8100, + GlobalIndexCMetar = 4000, + GlobalIndexCCloudLayer = 4100, + GlobalIndexCPresentWeather = 4200, + GlobalIndexCWindLayer = 4300, + GlobalIndexICoordinateGeodetic = 5000, + GlobalIndexCCoordinateGeodetic = 5100, + GlobalIndexCClient = 6000, + GlobalIndexCUser = 6100, + GlobalIndexCServer = 6200, + GlobalIndexCUrl = 6300, + GlobalIndexCAircraftModel = 6400, + GlobalIndexCSimulatedAircraft = 6500, + GlobalIndexCTextMessage = 6600, + GlobalIndexCSimulatorSetup = 6700, + GlobalIndexCAircraftCfgEntries = 6800, + GlobalIndexCDistributor = 6900, + GlobalIndexCVPilotModelRule = 8000, + GlobalIndexCVoiceRoom = 9000, + GlobalIndexCSettingKeyboardHotkey = 10000, + GlobalIndexIDatastoreInteger = 11000, + GlobalIndexIDatastoreString = 11100, + GlobalIndexCGlobalSetup = 12000, GlobalIndexAbuseMode = 20000 // property index abused as map key or otherwise, to be removed if no longer needed }; diff --git a/src/blackmisc/rgbcolor.h b/src/blackmisc/rgbcolor.h index 0182c77ae..7285a63bc 100644 --- a/src/blackmisc/rgbcolor.h +++ b/src/blackmisc/rgbcolor.h @@ -27,7 +27,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexRed = BlackMisc::CPropertyIndex::GlobalIndexRgbColor, + IndexRed = BlackMisc::CPropertyIndex::GlobalIndexCRgbColor, IndexGreen, IndexBlue, IndexWebHex diff --git a/src/blackmisc/simulation/fscommon/vpilotmodelrule.h b/src/blackmisc/simulation/fscommon/vpilotmodelrule.h index 3565c8696..517f5cb3e 100644 --- a/src/blackmisc/simulation/fscommon/vpilotmodelrule.h +++ b/src/blackmisc/simulation/fscommon/vpilotmodelrule.h @@ -34,7 +34,7 @@ namespace BlackMisc //! Property indexes enum ColumnIndex { - IndexModelName = CPropertyIndex::GlobalIndexVPilotModelRule, + IndexModelName = CPropertyIndex::GlobalIndexCVPilotModelRule, IndexFolder, IndexTypeCode, IndexCallsignPrefix diff --git a/src/blackmisc/timestampbased.h b/src/blackmisc/timestampbased.h index 05bdc68a7..ad9da9cfe 100644 --- a/src/blackmisc/timestampbased.h +++ b/src/blackmisc/timestampbased.h @@ -26,7 +26,7 @@ namespace BlackMisc //! Properties by index enum ColumnIndex { - IndexUtcTimestamp = BlackMisc::CPropertyIndex::GlobalIndexTimestampBased, + IndexUtcTimestamp = BlackMisc::CPropertyIndex::GlobalIndexITimestampBased, IndexUtcTimestampFormattedYmdhms, IndexUtcTimestampFormattedYmdhmsz, IndexUtcTimestampFormattedDhms,