HAL
hal::UserActionObject Class Reference

The UserActionObject class represents a single object used in UserAction. More...

#include <user_action_object.h>

Collaboration diagram for hal::UserActionObject:
Collaboration graph

Public Member Functions

 UserActionObject (u32 i=0, UserActionObjectType::ObjectType t=UserActionObjectType::None)
 
u32 id () const
 
UserActionObjectType::ObjectType type () const
 
void writeToXml (QXmlStreamWriter &xmlOut) const
 
void readFromXml (QXmlStreamReader &xmlIn)
 
QString debugDump () const
 

Detailed Description

The UserActionObject class represents a single object used in UserAction.

An object is identified by unique id and type

Definition at line 78 of file user_action_object.h.

Constructor & Destructor Documentation

◆ UserActionObject()

hal::UserActionObject::UserActionObject ( u32  i = 0,
UserActionObjectType::ObjectType  t = UserActionObjectType::None 
)
inline

Object constructor, without arguments object of type None gets constructed.

Parameters
i- The id.
t- The type.

Definition at line 87 of file user_action_object.h.

Member Function Documentation

◆ debugDump()

QString hal::UserActionObject::debugDump ( ) const

Short code for debugging purpose.

Returns
- The debug string.

Definition at line 97 of file user_action_object.cpp.

References QString::arg(), hal::UserActionObjectType::Grouping, and hal::UserActionObjectType::None.

Referenced by hal::UserAction::debugDump().

◆ id()

◆ readFromXml()

void hal::UserActionObject::readFromXml ( QXmlStreamReader xmlIn)

Reads object member variables from xml attributes "id" and "type".

Parameters
xmlIn- The file to read from.

Definition at line 113 of file user_action_object.cpp.

References QXmlStreamReader::attributes(), QStringRef::isEmpty(), QStringRef::isNull(), QStringRef::toInt(), QStringRef::toString(), and QXmlStreamAttributes::value().

Referenced by hal::UserActionManager::getParsedAction(), and hal::UserAction::readParentObjectFromXml().

◆ type()

◆ writeToXml()

void hal::UserActionObject::writeToXml ( QXmlStreamWriter xmlOut) const

Persist object to xml attributes "id" and "type".

Parameters
xmlOut- The file to write to.

Definition at line 106 of file user_action_object.cpp.

References hal::UserActionObjectType::None, QString::number(), hal::UserActionObjectType::toString(), and QXmlStreamWriter::writeAttribute().

Referenced by hal::UserActionManager::setStopRecording(), and hal::UserAction::writeParentObjectToXml().


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