DtkCore
DTK Core module
Dtk::Core::DSysInfo类 参考

Public 类型

enum  ProductType {
  UnknownType = 0 , Deepin , ArchLinux , CentOS ,
  Debian , Fedora , LinuxMint , Manjaro ,
  openSUSE , SailfishOS , Ubuntu , Uos
}
 
enum  DeepinType {
  UnknownDeepin = 0 , DeepinDesktop , DeepinProfessional , DeepinServer ,
  DeepinPersonal
}
 
enum  LogoType { Normal = 0 , Light , Symbolic , Transparent }
 
enum  OrgType { Distribution , Distributor , Manufacturer }
 
enum  UosType {
  UosTypeUnknown , UosDesktop , UosServer , UosDevice ,
  UosTypeCount
}
 
enum  UosEdition {
  UosEditionUnknown , UosProfessional , UosHome , UosCommunity ,
  UosMilitary , UosEnterprise , UosEnterpriseC , UosEuler ,
  UosMilitaryS , UosDeviceEdition , UosEducation , UosEditionCount
}
 
enum  UosArch {
  UosArchUnknown , UosAMD64 = 1 << 0 , UosARM64 = 1 << 1 , UosMIPS64 = 1 << 2 ,
  UosSW64 = 1 << 3
}
 

Public 成员函数

 Q_DECL_DEPRECATED_X ("Use distributionInfoPath() instead") static QString deepinDistributionInfoPath()
 
 Q_DECL_DEPRECATED_X ("Use deepinDistributionOrgName() instead") static QString deepinDistributorName()
 
 Q_DECL_DEPRECATED_X ("Use deepinDistributionOrgWebsite() instead") static QPair< QString
 
QString deepinDistributorWebsite ()
 
 Q_DECL_DEPRECATED_X ("Use deepinDistributionOrgLogo() instead") static QString deepinDistributorLogo(LogoType type
 

静态 Public 成员函数

static QString distributionInfoPath ()
 
static QString distributionInfoSectionName (OrgType type)
 
static QString distributionOrgName (OrgType type=Distribution, const QLocale &locale=QLocale::system())
 
static QPair< QString, QString > distributionOrgWebsite (OrgType type=Distribution)
 
static QString distributionOrgLogo (OrgType orgType=Distribution, LogoType type=Normal, const QString &fallback=QString())
 
static QString operatingSystemName ()
 
static ProductType productType ()
 
static QString productTypeString ()
 
static QString productVersion ()
 
static bool isCommunityEdition ()
 Check if current edition is a community edition 更多...
 
static QString computerName ()
 
static QString cpuModelName ()
 
static qint64 memoryInstalledSize ()
 
static qint64 memoryTotalSize ()
 
static qint64 systemDiskSize ()
 

Public 属性

const QString & fallback = QString())
 

成员枚举类型说明

◆ OrgType

枚举值
Distribution 

distribution itself

Distributor 

distributer of the current distribution

Manufacturer 

manufacturer of the current distribution or device

成员函数说明

◆ distributionOrgLogo()

QString Dtk::Core::DSysInfo::distributionOrgLogo ( DSysInfo::OrgType  orgType = Distribution,
DSysInfo::LogoType  type = Normal,
const QString &  fallback = QString() 
)
static
返回
the obtained organization logo path, or the given fallback one if there are no such logo.

use type as Distribution to get the logo of current deepin distribution itself.

参见
deepinDistributionInfoPath()

◆ distributionOrgName()

QString Dtk::Core::DSysInfo::distributionOrgName ( DSysInfo::OrgType  type = Distribution,
const QLocale &  locale = QLocale::system() 
)
static
返回
the organization name.

use type as Distribution to get the name of current deepin distribution itself.

参见
deepinDistributionInfoPath()

◆ distributionOrgWebsite()

QPair< QString, QString > Dtk::Core::DSysInfo::distributionOrgWebsite ( DSysInfo::OrgType  type = Distribution)
static
返回
the organization website name and url.

use type as Distribution to get the name of current deepin distribution itself.

参见
deepinDistributionInfoPath()

◆ isCommunityEdition()

bool Dtk::Core::DSysInfo::isCommunityEdition ( )
static

Check if current edition is a community edition

Developer can use this way to check if we need enable or disable features for community or enterprise edition.

Current rule:

  • Professional, Server, Personal edition (DeepinType) will be treat as Enterprise edition.
  • Uos (ProductType) will be treat as Enterprise edition.
返回
true if it's on a community edition distro/installation

◆ memoryInstalledSize()

qint64 Dtk::Core::DSysInfo::memoryInstalledSize ( )
static
返回
the installed memory size

◆ memoryTotalSize()

qint64 Dtk::Core::DSysInfo::memoryTotalSize ( )
static
返回
the total available to use memory size

该类的文档由以下文件生成: