![]() |
HAL
|
Folds a module. More...
#include <action_fold_module.h>
Public Member Functions | |
ActionFoldModule (u32 moduleId=0) | |
QString | tagname () const override |
bool | exec () override |
void | setContextId (u32 id) |
void | setPlacementHint (PlacementHint hint) |
![]() | |
UserActionCompound () | |
void | addAction (UserAction *act) |
QString | tagname () const override |
bool | exec () override |
void | writeToXml (QXmlStreamWriter &xmlOut) const override |
void | readFromXml (QXmlStreamReader &xmlIn) override |
void | setUseCreatedObject () |
![]() | |
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 |
virtual void | addToHash (QCryptographicHash &cryptoHash) 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) |
![]() | |
QList< UserAction * > | mActionList |
bool | mUseCreatedObject |
![]() | |
UserActionObject | mObject |
UserActionObject | mParentObject |
int | mCompoundOrder |
UserAction * | mUndoAction |
qint64 | mTimeStamp |
bool | mObjectLock |
bool | mParentObjectLock |
bool | mProjectModified |
Folds a module.
Shows the parent module as one single box rather than showing its content.
Undo Action: ActionUnfoldModule
Definition at line 42 of file action_fold_module.h.
hal::ActionFoldModule::ActionFoldModule | ( | u32 | moduleId = 0 | ) |
Action constructor.
moduleId | - The id of the module to fold. |
Definition at line 23 of file action_fold_module.cpp.
References hal::UserActionObjectType::Module, and hal::UserAction::setObject().
|
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 35 of file action_fold_module.cpp.
References hal::UserActionCompound::addAction(), hal::PlacementHint::addGridPosition(), hal::UserActionObjectType::ContextView, hal::UserActionCompound::exec(), test_plugin::g, hal::Node::Gate, hal::gContentManager, hal::Module::get_gates(), hal::Netlist::get_module_by_id(), hal::Module::get_submodules(), hal::GraphContextManager::getContextById(), hal::ContentManager::getContextManagerWidget(), hal::ContextManagerWidget::getCurrentContext(), hal::GraphContext::getLayouter(), hal::gGraphContextManager, hal::gNetlist, hal::PlacementHint::GridPosition, hal::GraphContext::id(), hal::UserActionObject::id(), QSet::insert(), QSet::isEmpty(), hal::NetLayoutPoint::isUndefined(), hal::UserAction::mObject, hal::Node::Module, hal::UserActionObjectType::Module, hal::GraphLayouter::positonForNode(), hal::UserAction::setObject(), hal::ActionAddItemsToObject::setPlacementHint(), hal::UserActionObject::type(), QPoint::x(), and QPoint::y().
|
inline |
Sets the id of the context the module will be folded in.
id | - The context id |
Definition at line 61 of file action_fold_module.h.
References id.
Referenced by hal::ActionUnfoldModule::exec().
|
inline |
Configures the placement hints for the folded module.
hint | - The new placement hints. |
Definition at line 68 of file action_fold_module.h.
Referenced by hal::ActionUnfoldModule::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 30 of file action_fold_module.cpp.
References hal::ActionFoldModuleFactory::sFactory, and hal::UserActionFactory::tagname().