MCPcopy Create free account
hub / github.com/KDE/labplot / createContextMenu

Method createContextMenu

src/frontend/MainWin.cpp:2256–2269  ·  view source on GitHub ↗

! this is called on a right click on the root folder in the project explorer */

Source from the content-addressed store, hash-verified

2254 this is called on a right click on the root folder in the project explorer
2255*/
2256void MainWin::createContextMenu(QMenu* menu) const {
2257 QAction* firstAction = nullptr;
2258 // if we're populating the context menu for the project explorer, then
2259 // there're already actions available there. Skip the first title-action
2260 // and insert the action at the beginning of the menu.
2261 if (menu->actions().size() > 1)
2262 firstAction = menu->actions().at(1);
2263
2264 menu->insertMenu(firstAction, m_newMenu);
2265
2266 menu->insertSeparator(firstAction);
2267 menu->insertMenu(firstAction, m_visibilityMenu);
2268 menu->insertSeparator(firstAction);
2269}
2270
2271/*!
2272 this is called on a right click on a non-root folder in the project explorer

Callers 5

updateGUIMethod · 0.45
contextMenuEventMethod · 0.45
prepareDrawingMenuMethod · 0.45

Calls 1

sizeMethod · 0.45

Tested by 2

prepareDrawingMenuMethod · 0.36