Go to the documentation of this file.
28 #include <QStringList>
55 qWarning()<<
KLF_FUNC_NAME<<
": Invalid sysarch string "<<sysarch;
59 if (thisos != sysarch.
left(ic)) {
60 klfDbg(
"incompatible architectures (this one)="<<thisos<<
" and (tested)="<<sysarch) ;
65 klfDbg(
"testing if our arch="<<thisarch<<
" is in the compatible arch list="<<archlist) ;
71 #if defined(Q_OS_LINUX)
73 #elif defined(Q_OS_DARWIN)
75 #elif defined(Q_OS_WIN32)
91 qWarning(
"KLFSysInfo::osString: unknown OS: %d", sysos);
100 #elif defined(Q_OS_LINUX)
104 #elif defined(Q_OS_WIN32)
116 #if defined(Q_OS_DARWIN)
118 #elif defined(Q_OS_LINUX)
120 #elif defined(Q_OS_WIN32)
128 static int _klf_cached_islaptop = -1;
132 if (_klf_cached_islaptop >= 0)
133 return (
bool) _klf_cached_islaptop;
135 #if defined(Q_OS_DARWIN)
137 #elif defined(Q_OS_LINUX)
139 #elif defined(Q_OS_WIN32)
145 return (
bool) _klf_cached_islaptop;
150 #if defined(Q_OS_DARWIN)
152 #elif defined(Q_OS_LINUX)
154 #elif defined(Q_OS_WIN32)
KLF_EXPORT bool isCompatibleSysArch(const QString &sysarch)
KLF_EXPORT KLFSysInfo::Os os()
Which operating system this system is running.
KLF_EXPORT bool _klf_mac_is_laptop()
QStringList split(const QString &sep, SplitBehavior behavior, Qt::CaseSensitivity cs) const
@ OtherOs
systems on which neither Q_OS_{LINUX|WIN32|DARWIN} is defined
KLF_EXPORT bool _klf_linux_is_laptop()
bool contains(const QString &str, Qt::CaseSensitivity cs) const
KLF_EXPORT QString makeSysArch(const QString &os, const QString &arch)
KLF_EXPORT bool _klf_win_is_laptop()
KLF_EXPORT KLFSysInfo::BatteryInfo _klf_win_battery_info()
KLF_EXPORT BatteryInfo batteryInfo()
#define klfDbg(streamableItems)
print debug stream items
@ MacOsX
systems on which Q_OS_DARWIN is defined
KLF_EXPORT QString arch()
The architecture of this sytem.
QString klf_defs_sysinfo_arch()
KLFSysInfo::BatteryInfo _klf_otheros_battery_info()
int indexOf(QChar ch, int from, Qt::CaseSensitivity cs) const
KLF_EXPORT bool _klf_win_is_on_battery_power()
KLF_EXPORT bool _klf_linux_is_on_battery_power()
QString & replace(int position, int n, QChar after)
Os
List of known operating systems.
@ Win32
systems on which Q_OS_WIN32 is defined
KLF_EXPORT bool isLaptop()
QString left(int n) const
KLF_EXPORT bool isOnBatteryPower()
KLF_EXPORT KLFSysInfo::BatteryInfo _klf_linux_battery_info(bool want_info_onbatterypower)
bool _klf_otheros_is_laptop()
KLF_EXPORT QString osString(KLFSysInfo::Os sysos=os())
The operating system we are running, returned as a string.
KLF_EXPORT KLFSysInfo::BatteryInfo _klf_mac_battery_info()
QString mid(int position, int n) const
Base declarations for klatexformula and some utilities.
bool _klf_otheros_is_on_battery_power()
@ Linux
systems on which Q_OS_LINUX is defined
KLF_EXPORT bool _klf_mac_is_on_battery_power()
#define KLF_DEBUG_TEE(expr)
Print the value of expression and return it.
Generated by doxygen 1.8.20