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. More... | |
KLF_EXPORT QString | arch () |
The architecture of this sytem. More... | |
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. More... | |
KLF_EXPORT QString | osString (KLFSysInfo::Os sysos=os()) |
The operating system we are running, returned as a string. More... | |
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 sizeofVoidStar().
KLF_EXPORT KLFSysInfo::BatteryInfo KLFSysInfo::batteryInfo | ( | ) |
Definition at line 110 of file klfsysinfo.cpp.
References _klf_linux_battery_info(), _klf_mac_battery_info(), and _klf_win_battery_info().
KLF_EXPORT bool KLFSysInfo::isCompatibleSysArch | ( | const QString & | sysarch | ) |
Definition at line 46 of file klfsysinfo.cpp.
References QString::indexOf(), KLF_FUNC_NAME, klfDbg, QString::left(), QString::mid(), osString(), QString::replace(), and QString::split().
Referenced by sizeofVoidStar().
KLF_EXPORT bool KLFSysInfo::isLaptop | ( | ) |
Definition at line 125 of file klfsysinfo.cpp.
KLF_EXPORT bool KLFSysInfo::isOnBatteryPower | ( | ) |
Definition at line 140 of file klfsysinfo.cpp.
References _klf_linux_is_on_battery_power(), _klf_mac_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.
Referenced by sizeofVoidStar().
KLF_EXPORT KLFSysInfo::Os KLFSysInfo::os | ( | ) |
Which operating system this system is running.
Definition at line 69 of file klfsysinfo.cpp.
References Linux, MacOsX, OtherOs, and Win32.
Referenced by sizeofVoidStar().
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 _klf_linux_battery_info(), _klf_linux_is_laptop(), _klf_linux_is_on_battery_power(), _klf_mac_battery_info(), _klf_mac_is_laptop(), _klf_mac_is_on_battery_power(), _klf_win_battery_info(), _klf_win_is_laptop(), _klf_win_is_on_battery_power(), Linux, MacOsX, OtherOs, and Win32.
Referenced by isCompatibleSysArch(), and 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.
References arch(), isCompatibleSysArch(), KLF_EXPORT, makeSysArch(), os(), and osString().