MCPcopy Create free account
hub / github.com/XRay3D/GERBER_X3 / menu

Method menu

shape_plugins/shape/shape.cpp:202–211  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

200}
201
202void Shape::menu(QMenu& menu, FileTree::View* /*tv*/) const
203{
204 menu.addAction(QIcon::fromTheme("edit-delete"), QObject::tr("&Delete object \"%1\"").arg(name()), [this] {
205 App::fileModel()->removeRow(m_node->row(), m_node->index().parent());
206 });
207 auto action = menu.addAction(QIcon::fromTheme("hint"), QObject::tr("&Visible \"%1\"").arg(name()), this, &GraphicsItem::setVisible);
208 action->setCheckable(true);
209 action->setChecked(isVisible());
210 // action->connect(action, &QAction::toggled );
211}
212
213// write to project
214void Shape::write_(QDataStream& stream) const

Callers

nothing calls this directly

Calls 4

setCheckedMethod · 0.80
rowMethod · 0.45
parentMethod · 0.45
indexMethod · 0.45

Tested by

no test coverage detected