swift
Loading...
Searching...
No Matches
swift::misc::CProcessInfo Class Reference

Value class identifying a process, with a PID and a name. More...

#include <processinfo.h>

Inheritance diagram for swift::misc::CProcessInfo:
[legend]

Public Member Functions

 CProcessInfo ()=default
 Construct an object identifying an invalid process.
 CProcessInfo (qint64 pid)
 Construct an object identifying the process with the given PID.
 CProcessInfo (qint64 pid, const QString &name)
 Construct an object identifying a process with the given PID and name.
bool exists () const
 True if this object identifies a process that exists.
qint64 processId () const
 Get the pid.
bool isNull () const
 Empty process info.
const QString & processName () const
 Get the process name.
QString convertToQString (bool i18n=false) const
 Cast as QString.
Public Member Functions inherited from swift::misc::mixin::MetaType< CProcessInfo >
int getMetaTypeId () const
 Returns the Qt meta type ID of this object.
QString getClassName () const
 Class name.
bool isA (int metaTypeId) const
 Returns true if this object is an instance of the class with the given meta type ID, or one of its subclasses.
Public Member Functions inherited from swift::misc::mixin::DBusByMetaClass< CProcessInfo >
void marshallToDbus (QDBusArgument &arg, Tags...) const
 Marshall without begin/endStructure, for when composed within another object.
void unmarshallFromDbus (const QDBusArgument &arg, Tags...)
 Unmarshall without begin/endStructure, for when composed within another object.
Public Member Functions inherited from swift::misc::mixin::DataStreamByMetaClass< CProcessInfo >
void marshalToDataStream (QDataStream &stream) const
 Marshal a value to a QDataStream.
void unmarshalFromDataStream (QDataStream &stream)
 Unmarshal a value from a QDataStream.
Public Member Functions inherited from swift::misc::mixin::JsonByMetaClass< CProcessInfo >
QJsonObject toJson () const
 Cast to JSON object.
QString toJsonString (QJsonDocument::JsonFormat format=QJsonDocument::Indented) const
 Convenience function JSON as string.
void convertFromJson (const QJsonObject &json)
 Assign from JSON object.
Public Member Functions inherited from swift::misc::mixin::String< CProcessInfo >
QString toQString (bool i18n=false) const
 Cast as QString.
std::string toStdString (bool i18n=false) const
 To std string.
QString stringForStreaming () const
 String for streaming operators.
Public Member Functions inherited from swift::misc::mixin::Index< CProcessInfo >
CPropertyIndexList apply (const CPropertyIndexVariantMap &indexMap, bool skipEqualValues=false)
 Update by variant map.
void setPropertyByIndex (CPropertyIndexRef index, const QVariant &variant)
 Set property by index.
QVariant propertyByIndex (CPropertyIndexRef index) const
 Property by index.
int comparePropertyByIndex (CPropertyIndexRef index, const CProcessInfo &compareValue) const
 Compare for index.
bool equalsPropertyByIndex (const QVariant &compareValue, CPropertyIndexRef index) const
 Is given variant equal to value of property index?
Public Member Functions inherited from swift::misc::mixin::Icon< CProcessInfo >
CIcons::CIcons::StandardIconUnknown16 toIcon () const
 As icon, not implemented by all classes.

Static Public Member Functions

static CProcessInfo currentProcess ()
 Return an object identifying the current process.
Static Public Member Functions inherited from swift::misc::mixin::MetaType< CProcessInfo >
static void registerMetadata ()
 Register metadata.
Static Public Member Functions inherited from swift::misc::mixin::JsonByMetaClass< CProcessInfo >
static DerivedObj fromJson (const QJsonObject &json)
 Get object from QJsonObject.
static DerivedObj fromJsonNoThrow (const QString &jsonString, bool acceptCacheJson, bool &success, QString &errMsg)
 Get object from JSON string.

Additional Inherited Members

Public Types inherited from swift::misc::CValueObject< CProcessInfo >
using base_type
 Base class.
Public Types inherited from swift::misc::CEmpty
using base_type = CEmpty
 Base class is alias of itself.
Public Types inherited from swift::misc::mixin::Index< CProcessInfo >
enum  ColumnIndex
 Base class enums. More...
Protected Member Functions inherited from swift::misc::CValueObject< CProcessInfo >
 CEmpty ()=default
 Inheriting constructors.
 CEmpty (const CEmpty &)=default
 Inheriting constructors.
 CValueObject ()=default
 Default constructor.
CValueObject & operator= (const CValueObject &)=default
 Copy assignment operator.
 ~CValueObject ()=default
 Destructor.
Protected Member Functions inherited from swift::misc::CEmpty
 CEmpty ()=default
 Protected default constructor.
 CEmpty (const CEmpty &)=default
 Protected copy constructor.
CEmpty & operator= (const CEmpty &)=default
 Protected copy assignment operator.
 ~CEmpty ()=default
 Non-virtual protected destructor.

Detailed Description

Value class identifying a process, with a PID and a name.

Definition at line 21 of file processinfo.h.

Constructor & Destructor Documentation

◆ CProcessInfo() [1/2]

swift::misc::CProcessInfo::CProcessInfo ( qint64 pid)
inlineexplicit

Construct an object identifying the process with the given PID.

Definition at line 28 of file processinfo.h.

◆ CProcessInfo() [2/2]

swift::misc::CProcessInfo::CProcessInfo ( qint64 pid,
const QString & name )
inline

Construct an object identifying a process with the given PID and name.

Definition at line 31 of file processinfo.h.

Member Function Documentation

◆ convertToQString()

QString swift::misc::CProcessInfo::convertToQString ( bool i18n = false) const

Cast as QString.

Definition at line 28 of file processinfo.cpp.

◆ currentProcess()

CProcessInfo swift::misc::CProcessInfo::currentProcess ( )
inlinestatic

Return an object identifying the current process.

Definition at line 34 of file processinfo.h.

◆ exists()

bool swift::misc::CProcessInfo::exists ( ) const
inline

True if this object identifies a process that exists.

Definition at line 37 of file processinfo.h.

◆ isNull()

bool swift::misc::CProcessInfo::isNull ( ) const
inline

Empty process info.

Definition at line 43 of file processinfo.h.

◆ processId()

qint64 swift::misc::CProcessInfo::processId ( ) const
inline

Get the pid.

Definition at line 40 of file processinfo.h.

◆ processName()

const QString & swift::misc::CProcessInfo::processName ( ) const
inline

Get the process name.

Definition at line 46 of file processinfo.h.


The documentation for this class was generated from the following files: