| 769 | } |
| 770 | |
| 771 | QMenu* CartesianPlot::createContextMenu() { |
| 772 | if (!m_menusInitialized) |
| 773 | initMenus(); |
| 774 | |
| 775 | QMenu* menu = WorksheetElement::createContextMenu(); |
| 776 | // seems to be a bug, because the tooltips are not shown |
| 777 | menu->setToolTipsVisible(true); |
| 778 | QAction* visibilityAction = this->visibilityAction(); |
| 779 | |
| 780 | menu->insertMenu(visibilityAction, m_addNewMenu); |
| 781 | menu->insertSeparator(visibilityAction); |
| 782 | menu->insertMenu(visibilityAction, themeMenu); |
| 783 | menu->insertSeparator(visibilityAction); |
| 784 | |
| 785 | if (children<XYCurve>().isEmpty()) { |
| 786 | addInfoElementAction->setEnabled(false); |
| 787 | addInfoElementAction->setToolTip(i18n("No curves inside the plot area.")); |
| 788 | } else { |
| 789 | addInfoElementAction->setEnabled(true); |
| 790 | addInfoElementAction->setToolTip(QString()); |
| 791 | } |
| 792 | |
| 793 | return menu; |
| 794 | } |
| 795 | |
| 796 | QMenu* CartesianPlot::addNewMenu() { |
| 797 | if (!m_menusInitialized) |
no test coverage detected