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

Method createContextMenu

src/frontend/datapicker/DatapickerImageView.cpp:257–275  ·  view source on GitHub ↗

! * Populates the menu \c menu with the image and image-view relevant actions. * The menu is used * - as the context menu in DatapickerImageView * - as the "datapicker menu" in the main menu-bar (called form MainWin) * - as a part of the image context menu in project explorer */

Source from the content-addressed store, hash-verified

255 * - as a part of the image context menu in project explorer
256 */
257void DatapickerImageView::createContextMenu(QMenu* menu) const {
258 Q_ASSERT(menu);
259
260 QAction* firstAction = nullptr;
261 // if we're populating the context menu for the project explorer, then
262 // there're already actions available there. Skip the first title-action
263 // and insert the action at the beginning of the menu.
264 if (menu->actions().size() > 1)
265 firstAction = menu->actions().at(1);
266
267 menu->insertAction(firstAction, addCurveAction);
268 menu->insertSeparator(firstAction);
269 menu->insertMenu(firstAction, m_navigationMenu);
270 menu->insertSeparator(firstAction);
271 menu->insertMenu(firstAction, m_viewMouseModeMenu);
272 menu->insertMenu(firstAction, m_zoomMenu);
273 menu->insertMenu(firstAction, m_magnificationMenu);
274 menu->insertSeparator(firstAction);
275}
276
277void DatapickerImageView::fillToolBar(QToolBar* toolBar) {
278 toolBar->addSeparator();

Callers 1

contextMenuEventMethod · 0.95

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected