43 mContextId = obj.
id();
46 qDebug() <<
"ActionUnfoldModule warning: invalid object type" << obj.
type();
62 if (!ctx)
return false;
104 mods.
insert(sm->get_id());
109 if ((ctx->gates().isEmpty() && ctx->modules() ==
QSet<u32>({mObject.id()})) ||
110 (ctx->modules() == mods && ctx->gates() == gats))
118 ctx->
add(mods, gats, mPlacementHint);
void setPlacementHint(PlacementHint hint)
void setContextId(u32 id)
UserActionFactory for ActionUnfoldModule.
UserAction * newAction() const
ActionUnfoldModuleFactory()
static ActionUnfoldModuleFactory * sFactory
ActionUnfoldModule(u32 moduleId=0)
void setObject(const UserActionObject &obj) override
QString tagname() const override
GraphTabWidget * getGraphTabWidget()
Get hal's graph tab widget.
ContextManagerWidget * getContextManagerWidget()
GraphContext * getCurrentContext()
Logical container for modules, gates, and nets.
void unfoldModule(const u32 id, const PlacementHint &plc)
void add(const QSet< u32 > &modules, const QSet< u32 > &gates, PlacementHint placement=PlacementHint())
const QSet< u32 > & gates() const
const QSet< u32 > & modules() const
GraphLayouter * getLayouter() const
GraphContext * createNewContext(const QString &name, u32 parentId=0)
GraphContext * getContextById(u32 id) const
QVector< GraphContext * > getContexts() const
NetLayoutPoint positonForNode(const Node &nd) const
const std::vector< Gate * > & get_gates() const
std::string get_name() const
std::vector< Module * > get_submodules(const std::function< bool(Module *)> &filter=nullptr, bool recursive=false) const
Module * get_module_by_id(u32 module_id) const
The Node class object represents a module or a gate.
The PlacementHint class object provides hints for the layouter how new box objects are placed on a vi...
void addGridPosition(const Node &nd, const QPoint &p)
The UserActionFactory is the abstract base class for registration.
The UserAction class is the abstract base class for user interactions.
virtual void setObject(const UserActionObject &obj)
The UserActionObject class represents a single object used in UserAction.
UserActionObjectType::ObjectType type() const
ContentManager * gContentManager
GraphContextManager * gGraphContextManager
bool contains(const T &value) const const
QSet::iterator insert(const T &value)
bool isEmpty() const const
QString fromStdString(const std::string &str)