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

Method handleReferences

src/frontend/worksheet/WorksheetView.cpp:1761–1840  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1759}
1760
1761void WorksheetView::handleReferences(bool vertical) {
1762 /* Action to All: action is applied to all ranges
1763 * - Disable
1764 * Action to X: action is applied to all x ranges
1765 * - x zoom selection: if vertical:Zooming into all ranges of all plots (mostly the x ranges are the same for all plots --> usecase)
1766 * - y zoom selection: if !vertical:zoom only into the range from the reference line
1767 * Action to Y: action is applied to all y ranges
1768 * - x zoom selection: if vertical: zoom only into the range from the reference line
1769 * - y zoom selection: if !vertical: Zooming into all ranges of all plots
1770 * Action to Selection
1771 * - x zoom selection: if vertical: zoom only into the range from the reference line
1772 * - y zoom selection: if !vertical:zoom only into the range from the reference line
1773 */
1774
1775 zoomInAction->setEnabled(false);
1776 zoomOutAction->setEnabled(false);
1777 cartesianPlotZoomSelectionModeAction->setEnabled(false);
1778 scaleAutoAction->setEnabled(false);
1779
1780 switch (m_worksheet->cartesianPlotActionMode()) {
1781 case Worksheet::CartesianPlotActionMode::ApplyActionToAll:
1782 cartesianPlotZoomXSelectionModeAction->setEnabled(false);
1783 cartesianPlotZoomYSelectionModeAction->setEnabled(false);
1784 zoomInXAction->setEnabled(false);
1785 zoomOutXAction->setEnabled(false);
1786 zoomInYAction->setEnabled(false);
1787 zoomOutYAction->setEnabled(false);
1788 shiftLeftXAction->setEnabled(false);
1789 shiftRightXAction->setEnabled(false);
1790 shiftUpYAction->setEnabled(false);
1791 shiftDownYAction->setEnabled(false);
1792 scaleAutoXAction->setEnabled(vertical);
1793 scaleAutoYAction->setEnabled(!vertical);
1794 break;
1795 case Worksheet::CartesianPlotActionMode::ApplyActionToSelection:
1796 cartesianPlotZoomXSelectionModeAction->setEnabled(vertical);
1797 cartesianPlotZoomYSelectionModeAction->setEnabled(!vertical);
1798 zoomInXAction->setEnabled(vertical);
1799 zoomOutXAction->setEnabled(vertical);
1800 zoomInYAction->setEnabled(!vertical);
1801 zoomOutYAction->setEnabled(!vertical);
1802 shiftLeftXAction->setEnabled(vertical);
1803 shiftRightXAction->setEnabled(vertical);
1804 shiftUpYAction->setEnabled(!vertical);
1805 shiftDownYAction->setEnabled(!vertical);
1806 scaleAutoXAction->setEnabled(vertical);
1807 scaleAutoYAction->setEnabled(!vertical);
1808 break;
1809 case Worksheet::CartesianPlotActionMode::ApplyActionToAllX:
1810 cartesianPlotZoomXSelectionModeAction->setEnabled(vertical);
1811 cartesianPlotZoomYSelectionModeAction->setEnabled(!vertical);
1812 zoomInXAction->setEnabled(vertical);
1813 zoomOutXAction->setEnabled(vertical);
1814 zoomInYAction->setEnabled(!vertical);
1815 zoomOutYAction->setEnabled(!vertical);
1816 shiftLeftXAction->setEnabled(vertical);
1817 shiftRightXAction->setEnabled(vertical);
1818 shiftUpYAction->setEnabled(!vertical);

Callers

nothing calls this directly

Calls 2

setEnabledMethod · 0.45

Tested by

no test coverage detected