6 #ifndef SWIFT_MISC_PLATFORM_H
7 #define SWIFT_MISC_PLATFORM_H
29 IndexPlatform = CPropertyIndexRef::GlobalIndexCPlatform
41 AllWindows = Win32 | Win64,
42 All = AllWindows | Linux | MacOS,
44 All64 = Win64 | Linux | MacOS
46 Q_DECLARE_FLAGS(Platform, PlatformFlag)
58 Platform
getPlatform()
const {
return static_cast<Platform
>(m_platform); }
61 PlatformFlag getPlatformFlag()
const;
64 bool matchesAny(
const CPlatform &otherPlatform)
const;
67 int numberPlatforms()
const;
70 bool isSinglePlatform()
const;
73 bool isAnyWindows()
const;
76 QString getPlatformName()
const;
82 bool isUnknown()
const {
return m_platform ==
static_cast<int>(UnknownOs); }
91 QString convertToQString(
bool i18n =
false)
const;
103 operator QString() {
return this->toQString(); }
106 static Platform stringToPlatform(
const QString &str);
109 const static CPlatform &stringToPlatformObject(
const QString &str);
112 static const CPlatform ¤tPlatform();
115 static bool isCurrentPlatform(
const QString &platform);
118 static bool isCurrentPlatform(
const CPlatform &platform);
121 static bool canRunOnCurrentPlatform(
const CPlatform &platform);
145 int m_platform =
static_cast<int>(UnknownOs);
154 Q_DECLARE_METATYPE(swift::misc::CPlatform::Platform)
156 Q_DECLARE_OPERATORS_FOR_FLAGS(swift::misc::CPlatform::Platform)
IconIndex
Index for each icon, allows to send them via DBus, efficiently store them, etc.
Non-owning reference to a CPropertyIndex with a subset of its features.
Mix of the most commonly used mixin classes.
ColumnIndex
Base class enums.
Free functions in swift::misc.
#define SWIFT_MISC_EXPORT
Export a class or function from the library.
#define SWIFT_DECLARE_VALUEOBJECT_MIXINS(Namespace, Class)
Explicit template declaration of mixins for a CValueObject subclass to be placed near the top of the ...