MCPcopy Create free account
hub / github.com/analogdevicesinc/scopy / getCurrentRect

Method getCurrentRect

gui/src/plotzoomer.cpp:134–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

132bool PlotZoomer::isBoundEn() { return m_bounded; }
133
134QRectF PlotZoomer::getCurrentRect()
135{
136 double x1 = 0, x2 = 0, y1 = 0, y2 = 0;
137
138 if(m_xAxisEn) {
139 x1 = plot()->axisScaleDiv(m_xAxis).lowerBound();
140 x2 = plot()->axisScaleDiv(m_xAxis).upperBound();
141 }
142 if(m_yAxisEn) {
143 y1 = plot()->axisScaleDiv(m_yAxis).lowerBound();
144 y2 = plot()->axisScaleDiv(m_yAxis).upperBound();
145 }
146
147 return QRectF(x1, y1, x2 - x1, y2 - y1);
148}
149
150bool PlotZoomer::eventFilter(QObject *object, QEvent *event)
151{

Callers 2

onPlotMagnifiedMethod · 0.45
isZoomedMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected