DtkCore
DTK Core module
|
dsysinfo 是一组用于查询系统信息的静态类 更多...
Public 类型 | |
enum | ProductType { UnknownType = 0 , Deepin , ArchLinux , CentOS , Debian , Fedora , LinuxMint , Manjaro , openSUSE , SailfishOS , Ubuntu , Uos , Gentoo , NixOS } |
产品信息 更多... | |
enum | DeepinType { UnknownDeepin = 0 , DeepinDesktop , DeepinProfessional , DeepinServer , DeepinPersonal } |
深度操作系统版本 更多... | |
enum | LogoType { Normal = 0 , Light , Symbolic , Transparent } |
系统的logo类型 更多... | |
enum | OrgType { Distribution , Distributor , Manufacturer } |
enum | UosType { UosTypeUnknown , UosDesktop , UosServer , UosDevice , UosTypeCount } |
UOS版本类型 更多... | |
enum | UosEdition { UosEditionUnknown , UosProfessional , UosHome , UosCommunity , UosMilitary , UosEnterprise , UosEnterpriseC , UosEuler , UosMilitaryS , UosDeviceEdition , UosEducation , UosEditionCount } |
详细uos版本 更多... | |
enum | UosArch { UosArchUnknown , UosAMD64 = 1 << 0 , UosARM64 = 1 << 1 , UosMIPS64 = 1 << 2 , UosSW64 = 1 << 3 } |
UOS使用的架构 更多... | |
enum | Arch { ARM64 , ARM64_BE , ARM , ARM_BE , ALPHA , SW_64 , ARC , ARC_BE , CRIS , X86_64 , X86 , IA64 , LOONGARCH64 , M68K , MIPS64_LE , MIPS64 , MIPS_LE , MIPS , NIOS2 , PARISC64 , PARISC , PPC64_LE , PPC64 , PPC , PPC_LE , RISCV32 , RISCV64 , S390X , S390 , SH64 , SH , SPARC64 , SPARC , TILEGX , NUM_ARCHES } |
Public 成员函数 | |
Q_ENUM (Arch) static bool isDeepin() | |
Q_DECL_DEPRECATED_X ("Use arch() instead") static UosType uosType() | |
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 bool | isDDE () |
是否使用dde桌面环境 更多... | |
static DeepinType | deepinType () |
deepin系统类型 更多... | |
static QString | deepinTypeDisplayName (const QLocale &locale=QLocale::system()) |
显示的deepin发行版类型名称 更多... | |
static QString | deepinVersion () |
deepin版本 更多... | |
static QString | deepinEdition () |
static QString | deepinCopyright () |
deepin 开源许可协议 更多... | |
static UosEdition | uosEditionType () |
DSysInfo::osEditionType 版本类型 显示版本类型 专业版/个人版/社区版.. 更多... | |
static UosArch | uosArch () |
DSysInfo::osArch 架构信息 更多... | |
static QString | uosProductTypeName (const QLocale &locale=QLocale::system()) |
static QString | uosSystemName (const QLocale &locale=QLocale::system()) |
SystemName[xx] 项对应的值 更多... | |
static QString | uosEditionName (const QLocale &locale=QLocale::system()) |
static QString | spVersion () |
阶段版本名称 更多... | |
static QString | udpateVersion () |
更新版本名称 小版本号 A-BC-D 中 D、A.B.C 模式中的 C 返回 update1… update9, 如果正式版返回空 X.Y.Z模式下暂不支持返回此版本号 更多... | |
static QString | majorVersion () |
主版本号 主版本号 【20】【23】【25】【26】【29】【30】 更多... | |
static QString | minorVersion () |
小版本号 【ABCD】 ·[0-9]{4} 【A.B.C】 或者【X.Y.Z】 更多... | |
static QString | buildVersion () |
小版本号 系统镜像批次号, 按时间顺序(不可回退)从100-999递增 更多... | |
static QString | distributionInfoPath () |
static QString | distributionInfoSectionName (OrgType type) |
返回distribution.info 文件中SectionName字段的值 | |
static QString | distributionOrgName (OrgType type=Distribution, const QLocale &locale=QLocale::system()) |
返回组织名称 更多... | |
static QPair< QString, QString > | distributionOrgWebsite (OrgType type=Distribution) |
发行版组织的网站名称和网址。使用 type 作为 Distribution 获取当前 deepin 发行版本身的名称。 | |
static QString | distributionOrgLogo (OrgType orgType=Distribution, LogoType type=Normal, const QString &fallback=QString()) |
获得的组织logo路径, 如果不存在, 则返回给定的其他路径 更多... | |
static QString | operatingSystemName () |
操作系统名 | |
static ProductType | productType () |
产品类型 | |
static QString | productTypeString () |
static QString | productVersion () |
产品版本 | |
static bool | isCommunityEdition () |
检查当前版本是否是社区版 开发者可以使用这种方式来检查我们是否需要启用或禁用社区版或企业版的功能。 更多... | |
static QString | computerName () |
电脑名 | |
static QString | cpuModelName () |
cpu模式名 | |
static qint64 | memoryInstalledSize () |
内存安装大小 | |
static qint64 | memoryTotalSize () |
实际内存大小 | |
static qint64 | systemDiskSize () |
系统磁盘大小 | |
static QDateTime | bootTime () |
系统启动时间点 | |
static QDateTime | shutdownTime () |
上一次正常关机时间点(重启也会被记录在内) | |
static qint64 | uptime () |
系统启动到现在时长 更多... | |
static Arch | arch () |
cpu架构信息 更多... | |
Public 属性 | |
const QString & | fallback = QString()) |
dsysinfo 是一组用于查询系统信息的静态类
深度操作系统版本
值 | 序号 | 含义 |
---|---|---|
UnknownDeepin | 0 | 未知版本 |
DeepinDesktop | 1 | deepin桌面发行版 |
DeepinProfessional | 2 | deepin专业版, 现为uos专业版 |
DeepinServer | 3 | deepin服务器版本, 现为uos服务器版 |
DeepinPersonal | 4 | deepin个人版, 现为uos家庭版 |
系统的logo类型
值 | 序号 | 含义 |
---|---|---|
Normal | 0 | 正常 |
Light | 1 | 亮色 |
Symbolic | 2 | 符号 |
Transparent | 3 | 水印 |
值 | 序号 | 含义 |
---|---|---|
Distribution | 0 | 当前版本 |
Distributor | 1 | 当前发行版 |
Manufacturer | 2 | 当前发行版或设备的制造商 |
产品信息
值 | 序号 | 含义 |
---|---|---|
UnknownType | 0 | 未知类型 |
deepin | 1 | 深度社区版 |
ArchLinux | 2 | |
CentOS | 3 | |
Debian | 4 | |
Fedora | 5 | |
LinuxMint | 6 | |
Manjaro | 7 | |
openSUSE | 8 | |
SailfishOS | 9 | |
Ubuntu | 10 | |
Uos | 11 | |
Gentoo | 12 | |
NixOS | 13 |
UOS使用的架构
值 | 序号 | 含义 |
---|---|---|
UosArchUnknown | 0 | 未知架构 |
UosAMD64 | 1 | x86_64 |
UosARM64 | 2 | arm64 |
UosMIPS64 | 4 | mips64 |
UosSW64 | 8 | sw_64 |
详细uos版本
值 | 序号 | 含义 |
---|---|---|
UosEditionUnknown | 0 | 未知发行版 |
UosProfessional | 1 | UOS专业版 |
UosHome | 2 | UOS家庭版 |
UosCommunity | 3 | 社区版 |
UosMilitary | 4 | * |
UosEnterprise | 5 | UOS企业版 |
UosEnterpriseC | 6 | UOS行业版 |
UosEuler | 7 | UOS服务器欧拉版 |
UosMilitaryS | 8 | * |
UosDeviceEdition | 9 | UOS专用设备版 |
UosEducation | 10 | UOS教育版 |
UosEditionCount | 11 | 记录枚举数量 |
UOS版本类型
值 | 序号 | 含义 |
---|---|---|
UosTypeUnknown | 0 | 未知版本 |
UosDesktop | 1 | UOS桌面版 |
UosServer | 2 | UOS服务器版 |
UosDevice | 3 | UOS设备版 |
UosTypeCount | 4 | 记录枚举数量 |
|
static |
cpu架构信息
|
static |
小版本号 系统镜像批次号, 按时间顺序(不可回退)从100-999递增
|
static |
deepin 开源许可协议
|
static |
deepin系统类型
|
static |
显示的deepin发行版类型名称
|
static |
deepin版本
|
static |
@brie 返回distribution文件地址 一般在/usr/share/deepin/
目录下
|
static |
获得的组织logo路径, 如果不存在, 则返回给定的其他路径
使用 type 作为 Distribution 获取当前 deepin 发行版本身的logo。
|
static |
返回组织名称
使用类型为Distribution来获取当前deepin distribution本身的名称
|
static |
检查当前版本是否是社区版 开发者可以使用这种方式来检查我们是否需要启用或禁用社区版或企业版的功能。
目前的规则: 专业版、服务器版、个人版(DeepinType)将被视为企业版。
Uos(ProductType)将被视为企业版。
|
static |
是否使用dde桌面环境
|
static |
主版本号 主版本号 【20】【23】【25】【26】【29】【30】
|
static |
小版本号 【ABCD】 ·[0-9]{4} 【A.B.C】 或者【X.Y.Z】
|
static |
阶段版本名称
小版本号 A-BC-D 中 BC、 A.B.C 中的 B 返回 SP1-SPxx, 如果正式版返回空 X.Y.Z模式下暂不支持返回此版本号
|
static |
更新版本名称 小版本号 A-BC-D 中 D、A.B.C 模式中的 C 返回 update1… update9, 如果正式版返回空 X.Y.Z模式下暂不支持返回此版本号
|
static |
DSysInfo::osArch 架构信息
(使用一个字节的二进制位, 从低位到高位) 【0x8 sw64】【0x4 mips64】【0x2 arm64】【0x1 amd64】
|
static |
DSysInfo::osEditionType 版本类型 显示版本类型 专业版/个人版/社区版..
|
static |
SystemName[xx] 项对应的值
如果找不到对应语言的默认使用 SystemName 的值 Uniontech OS locale 当前系统语言
|
static |
系统启动到现在时长
cat /proc/uptime
命令