mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 11:55:35 +08:00
refs #478 minor improvements
* updated / clean-up of global property indexes * beta test function in CProject * typo in math utils
This commit is contained in:
committed by
Mathew Sutcliffe
parent
805ebb109b
commit
dff7ed5a90
@@ -30,7 +30,7 @@ namespace BlackMisc
|
|||||||
//! Properties by index
|
//! Properties by index
|
||||||
enum ColumnIndex
|
enum ColumnIndex
|
||||||
{
|
{
|
||||||
IndexIsoCode = BlackMisc::CPropertyIndex::GlobalIndexCountry,
|
IndexIsoCode = BlackMisc::CPropertyIndex::GlobalIndexCCountry,
|
||||||
IndexName,
|
IndexName,
|
||||||
IndexNameIso,
|
IndexNameIso,
|
||||||
IndexIsoName
|
IndexIsoName
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ namespace BlackMisc
|
|||||||
//! Properties by index
|
//! Properties by index
|
||||||
enum ColumnIndex
|
enum ColumnIndex
|
||||||
{
|
{
|
||||||
IndexName = BlackMisc::CPropertyIndex::GlobalIndexIdentifier,
|
IndexName = BlackMisc::CPropertyIndex::GlobalIndexCIdentifier,
|
||||||
IndexMachineId,
|
IndexMachineId,
|
||||||
IndexMachineIdBase64,
|
IndexMachineIdBase64,
|
||||||
IndexMachineName,
|
IndexMachineName,
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ namespace BlackMisc
|
|||||||
static double normalizeDegrees(double degrees);
|
static double normalizeDegrees(double degrees);
|
||||||
|
|
||||||
//! Random number between low and high
|
//! 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;
|
return qrand() % ((high + 1) - low) + low;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -190,6 +190,12 @@ namespace BlackMisc
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool CProject::isBetaTest()
|
||||||
|
{
|
||||||
|
//! \todo however we do it
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
bool CProject::isRunningOnWindowsNtPlatform()
|
bool CProject::isRunningOnWindowsNtPlatform()
|
||||||
{
|
{
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
@@ -214,6 +220,11 @@ namespace BlackMisc
|
|||||||
return p.cd("samples");
|
return p.cd("samples");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool CProject::isRunningInBetaOrDeveloperEnvironment()
|
||||||
|
{
|
||||||
|
return isBetaTest() || isRunningInDeveloperEnvironment();
|
||||||
|
}
|
||||||
|
|
||||||
int CProject::getMajorMinor(int index)
|
int CProject::getMajorMinor(int index)
|
||||||
{
|
{
|
||||||
QString v = version();
|
QString v = version();
|
||||||
|
|||||||
@@ -88,12 +88,18 @@ namespace BlackMisc
|
|||||||
//! Release build?
|
//! Release build?
|
||||||
static bool isReleaseBuild();
|
static bool isReleaseBuild();
|
||||||
|
|
||||||
|
//! Beta test?
|
||||||
|
static bool isBetaTest();
|
||||||
|
|
||||||
//! Running on Windows NT platform?
|
//! Running on Windows NT platform?
|
||||||
static bool isRunningOnWindowsNtPlatform();
|
static bool isRunningOnWindowsNtPlatform();
|
||||||
|
|
||||||
//! Running in dev.environment, so on a programmers machine
|
//! Running in dev.environment, so on a programmers machine
|
||||||
static bool isRunningInDeveloperEnvironment();
|
static bool isRunningInDeveloperEnvironment();
|
||||||
|
|
||||||
|
//! Beta / dev.environment?
|
||||||
|
static bool isRunningInBetaOrDeveloperEnvironment();
|
||||||
|
|
||||||
//! Application directory where current application is located
|
//! Application directory where current application is located
|
||||||
static QString getApplicationDir();
|
static QString getApplicationDir();
|
||||||
|
|
||||||
|
|||||||
@@ -49,43 +49,45 @@ namespace BlackMisc
|
|||||||
GlobalIndexCPhysicalQuantity = 100,
|
GlobalIndexCPhysicalQuantity = 100,
|
||||||
GlobalIndexCStatusMessage = 200,
|
GlobalIndexCStatusMessage = 200,
|
||||||
GlobalIndexCNameVariantPair = 300,
|
GlobalIndexCNameVariantPair = 300,
|
||||||
GlobalIndexTimestampBased = 400,
|
GlobalIndexITimestampBased = 400,
|
||||||
GlobalIndexIdentifier = 500,
|
GlobalIndexCIdentifier = 500,
|
||||||
GlobalIndexRgbColor = 600,
|
GlobalIndexCRgbColor = 600,
|
||||||
GlobalIndexCountry = 700,
|
GlobalIndexCCountry = 700,
|
||||||
GlobalIndexCCallsign = 1000,
|
GlobalIndexCCallsign = 1000,
|
||||||
GlobalIndexCAircraftSituation = 1200,
|
GlobalIndexCAircraftSituation = 1100,
|
||||||
GlobalIndexCAtcStation = 1300,
|
GlobalIndexCAtcStation = 1200,
|
||||||
GlobalIndexCAirport = 1400,
|
GlobalIndexCAirport = 1300,
|
||||||
GlobalIndexCAircraftParts = 1500,
|
GlobalIndexCAircraftParts = 1400,
|
||||||
GlobalIndexCAircraftLights = 1600,
|
GlobalIndexCAircraftLights = 1500,
|
||||||
GlobalIndexCLivery = 1700,
|
GlobalIndexCLivery = 1600,
|
||||||
GlobalIndexCModulator = 2000,
|
GlobalIndexCModulator = 2000,
|
||||||
GlobalIndexCTransponder = 2100,
|
GlobalIndexCTransponder = 2100,
|
||||||
GlobalIndexCAircraftIcaoData = 2500,
|
GlobalIndexCAircraftIcaoData = 2500,
|
||||||
GlobalIndexCAircraftIcaoCode = 2600,
|
GlobalIndexCAircraftIcaoCode = 2600,
|
||||||
GlobalIndexCAirlineIcaoCode = 2700,
|
GlobalIndexCAirlineIcaoCode = 2700,
|
||||||
GlobalIndexCAirportIcaoCode = 2800,
|
GlobalIndexCAirportIcaoCode = 2800,
|
||||||
GlobalIndexCMetar = 2900,
|
GlobalIndexCMetar = 4000,
|
||||||
GlobalIndexCCloudLayer = 2910,
|
GlobalIndexCCloudLayer = 4100,
|
||||||
GlobalIndexCPresentWeather = 2920,
|
GlobalIndexCPresentWeather = 4200,
|
||||||
GlobalIndexCWindLayer = 2930,
|
GlobalIndexCWindLayer = 4300,
|
||||||
GlobalIndexICoordinateGeodetic = 3000,
|
GlobalIndexICoordinateGeodetic = 5000,
|
||||||
GlobalIndexCCoordinateGeodetic = 3100,
|
GlobalIndexCCoordinateGeodetic = 5100,
|
||||||
GlobalIndexCClient = 4000,
|
GlobalIndexCClient = 6000,
|
||||||
GlobalIndexCUser = 4100,
|
GlobalIndexCUser = 6100,
|
||||||
GlobalIndexCServer = 4200,
|
GlobalIndexCServer = 6200,
|
||||||
GlobalIndexCAircraftModel = 4300,
|
GlobalIndexCUrl = 6300,
|
||||||
GlobalIndexCSimulatedAircraft = 4400,
|
GlobalIndexCAircraftModel = 6400,
|
||||||
GlobalIndexCTextMessage = 4600,
|
GlobalIndexCSimulatedAircraft = 6500,
|
||||||
GlobalIndexCSimulatorSetup = 4700,
|
GlobalIndexCTextMessage = 6600,
|
||||||
GlobalIndexCAircraftCfgEntries = 4800,
|
GlobalIndexCSimulatorSetup = 6700,
|
||||||
GlobalIndexCDistributor = 4900,
|
GlobalIndexCAircraftCfgEntries = 6800,
|
||||||
GlobalIndexVPilotModelRule = 5000,
|
GlobalIndexCDistributor = 6900,
|
||||||
GlobalIndexCVoiceRoom = 6000,
|
GlobalIndexCVPilotModelRule = 8000,
|
||||||
GlobalIndexCSettingKeyboardHotkey = 7000,
|
GlobalIndexCVoiceRoom = 9000,
|
||||||
GlobalIndexIDatastoreInteger = 8000,
|
GlobalIndexCSettingKeyboardHotkey = 10000,
|
||||||
GlobalIndexIDatastoreString = 8100,
|
GlobalIndexIDatastoreInteger = 11000,
|
||||||
|
GlobalIndexIDatastoreString = 11100,
|
||||||
|
GlobalIndexCGlobalSetup = 12000,
|
||||||
GlobalIndexAbuseMode = 20000 // property index abused as map key or otherwise, to be removed if no longer needed
|
GlobalIndexAbuseMode = 20000 // property index abused as map key or otherwise, to be removed if no longer needed
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ namespace BlackMisc
|
|||||||
//! Properties by index
|
//! Properties by index
|
||||||
enum ColumnIndex
|
enum ColumnIndex
|
||||||
{
|
{
|
||||||
IndexRed = BlackMisc::CPropertyIndex::GlobalIndexRgbColor,
|
IndexRed = BlackMisc::CPropertyIndex::GlobalIndexCRgbColor,
|
||||||
IndexGreen,
|
IndexGreen,
|
||||||
IndexBlue,
|
IndexBlue,
|
||||||
IndexWebHex
|
IndexWebHex
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ namespace BlackMisc
|
|||||||
//! Property indexes
|
//! Property indexes
|
||||||
enum ColumnIndex
|
enum ColumnIndex
|
||||||
{
|
{
|
||||||
IndexModelName = CPropertyIndex::GlobalIndexVPilotModelRule,
|
IndexModelName = CPropertyIndex::GlobalIndexCVPilotModelRule,
|
||||||
IndexFolder,
|
IndexFolder,
|
||||||
IndexTypeCode,
|
IndexTypeCode,
|
||||||
IndexCallsignPrefix
|
IndexCallsignPrefix
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ namespace BlackMisc
|
|||||||
//! Properties by index
|
//! Properties by index
|
||||||
enum ColumnIndex
|
enum ColumnIndex
|
||||||
{
|
{
|
||||||
IndexUtcTimestamp = BlackMisc::CPropertyIndex::GlobalIndexTimestampBased,
|
IndexUtcTimestamp = BlackMisc::CPropertyIndex::GlobalIndexITimestampBased,
|
||||||
IndexUtcTimestampFormattedYmdhms,
|
IndexUtcTimestampFormattedYmdhms,
|
||||||
IndexUtcTimestampFormattedYmdhmsz,
|
IndexUtcTimestampFormattedYmdhmsz,
|
||||||
IndexUtcTimestampFormattedDhms,
|
IndexUtcTimestampFormattedDhms,
|
||||||
|
|||||||
Reference in New Issue
Block a user