HAL  v4.5.0-133-g64838ea8d
The Hardware Analyzer - a comprehensive reverse engineering and manipulation framework for gate-level netlists.
hal::ActionSetObjectColor Class Reference

Recolors the object. More...

#include </home/runner/work/hal/hal/plugins/gui/include/gui/user_action/action_set_object_color.h>

Inheritance diagram for hal::ActionSetObjectColor:
Inheritance graph
Collaboration diagram for hal::ActionSetObjectColor:
Collaboration graph

Public Member Functions

 ActionSetObjectColor (const QColor &col=QColor())
 
bool exec () override
 
QString tagname () const override
 
void writeToXml (QXmlStreamWriter &xmlOut) const override
 
void readFromXml (QXmlStreamReader &xmlIn) override
 
void addToHash (QCryptographicHash &cryptoHash) const override
 
- Public Member Functions inherited from hal::UserAction
virtual ~UserAction ()
 
virtual UserActionObject object () const
 
virtual void setObject (const UserActionObject &obj)
 
int compoundOrder () const
 
void setCompoundOrder (int cmpord)
 
qint64 timeStamp () const
 
QString cryptographicHash (int recordNo) const
 
UserAction * undoAction () const
 
QString debugDump () const
 
void setObjectLock (bool lock)
 
void setParentObjectLock (bool lock)
 
bool hasProjectModified () const
 

Additional Inherited Members

- Protected Member Functions inherited from hal::UserAction
 UserAction ()
 
void writeParentObjectToXml (QXmlStreamWriter &xmlOut) const
 
void readParentObjectFromXml (QXmlStreamReader &xmlIn)
 
- Static Protected Member Functions inherited from hal::UserAction
static QString setToText (const QSet< u32 > &set)
 
static QSet< u32 > setFromText (const QString &s)
 
static QString gridToText (const QHash< hal::Node, QPoint > &grid)
 
static QHash< hal::Node, QPoint > gridFromText (const QString &txt)
 
- Protected Attributes inherited from hal::UserAction
UserActionObject mObject
 
UserActionObject mParentObject
 
int mCompoundOrder
 
UserAction * mUndoAction
 
qint64 mTimeStamp
 
bool mObjectLock
 
bool mParentObjectLock
 
bool mProjectModified
 

Detailed Description

Recolors the object.

Assigns a new color to the UserActionObject's object. The object must be a Grouping or a Module.

Undo Action: ActionSetObjectColor

Definition at line 40 of file action_set_object_color.h.

Constructor & Destructor Documentation

◆ ActionSetObjectColor()

hal::ActionSetObjectColor::ActionSetObjectColor ( const QColor &  col = QColor())
inline

Action Constructor.

Parameters
col- The new color

Definition at line 49 of file action_set_object_color.h.

Referenced by exec().

Member Function Documentation

◆ addToHash()

void hal::ActionSetObjectColor::addToHash ( QCryptographicHash &  cryptoHash) const
overridevirtual

Hook for derived classes to add parameter to cryptographic hash.

Parameters
cryptoHash- Additional hash data.

Reimplemented from hal::UserAction.

Definition at line 24 of file action_set_object_color.cpp.

References QCryptographicHash::addData().

◆ exec()

◆ readFromXml()

void hal::ActionSetObjectColor::readFromXml ( QXmlStreamReader &  xmlIn)
overridevirtual

Reads user interaction as well as arguments from xml macro file.

Parameters
xmlIn- The xml reader.

Reimplemented from hal::UserAction.

Definition at line 34 of file action_set_object_color.cpp.

References QXmlStreamReader::name(), QXmlStreamReader::readElementText(), and QXmlStreamReader::readNextStartElement().

◆ tagname()

QString hal::ActionSetObjectColor::tagname ( ) const
overridevirtual

The xml tagname for the action is purely virtual and needs to be implemented in derived class.

Returns
The tagname.

Implements hal::UserAction.

Definition at line 19 of file action_set_object_color.cpp.

References hal::ActionSetObjectColorFactory::sFactory, and hal::UserActionFactory::tagname().

◆ writeToXml()

void hal::ActionSetObjectColor::writeToXml ( QXmlStreamWriter &  xmlOut) const
overridevirtual

Persist user interaction in xml macro file.

Parameters
xmlOut- The xml writer.

Reimplemented from hal::UserAction.

Definition at line 29 of file action_set_object_color.cpp.

References QColor::HexArgb, QColor::name(), and QXmlStreamWriter::writeTextElement().


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