Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QOperatingSystemVersionBase Class Reference

#include <qoperatingsystemversion.h>

+ Inheritance diagram for QOperatingSystemVersionBase:
+ Collaboration diagram for QOperatingSystemVersionBase:

Public Types

enum  OSType {
  Unknown = 0 , Windows , MacOS , IOS ,
  TvOS , WatchOS , Android
}
 

Public Member Functions

constexpr QOperatingSystemVersionBase (OSType osType, int vmajor, int vminor=-1, int vmicro=-1)
 
QVersionNumber version () const
 
constexpr int majorVersion () const
 
constexpr int minorVersion () const
 
constexpr int microVersion () const
 
constexpr int segmentCount () const
 
bool isAnyOfType (std::initializer_list< OSType > types) const
 
constexpr OSType type () const
 
QString name () const
 

Static Public Member Functions

static Q_CORE_EXPORT QOperatingSystemVersionBase current ()
 
static Q_CORE_EXPORT QString name (QOperatingSystemVersionBase osversion)
 
static Q_CORE_EXPORT bool isAnyOfType (std::initializer_list< OSType > types, OSType type)
 
static constexpr OSType currentType ()
 

Protected Member Functions

 QOperatingSystemVersionBase ()=default
 

Static Protected Member Functions

static Q_CORE_EXPORT int compare (QOperatingSystemVersionBase v1, QOperatingSystemVersionBase v2)
 

Friends

bool operator> (QOperatingSystemVersionBase lhs, QOperatingSystemVersionBase rhs)
 
bool operator>= (QOperatingSystemVersionBase lhs, QOperatingSystemVersionBase rhs)
 
bool operator< (QOperatingSystemVersionBase lhs, QOperatingSystemVersionBase rhs)
 
bool operator<= (QOperatingSystemVersionBase lhs, QOperatingSystemVersionBase rhs)
 

Detailed Description

Definition at line 14 of file qoperatingsystemversion.h.

Member Enumeration Documentation

◆ OSType

Enumerator
Unknown 
Windows 
MacOS 
IOS 
TvOS 
WatchOS 
Android 

Definition at line 19 of file qoperatingsystemversion.h.

Constructor & Destructor Documentation

◆ QOperatingSystemVersionBase() [1/2]

constexpr QOperatingSystemVersionBase::QOperatingSystemVersionBase ( OSType  osType,
int  vmajor,
int  vminor = -1,
int  vmicro = -1 
)
inlineconstexpr

Definition at line 29 of file qoperatingsystemversion.h.

◆ QOperatingSystemVersionBase() [2/2]

QOperatingSystemVersionBase::QOperatingSystemVersionBase ( )
protecteddefault

Member Function Documentation

◆ compare()

int QOperatingSystemVersionBase::compare ( QOperatingSystemVersionBase  v1,
QOperatingSystemVersionBase  v2 
)
staticprotected

Definition at line 211 of file qoperatingsystemversion.cpp.

References compareVersionComponents().

+ Here is the call graph for this function:

◆ current()

QOperatingSystemVersionBase QOperatingSystemVersionBase::current ( )
static

Definition at line 123 of file qoperatingsystemversion.cpp.

Referenced by QOperatingSystemVersion::current().

+ Here is the caller graph for this function:

◆ currentType()

static constexpr OSType QOperatingSystemVersionBase::currentType ( )
inlinestaticconstexpr

Definition at line 41 of file qoperatingsystemversion.h.

References Android, IOS, MacOS, TvOS, Unknown, WatchOS, and Windows.

Referenced by QOperatingSystemVersion::currentType().

+ Here is the caller graph for this function:

◆ isAnyOfType() [1/2]

bool QOperatingSystemVersionBase::isAnyOfType ( std::initializer_list< OSType types) const
inline

Definition at line 69 of file qoperatingsystemversion.h.

References isAnyOfType(), and type().

+ Here is the call graph for this function:

◆ isAnyOfType() [2/2]

bool QOperatingSystemVersionBase::isAnyOfType ( std::initializer_list< OSType types,
OSType  type 
)
static

Definition at line 357 of file qoperatingsystemversion.cpp.

Referenced by isAnyOfType().

+ Here is the caller graph for this function:

◆ majorVersion()

constexpr int QOperatingSystemVersionBase::majorVersion ( ) const
inlineconstexpr

Definition at line 62 of file qoperatingsystemversion.h.

Referenced by QOperatingSystemVersion::majorVersion(), and name().

+ Here is the caller graph for this function:

◆ microVersion()

constexpr int QOperatingSystemVersionBase::microVersion ( ) const
inlineconstexpr

Definition at line 64 of file qoperatingsystemversion.h.

Referenced by QOperatingSystemVersion::microVersion().

+ Here is the caller graph for this function:

◆ minorVersion()

constexpr int QOperatingSystemVersionBase::minorVersion ( ) const
inlineconstexpr

Definition at line 63 of file qoperatingsystemversion.h.

Referenced by QOperatingSystemVersion::minorVersion(), and name().

+ Here is the caller graph for this function:

◆ name() [1/2]

QString QOperatingSystemVersionBase::name ( ) const
inline

Definition at line 74 of file qoperatingsystemversion.h.

References name().

Referenced by name(), and QOperatingSystemVersion::name().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ name() [2/2]

QString QOperatingSystemVersionBase::name ( QOperatingSystemVersionBase  osversion)
static

Definition at line 314 of file qoperatingsystemversion.cpp.

References Android, IOS, MacOS, majorVersion(), minorVersion(), QStringLiteral, TvOS, type(), Unknown, WatchOS, and Windows.

+ Here is the call graph for this function:

◆ segmentCount()

constexpr int QOperatingSystemVersionBase::segmentCount ( ) const
inlineconstexpr

Definition at line 66 of file qoperatingsystemversion.h.

Referenced by QOperatingSystemVersion::segmentCount().

+ Here is the caller graph for this function:

◆ type()

constexpr OSType QOperatingSystemVersionBase::type ( ) const
inlineconstexpr

Definition at line 73 of file qoperatingsystemversion.h.

Referenced by isAnyOfType(), name(), and QOperatingSystemVersion::type().

+ Here is the caller graph for this function:

◆ version()

QVersionNumber QOperatingSystemVersionBase::version ( ) const
inline

Definition at line 60 of file qoperatingsystemversion.h.

Referenced by QOperatingSystemVersion::version().

+ Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ operator<

bool operator< ( QOperatingSystemVersionBase  lhs,
QOperatingSystemVersionBase  rhs 
)
friend

Definition at line 82 of file qoperatingsystemversion.h.

◆ operator<=

bool operator<= ( QOperatingSystemVersionBase  lhs,
QOperatingSystemVersionBase  rhs 
)
friend

Definition at line 85 of file qoperatingsystemversion.h.

◆ operator>

bool operator> ( QOperatingSystemVersionBase  lhs,
QOperatingSystemVersionBase  rhs 
)
friend

Definition at line 76 of file qoperatingsystemversion.h.

◆ operator>=

bool operator>= ( QOperatingSystemVersionBase  lhs,
QOperatingSystemVersionBase  rhs 
)
friend

Definition at line 79 of file qoperatingsystemversion.h.


The documentation for this class was generated from the following files: