[KLF Backend][KLF Tools][KLF Home]
KLatexFormula Project
KLFSysInfo Namespace Reference

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 ()
 

Detailed Description

Utilities to get system information.

Enumeration Type Documentation

◆ Os

List of known operating systems.

Enumerator
Linux 

systems on which Q_OS_LINUX is defined

Win32 

systems on which Q_OS_WIN32 is defined

MacOsX 

systems on which Q_OS_DARWIN is defined

OtherOs 

systems on which neither Q_OS_{LINUX|WIN32|DARWIN} is defined

Definition at line 32 of file klfsysinfo.h.

Function Documentation

◆ arch()

KLF_EXPORT QString KLFSysInfo::arch ( )

The architecture of this sytem.

Returns
The current running system architecture.

Definition at line 37 of file klfsysinfo.cpp.

References klf_defs_sysinfo_arch(), and KLF_EXPORT.

Referenced by isCompatibleSysArch(), and makeSysArch().

◆ batteryInfo()

◆ isCompatibleSysArch()

KLF_EXPORT bool KLFSysInfo::isCompatibleSysArch ( const QString & sysarch)

◆ isLaptop()

KLF_EXPORT bool KLFSysInfo::isLaptop ( )

◆ isOnBatteryPower()

◆ makeSysArch()

KLF_EXPORT QString KLFSysInfo::makeSysArch ( const QString & os,
const QString & arch )

Definition at line 42 of file klfsysinfo.cpp.

References arch(), KLF_EXPORT, and os().

◆ os()

KLF_EXPORT KLFSysInfo::Os KLFSysInfo::os ( )

Which operating system this system is running.

Returns
one of the values of the Os enum.

Definition at line 69 of file klfsysinfo.cpp.

References KLF_EXPORT, Linux, MacOsX, OtherOs, and Win32.

Referenced by makeSysArch().

◆ osString()

KLF_EXPORT QString KLFSysInfo::osString ( KLFSysInfo::Os sysos = os())

The operating system we are running, returned as a string.

Returns
one of "win32", "linux", "macosx", or QString() for other/unknown.

Definition at line 82 of file klfsysinfo.cpp.

References KLF_EXPORT, Linux, MacOsX, OtherOs, and Win32.

Referenced by isCompatibleSysArch().

◆ sizeofVoidStar()

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.


Generated by doxygen 1.13.1