HAL
hal::ActionRemoveItemsFromObject Class Reference

Removes an item from a Module or Grouping. More...

#include <action_remove_items_from_object.h>

Inheritance diagram for hal::ActionRemoveItemsFromObject:
Inheritance graph
Collaboration diagram for hal::ActionRemoveItemsFromObject:
Collaboration graph

Public Member Functions

 ActionRemoveItemsFromObject (const QSet< u32 > &mods=QSet< u32 >(), const QSet< u32 > &gats=QSet< u32 >(), const QSet< u32 > &nets=QSet< u32 >(), const QSet< u32 > &pins=QSet< u32 >())
 
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
 
UserActionundoAction () 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< u32setFromText (const QString &s)
 
static QString gridToText (const QHash< hal::Node, QPoint > &grid)
 
static QHash< hal::Node, QPointgridFromText (const QString &txt)
 
- Protected Attributes inherited from hal::UserAction
UserActionObject mObject
 
UserActionObject mParentObject
 
int mCompoundOrder
 
UserActionmUndoAction
 
qint64 mTimeStamp
 
bool mObjectLock
 
bool mParentObjectLock
 
bool mProjectModified
 

Detailed Description

Removes an item from a Module or Grouping.

Removes modules, gates, or nets from the UserActionObject's object. This object must be a Module or a Grouping.

Undo Action: ActionAddItemsToObject

Definition at line 39 of file action_remove_items_from_object.h.

Constructor & Destructor Documentation

◆ ActionRemoveItemsFromObject()

hal::ActionRemoveItemsFromObject::ActionRemoveItemsFromObject ( const QSet< u32 > &  mods = QSet<u32>(),
const QSet< u32 > &  gats = QSet<u32>(),
const QSet< u32 > &  nets = QSet<u32>(),
const QSet< u32 > &  pins = QSet<u32>() 
)
inline

Action Constructor.

Parameters
mods- The ids of the Modules to remove
gats- The ids of the Gates to remove
nets- The ids of the Nets to remove
pins- The ids of the Pins to remove

Definition at line 54 of file action_remove_items_from_object.h.

Member Function Documentation

◆ addToHash()

void hal::ActionRemoveItemsFromObject::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 29 of file action_remove_items_from_object.cpp.

References QCryptographicHash::addData(), and hal::UserAction::setToText().

◆ exec()

◆ readFromXml()

void hal::ActionRemoveItemsFromObject::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 53 of file action_remove_items_from_object.cpp.

References QXmlStreamReader::name(), QXmlStreamReader::readElementText(), QXmlStreamReader::readNextStartElement(), and hal::UserAction::setFromText().

◆ tagname()

QString hal::ActionRemoveItemsFromObject::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 24 of file action_remove_items_from_object.cpp.

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

◆ writeToXml()

void hal::ActionRemoveItemsFromObject::writeToXml ( QXmlStreamWriter xmlOut) const
overridevirtual

Persist user interaction in xml macro file.

Parameters
xmlOut- The xml writer.

Reimplemented from hal::UserAction.

Definition at line 41 of file action_remove_items_from_object.cpp.

References QSet::isEmpty(), hal::UserAction::setToText(), and QXmlStreamWriter::writeTextElement().


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