HardwareSpec
Qualified name: mv::util::HardwareSpec
-
class HardwareSpec
Public Types
-
enum class Type
Hardware specification type.
Values:
-
enumerator System
-
enumerator Minimum
System hardware specification.
-
enumerator Recommended
Minimum hardware specification.
Recommended hardware specification
-
enumerator System
-
enum class SystemCompatibility
Enum for system hardware spec compatibility with other specifications.
Values:
-
enumerator Incompatible
-
enumerator Minimum
Incompatible with the minimum and recommended hardware specification.
-
enumerator Compatible
Compatible with the minimum hardware specification only.
-
enumerator Unknown
Compatible with the minimum and recommended hardware specification.
Unknown compatibility
-
enumerator Incompatible
Public Functions
-
HardwareSpec(const Type &type)
Construct with hardware specification
type.- Parameters:
type – Hardware specification type
-
void fromVariantMap(const QVariantMap &variantMap)
Load the hardware spec from
variantMap.- Parameters:
variantMap – Variant map containing the hardware spec properties
-
void fromSystem()
Initialize from system hardware specifications.
-
bool isInitialized() const
Get whether the hardware spec has been initialized.
- Returns:
Boolean determining whether the hardware spec has been initialized
Get the hardware component specification by
name.- Parameters:
name – Name of the hardware component specification
- Returns:
Hardware component specification with the given name
-
HardwareComponentSpecs getHardwareComponentSpecs(bool initializedOnly = true) const
Get the hardware component specifications.
- Parameters:
initializedOnly – Whether to only return initialized hardware component specifications
- Returns:
Hardware component specifications
-
inline bool operator==(const HardwareSpec &other) const
Get whether the hardware specification is equal to the
otherhardware specification.- Parameters:
other – Other hardware specification to compare with
- Returns:
Boolean determining whether the hardware specification is equal to the
otherhardware specification
-
inline bool operator!=(const HardwareSpec &other) const
Get whether the hardware specification is not equal to the
otherhardware specification.- Parameters:
other – Other hardware specification to compare with
- Returns:
Boolean determining whether the hardware specification is not equal to the
otherhardware specification
-
inline bool operator<(const HardwareSpec &other) const
Get whether the hardware specification is smaller than the
otherhardware specification.- Returns:
Boolean determining whether the hardware specification is smaller than the
otherhardware specification
-
inline bool operator>(const HardwareSpec &other) const
Get whether the hardware specification is larger than the
otherhardware specification.- Returns:
Boolean determining whether the hardware specification is larger than the
otherhardware specification
-
inline bool operator<=(const HardwareSpec &other) const
Get whether the hardware specification is equal to or smaller than the
otherhardware specification.- Parameters:
other – Other hardware specification to compare with
- Returns:
Boolean determining whether the hardware specification is equal to or smaller than the
otherhardware specification
-
inline bool operator>=(const HardwareSpec &other) const
Get whether the hardware specification is equal to or larger than the
otherhardware specification.- Parameters:
other – Other hardware specification to compare with
- Returns:
Boolean determining whether the hardware specification is equal to or larger than the
otherhardware specification
-
bool meets(const HardwareSpec &required) const
Get whether the hardware specification meets the
requiredhardware specification.- Parameters:
required – Hardware spec that is required
- Returns:
Boolean determining whether the hardware specification meets the
requiredhardware specification
-
QString getFailureString(const HardwareSpec &required) const
Get the reason why the hardware component spec does not meet the
requiredhardware component spec.- Parameters:
required – Hardware component spec that is required
- Returns:
String containing the reason why the hardware component spec does not meet the required hardware component spec
Public Static Functions
-
static const HardwareSpec &getSystemHardwareSpec()
Get system hardware specification.
- Returns:
System hardware specification
-
static void updateSystemHardwareSpecs()
Updates the system hardware specifications.
-
static SystemCompatibilityInfo getSystemCompatibility(const HardwareSpec &minimumHardwareSpec, const HardwareSpec &recommendedHardwareSpec)
Get system compatibility with the minimum and recommended hardware specifications.
- Parameters:
minimumHardwareSpec – Minimum hardware specification
recommendedHardwareSpec – Recommended hardware specification
- Returns:
System compatibility info with the minimum and recommended hardware specifications
-
struct SystemCompatibilityInfo
System compatibility information.
-
enum class Type