HAL
hal::ActionDeleteObject Class Reference

Deletes an object. More...

#include <action_delete_object.h>

Inheritance diagram for hal::ActionDeleteObject:
Inheritance graph
Collaboration diagram for hal::ActionDeleteObject:
Collaboration graph

Public Member Functions

 ActionDeleteObject ()
 
bool exec () override
 
QString tagname () const override
 
- Public Member Functions inherited from hal::UserAction
virtual ~UserAction ()
 
virtual void writeToXml (QXmlStreamWriter &xmlOut) const
 
virtual void readFromXml (QXmlStreamReader &xmlIn)
 
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
 
virtual void addToHash (QCryptographicHash &cryptoHash) 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

Deletes an object.

Deletes the UserActionObject's object.

Undo Action: ActionCreateObject

Definition at line 39 of file action_delete_object.h.

Constructor & Destructor Documentation

◆ ActionDeleteObject()

hal::ActionDeleteObject::ActionDeleteObject ( )
inline

Action constructor.

Definition at line 45 of file action_delete_object.h.

Member Function Documentation

◆ exec()

bool hal::ActionDeleteObject::exec ( )
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.

Returns
True on success, False otherwise.

Reimplemented from hal::UserAction.

Definition at line 36 of file action_delete_object.cpp.

References hal::UserActionCompound::addAction(), QMap::begin(), hal::GroupingTableEntry::color(), hal::UserActionObjectType::ContextDir, hal::UserActionObjectType::ContextView, hal::Netlist::delete_gate(), hal::Netlist::delete_module(), hal::Netlist::delete_net(), hal::GraphContextManager::deleteContextDirectory(), hal::GraphContextManager::deleteGraphContext(), QMap::end(), hal::UserAction::exec(), QString::fromStdString(), test_plugin::g, hal::UserActionObjectType::Gate, hal::GraphContext::gates(), hal::gContentManager, hal::Netlist::get_gate_by_id(), hal::Grouping::get_gate_ids(), hal::Module::get_gates(), hal::Module::get_id(), hal::Netlist::get_module_by_id(), hal::Grouping::get_module_ids(), hal::Module::get_name(), hal::Netlist::get_net_by_id(), hal::Grouping::get_net_ids(), hal::Module::get_parent_module(), hal::Module::get_submodules(), hal::Netlist::get_top_module(), hal::Module::get_type(), hal::BaseTreeItem::getChildCount(), hal::GraphContextManager::getContextById(), hal::GraphContextManager::getContextTreeModel(), hal::ContextTreeModel::getDirectory(), hal::GraphContextManager::getDirectoryById(), hal::GraphContext::getExclusiveModuleId(), hal::ContentManager::getGroupingManagerWidget(), hal::GraphContext::getLayouter(), hal::GroupingManagerWidget::getModel(), hal::NetlistRelay::getModuleColorManager(), hal::GraphContextManager::getParentId(), hal::gGraphContextManager, hal::gNetlist, hal::gNetlistRelay, hal::GroupingTableEntry::grouping(), hal::UserActionObjectType::Grouping, hal::GroupingTableModel::groupingAt(), hal::ContextDirectory::id(), hal::GraphContext::id(), hal::GroupingTableEntry::id(), hal::UserActionObject::id(), QHash::insert(), QSet::insert(), QSet::isEmpty(), hal::GraphContext::isShowingModuleExclusively(), hal::UserAction::mObject, hal::UserActionObjectType::Module, hal::ModuleColorManager::moduleColor(), hal::GraphContext::modules(), hal::UserAction::mUndoAction, hal::ContextDirectory::name(), hal::GraphContext::name(), hal::GroupingTableEntry::name(), hal::UserActionObjectType::Net, net, hal::GraphLayouter::nodeToPositionMap(), hal::GroupingTableModel::removeRows(), hal::GroupingTableModel::rowCount(), hal::ActionCreateObject::setLinkedObjectId(), hal::UserAction::setObject(), hal::ActionCreateObject::setParentId(), hal::ActionAddItemsToObject::setPlacementHint(), hal::UserActionCompound::setUseCreatedObject(), and hal::UserActionObject::type().

Referenced by hal::NetlistRelay::deleteModule(), and hal::ContextTreeModel::removeDirectory().

◆ tagname()

QString hal::ActionDeleteObject::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 31 of file action_delete_object.cpp.

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


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