![]() |
HAL
|
Recolors the object. More...
#include <action_set_object_color.h>
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 |
![]() | |
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 | |
![]() | |
UserAction () | |
void | writeParentObjectToXml (QXmlStreamWriter &xmlOut) const |
void | readParentObjectFromXml (QXmlStreamReader &xmlIn) |
![]() | |
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) |
![]() | |
UserActionObject | mObject |
UserActionObject | mParentObject |
int | mCompoundOrder |
UserAction * | mUndoAction |
qint64 | mTimeStamp |
bool | mObjectLock |
bool | mParentObjectLock |
bool | mProjectModified |
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.
Action Constructor.
col | - The new color |
Definition at line 49 of file action_set_object_color.h.
Referenced by exec().
|
overridevirtual |
Hook for derived classes to add parameter to cryptographic hash.
cryptoHash | - Additional hash data. |
Reimplemented from hal::UserAction.
Definition at line 24 of file action_set_object_color.cpp.
References QCryptographicHash::addData().
|
overridevirtual |
Executes user interaction and returns true on success. Note: Each implementation of exec() must include a call to the exec() method of base class to store the UserAction object in history and to transfer its ownership.
Reimplemented from hal::UserAction.
Definition at line 43 of file action_set_object_color.cpp.
References ActionSetObjectColor(), hal::UserAction::exec(), hal::gContentManager, hal::Netlist::get_module_by_id(), hal::ContentManager::getGroupingManagerWidget(), hal::GroupingManagerWidget::getModel(), hal::NetlistRelay::getModuleColorManager(), hal::gGraphContextManager, hal::gNetlist, hal::gNetlistRelay, hal::UserActionObjectType::Grouping, hal::GraphContextManager::handleModuleColorChanged(), hal::UserActionObject::id(), QColor::isValid(), hal::UserAction::mObject, hal::UserActionObjectType::Module, hal::UserAction::mUndoAction, hal::ModuleColorManager::setModuleColor(), hal::UserAction::setObject(), and hal::UserActionObject::type().
Referenced by hal::NetlistRelay::changeModuleColorDialog().
|
overridevirtual |
Reads user interaction as well as arguments from xml macro file.
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().
|
overridevirtual |
The xml tagname for the action is purely virtual and needs to be implemented in derived class.
Implements hal::UserAction.
Definition at line 19 of file action_set_object_color.cpp.
References hal::ActionSetObjectColorFactory::sFactory, and hal::UserActionFactory::tagname().
|
overridevirtual |
Persist user interaction in xml macro file.
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().