49 switch (mPlacementHint.
mode())
79 if (xmlIn.
name() ==
"placement")
87 else if (xmlIn.
name() ==
"gridposition")
92 else if (xmlIn.
name() ==
"modules")
94 else if (xmlIn.
name() ==
"gates")
96 else if (xmlIn.
name() ==
"nets")
98 else if (xmlIn.
name() ==
"pins")
136 std::vector<Gate*> gates;
137 for (
u32 id : mGates)
141 parentHash[
g->get_module()->get_id()].gats.
insert(
id);
145 for (
u32 id : mModules)
150 parentHash[parentModuleId].mods.
insert(
id);
157 for (
auto it = parentHash.
begin(); it != parentHash.
end(); ++it)
158 compound->
addAction(it.value().actionFactory(it.key()));
175 ctx->
add(mModules, mGates, mPlacementHint);
185 for (
u32 id : mModules)
187 for (
u32 id : mGates)
UserActionFactory for ActionAddItemsToObject.
static ActionAddItemsToObjectFactory * sFactory
ActionAddItemsToObjectFactory()
UserAction * newAction() const
Adds an item to a module or grouping.
void writeToXml(QXmlStreamWriter &xmlOut) const override
ActionAddItemsToObject(const QSet< u32 > &mods=QSet< u32 >(), const QSet< u32 > &gats=QSet< u32 >(), const QSet< u32 > &nets=QSet< u32 >(), const QSet< u32 > &pins=QSet< u32 >())
QString tagname() const override
void readFromXml(QXmlStreamReader &xmlIn) override
void addToHash(QCryptographicHash &cryptoHash) const override
Removes an item from a Module or Grouping.
ContextManagerWidget * getContextManagerWidget()
GraphContext * getCurrentContext()
Logical container for modules, gates, and nets.
void add(const QSet< u32 > &modules, const QSet< u32 > &gates, PlacementHint placement=PlacementHint())
GraphLayouter * getLayouter() const
GraphContext * getContextById(u32 id) const
GridPlacement * gridPlacementFactory() const
bool assign_module_by_id(const u32 module_id, bool force=false)
bool assign_net_by_id(const u32 net_id, bool force=false)
bool assign_gate_by_id(const u32 gate_id, bool force=false)
Module * get_parent_module() const
bool set_parent_module(Module *new_parent)
bool assign_gates(const std::vector< Gate * > &gates)
Gate * get_gate_by_id(const u32 gate_id) const
Module * get_module_by_id(u32 module_id) const
Grouping * get_grouping_by_id(u32 grouping_id) const
The Node class object represents a module or a gate.
NodeType type() const
type getter for type information
u32 id() const
id getter for ID information
The PlacementHint class object provides hints for the layouter how new box objects are placed on a vi...
Node preferredOrigin() const
preferredOrigin getter for placement origin if any.
PlacementModeType mode() const
mode getter for placement mode type
PlacementModeType
The PlacementModeType enum either most compact arrangement (Standard) or to the left or right of give...
const QHash< Node, QPoint > & gridPosition() const
void addAction(UserAction *act)
The UserActionFactory is the abstract base class for registration.
The UserAction class is the abstract base class for user interactions.
void writeParentObjectToXml(QXmlStreamWriter &xmlOut) const
static QString gridToText(const QHash< hal::Node, QPoint > &grid)
static QString setToText(const QSet< u32 > &set)
static QHash< hal::Node, QPoint > gridFromText(const QString &txt)
static QSet< u32 > setFromText(const QString &s)
virtual void setObject(const UserActionObject &obj)
The UserActionObject class represents a single object used in UserAction.
UserActionObjectType::ObjectType type() const
static QString toString(ObjectType t)
static ObjectType fromNodeType(Node::NodeType ntp)
static Node::NodeType toNodeType(ObjectType t)
ContentManager * gContentManager
GraphContextManager * gGraphContextManager
void addData(const char *data, int length)
QHash::iterator insert(const Key &key, const T &value)
bool isEmpty() const const
bool isEmpty() const const
QString number(int n, int base)
int toInt(bool *ok, int base) const const
QString toString() const const
QStringRef value(const QString &namespaceUri, const QString &name) const const
QXmlStreamAttributes attributes() const const
QStringRef name() const const
QString readElementText(QXmlStreamReader::ReadElementTextBehaviour behaviour)
bool readNextStartElement()
void skipCurrentElement()
void writeAttribute(const QString &qualifiedName, const QString &value)
void writeStartElement(const QString &qualifiedName)
void writeTextElement(const QString &qualifiedName, const QString &text)