[KLF Backend][KLF Tools][KLF Home]
KLatexFormula Project
Classes | Enumerations | Functions
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

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

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

Referenced by isCompatibleSysArch().

KLF_EXPORT bool KLFSysInfo::isCompatibleSysArch ( const QString sysarch)
KLF_EXPORT bool KLFSysInfo::isLaptop ( )
KLF_EXPORT bool KLFSysInfo::isOnBatteryPower ( )
KLF_EXPORT QString KLFSysInfo::makeSysArch ( const QString os,
const QString arch 
)

Definition at line 42 of file klfsysinfo.cpp.

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 Linux, MacOsX, OtherOs, and Win32.

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 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.


Generated by doxygen 1.7.6.1. The KLatexFormula website is hosted on sourceforge.net