MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / showGoToDialog

Method showGoToDialog

src/openms_gui/source/VISUAL/Plot1DWidget.cpp:94–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92 }
93
94 void Plot1DWidget::showGoToDialog()
95 {
96 Plot1DGoToDialog goto_dialog(this);
97 auto vis_area_xy = canvas_->getVisibleArea().getAreaXY();
98 auto all_area_xy = canvas_->getMapper().mapRange(canvas_->getDataRange());
99 // in the unusual case: gravity is on X axis
100 if (canvas()->getGravitator().getGravityAxis() == DIM::X)
101 {
102 vis_area_xy.swapDimensions();
103 all_area_xy.swapDimensions();
104 }
105 goto_dialog.setRange(vis_area_xy.minX(), vis_area_xy.maxX());
106 goto_dialog.setMinMaxOfRange(all_area_xy.minX(), all_area_xy.maxX());
107 if (goto_dialog.exec())
108 {
109 goto_dialog.fixRange();
110 PlotCanvas::AreaXYType area(goto_dialog.getMin(), 0, goto_dialog.getMax(), 0);
111 if (canvas()->getGravitator().getGravityAxis() == DIM::X)
112 {
113 area.swapDimensions();
114 }
115 auto va_new = canvas_->getVisibleArea().cloneWith(area);
116 canvas()->setVisibleArea(va_new);
117 }
118 }
119
120 void Plot1DWidget::showLegend(bool show)
121 {

Callers

nothing calls this directly

Calls 12

mapRangeMethod · 0.80
getGravityAxisMethod · 0.80
minXMethod · 0.80
maxXMethod · 0.80
fixRangeMethod · 0.80
cloneWithMethod · 0.80
setVisibleAreaMethod · 0.80
canvasFunction · 0.50
setRangeMethod · 0.45
setMinMaxOfRangeMethod · 0.45
getMinMethod · 0.45
getMaxMethod · 0.45

Tested by

no test coverage detected