Utilities to get system information. More...
Classes | |
struct | BatteryInfo |
Enumerations | |
enum | Os { Linux, Win32, MacOsX, OtherOs } |
List of known operating systems. More... | |
Functions | |
int | sizeofVoidStar () |
the processor register size. | |
KLF_EXPORT QString | arch () |
The architecture of this sytem. | |
KLF_EXPORT QString | makeSysArch (const QString &os, const QString &arch) |
KLF_EXPORT bool | isCompatibleSysArch (const QString &sysarch) |
KLF_EXPORT KLFSysInfo::Os | os () |
Which operating system this system is running. | |
KLF_EXPORT QString | osString (KLFSysInfo::Os sysos=os()) |
The operating system we are running, returned as a string. | |
KLF_EXPORT BatteryInfo | batteryInfo () |
KLF_EXPORT bool | isLaptop () |
KLF_EXPORT bool | isOnBatteryPower () |
Utilities to get system information.
enum KLFSysInfo::Os |
List of known operating systems.
Definition at line 32 of file klfsysinfo.h.
KLF_EXPORT QString KLFSysInfo::arch | ( | ) |
The architecture of this sytem.
Definition at line 37 of file klfsysinfo.cpp.
References klf_defs_sysinfo_arch().
Referenced by isCompatibleSysArch().
KLF_EXPORT KLFSysInfo::BatteryInfo KLFSysInfo::batteryInfo | ( | ) |
Definition at line 114 of file klfsysinfo.cpp.
References _klf_linux_battery_info(), _klf_mac_battery_info(), _klf_otheros_battery_info(), and _klf_win_battery_info().
KLF_EXPORT bool KLFSysInfo::isCompatibleSysArch | ( | const QString & | sysarch | ) |
Definition at line 46 of file klfsysinfo.cpp.
References arch(), QStringList::contains(), QString::indexOf(), KLF_DEBUG_TEE, KLF_FUNC_NAME, klfDbg, QString::left(), QString::mid(), osString(), QString::replace(), and QString::split().
KLF_EXPORT bool KLFSysInfo::isLaptop | ( | ) |
Definition at line 130 of file klfsysinfo.cpp.
References _klf_linux_is_laptop(), _klf_mac_is_laptop(), _klf_otheros_is_laptop(), and _klf_win_is_laptop().
KLF_EXPORT bool KLFSysInfo::isOnBatteryPower | ( | ) |
Definition at line 148 of file klfsysinfo.cpp.
References _klf_linux_is_on_battery_power(), _klf_mac_is_on_battery_power(), _klf_otheros_is_on_battery_power(), and _klf_win_is_on_battery_power().
KLF_EXPORT QString KLFSysInfo::makeSysArch | ( | const QString & | os, |
const QString & | arch | ||
) |
Definition at line 42 of file klfsysinfo.cpp.
KLF_EXPORT KLFSysInfo::Os KLFSysInfo::os | ( | ) |
KLF_EXPORT QString KLFSysInfo::osString | ( | KLFSysInfo::Os | sysos = os() | ) |
The operating system we are running, returned as a string.
"win32"
, "linux"
, "macosx"
, or QString() for other/unknown. Definition at line 82 of file klfsysinfo.cpp.
References Linux, MacOsX, OtherOs, and Win32.
Referenced by isCompatibleSysArch().
int KLFSysInfo::sizeofVoidStar | ( | ) | [inline] |
the processor register size.
Typically 4 or 8 to indicate a 32-bit or a 64-bit system, respectively.
Definition at line 34 of file klfsysinfo.h.