12 #include <QApplication>
14 #include <QInputDialog>
38 " Module as python code",
42 sm = contextMenu->
addMenu(
" Change …");
55 contextMenu->
addAction(
" Add child module",
59 sm = contextMenu->
addMenu(
" To selection …");
67 act = sm->
addAction(
"Add module to selection",
77 contextMenu->
addAction(
" Move to module …",
82 sm = contextMenu->
addMenu(
" To grouping …");
83 QString actionText =
" Assign module to grouping";
85 actionText =
" Reassign module to grouping";
91 act = sm->
addAction(
" Remove module from grouping",
98 contextMenu->
addAction(
" Focus module in Graph View",
102 contextMenu->
addAction(
" Isolate module in new view",
135 " Gate as python code",
139 contextMenu->
addAction(
" Change gate name",
143 sm = contextMenu->
addMenu(
" To selection …");
151 act = sm->
addAction(
" Add gate to selection",
161 contextMenu->
addAction(
" Move to module …",
166 sm = contextMenu->
addMenu(
" To grouping …");
167 QString actionText =
" Assign gate to grouping";
169 actionText =
" Reassign gate to grouping";
175 act = sm->
addAction(
" Remove gate from grouping",
182 contextMenu->
addAction(
" Focus gate in Graph View",
186 contextMenu->
addAction(
" Isolate gate in new view",
209 " Net as python code",
213 contextMenu->
addAction(
" Change net name",
217 sm = contextMenu->
addMenu(
" To selection …");
226 act = sm->
addAction(
"Add net to selection",
236 sm = contextMenu->
addMenu(
" To grouping …");
237 QString actionText =
" Assign net to grouping";
238 if(
net->get_grouping() !=
nullptr)
239 actionText =
" Reassign net to grouping";
245 act = sm->
addAction(
" Remove net from grouping",
249 if(
net->get_grouping() ==
nullptr)
252 contextMenu->
addAction(
" Focus net in Graph View",
256 contextMenu->
addAction(
" Isolate net endpoints in new view",
267 contextMenu->
addAction(
" Move to module …",
273 contextMenu->
addAction(
" Assign all to grouping",
274 [modules, gates, nets]()
277 contextMenu->
addAction(
" Remove all from grouping",
278 [modules, gates, nets]()
Set the selection and focus.
void setObject(const UserActionObject &obj) override
GraphTabWidget * getGraphTabWidget()
Get hal's graph tab widget.
GroupingManagerWidget * getGroupingManagerWidget()
GateType * get_type() const
const std::string & get_name() const
Grouping * get_grouping() const
const std::string & get_name() const
void openGateInView(u32 gateId)
void openModuleInView(u32 moduleId, bool unfold)
void openNetEndpointsInView(u32 netId)
std::string get_name() const
Grouping * get_grouping() const
std::string get_type() const
Module * get_top_module() const
Gate * get_gate_by_id(const u32 gate_id) const
Module * get_module_by_id(u32 module_id) const
Net * get_net_by_id(u32 net_id) const
void addToModuleDialog(const Node &node=Node())
void addChildModuleDialog(const u32 id)
void deleteModule(const u32 id)
void changeModuleColorDialog(const u32 id)
void changeElementNameDialog(ModuleItem::TreeItemType type, u32 id)
void changeModuleTypeDialog(const u32 id)
The Node class object represents a module or a gate.
static QString pyCodeModule(u32 moduleId)
static QString pyCodeNet(u32 netId)
static QString pyCodeGate(u32 gateId)
const QSet< u32 > & selectedNets() const
void relaySelectionChanged(void *sender)
const QSet< u32 > & selectedGates() const
const QSet< u32 > & selectedModules() const
int numberSelectedNodes() const
The UserActionObject class represents a single object used in UserAction.
const Module * module(const Gate *g, const NodeBoxes &boxes)
ContentManager * gContentManager
GraphContextManager * gGraphContextManager
SelectionRelay * gSelectionRelay
NetlistRelay * gNetlistRelay
void setText(const QString &text, QClipboard::Mode mode)
bool contains(const T &value) const const
QString fromStdString(const std::string &str)
QString number(int n, int base)