![]() |
HAL
|
#include <action_set_object_data.h>
Public Member Functions | |
ActionSetObjectData (QString category=QString(), QString key=QString(), QString type=QString(), QString val=QString()) | |
bool | exec () override |
QString | tagname () const override |
void | writeToXml (QXmlStreamWriter &xmlOut) const override |
void | readFromXml (QXmlStreamReader &xmlIn) override |
void | addToHash (QCryptographicHash &cryptoHash) const override |
void | setChangeKeyAndOrCategory (QString oldCategory, QString oldKey) |
![]() | |
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 |
Definition at line 31 of file action_set_object_data.h.
hal::ActionSetObjectData::ActionSetObjectData | ( | QString | category = QString() , |
QString | key = QString() , |
||
QString | type = QString() , |
||
QString | val = QString() |
||
) |
Definition at line 16 of file action_set_object_data.cpp.
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 116 of file action_set_object_data.cpp.
References QCryptographicHash::addData(), and QString::toUtf8().
|
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 21 of file action_set_object_data.cpp.
References ActionSetObjectData(), hal::data, hal::DataContainer::delete_data(), hal::UserAction::exec(), QString::fromStdString(), hal::UserActionObjectType::Gate, hal::DataContainer::get_data(), hal::Netlist::get_gate_by_id(), hal::Netlist::get_module_by_id(), hal::Netlist::get_net_by_id(), hal::gNetlist, hal::DataContainer::has_data(), hal::UserActionObject::id(), hal::UserAction::mObject, hal::UserActionObjectType::Module, hal::UserAction::mUndoAction, hal::UserActionObjectType::Net, hal::DataContainer::set_data(), setChangeKeyAndOrCategory(), hal::UserAction::setObject(), QString::toStdString(), and hal::UserActionObject::type().
|
overridevirtual |
Reads user interaction as well as arguments from xml macro file.
xmlIn | - The xml reader. |
Reimplemented from hal::UserAction.
Definition at line 91 of file action_set_object_data.cpp.
References QXmlStreamReader::name(), QXmlStreamReader::readElementText(), and QXmlStreamReader::readNextStartElement().
This function must be called when the key and/or category property of an already existing entry shall to be modified. Otherwise, instead of changing the 4 tupel from (oldKey, oldCat, oldType, oldVal) to (newKey, newCat, newType, newVal), a new entry would be inserted and both of them would coexist. (This also applies if, for example, one wants to only modify the category)
oldKey | - The old key that is to "potentionally" overwritten. |
oldCategory | - The old category that is to "potentionally" overwritten. |
Definition at line 135 of file action_set_object_data.cpp.
Referenced by exec().
|
overridevirtual |
The xml tagname for the action is purely virtual and needs to be implemented in derived class.
Implements hal::UserAction.
Definition at line 73 of file action_set_object_data.cpp.
References hal::ActionSetObjectDataFactory::sFactory, and hal::UserActionFactory::tagname().
|
overridevirtual |
Persist user interaction in xml macro file.
xmlOut | - The xml writer. |
Reimplemented from hal::UserAction.
Definition at line 78 of file action_set_object_data.cpp.
References QXmlStreamWriter::writeTextElement().