6 #ifndef SWIFT_MISC_PROCESSINFO_H
7 #define SWIFT_MISC_PROCESSINFO_H
9 #include <QCoreApplication>
28 explicit CProcessInfo(qint64 pid) : m_pid(pid), m_name(processNameFromId(pid)) {}
31 CProcessInfo(qint64 pid,
const QString &name) : m_pid(pid), m_name(name) {}
43 bool isNull()
const {
return m_pid == 0 && m_name.isEmpty(); }
49 QString convertToQString(
bool i18n =
false)
const;
52 static QString processNameFromId(qint64 pid);
Value class identifying a process, with a PID and a name.
CProcessInfo(qint64 pid)
Construct an object identifying the process with the given PID.
bool exists() const
True if this object identifies a process that exists.
bool isNull() const
Empty process info.
CProcessInfo(qint64 pid, const QString &name)
Construct an object identifying a process with the given PID and name.
CProcessInfo()
Construct an object identifying an invalid process.
qint64 processId() const
Get the pid.
static CProcessInfo currentProcess()
Return an object identifying the current process.
const QString & processName() const
Get the process name.
Mix of the most commonly used mixin classes.
Free functions in swift::misc.
#define SWIFT_MISC_EXPORT
Export a class or function from the library.
#define SWIFT_DECLARE_VALUEOBJECT_MIXINS(Namespace, Class)
Explicit template declaration of mixins for a CValueObject subclass to be placed near the top of the ...