MCPcopy Create free account
hub / github.com/PlotJuggler/PlotJuggler / accept

Method accept

pj_plotting/widget/src/PlotZoomer.cpp:66–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64}
65
66bool PlotZoomer::accept(QPolygon& polygon) const {
67 QApplication::restoreOverrideCursor();
68 if (polygon.count() < 2) {
69 return false;
70 }
71
72 const QRect rect(polygon[0], polygon[polygon.count() - 1]);
73 const QRectF zoom_rect = invTransform(rect.normalized());
74 if (zoom_rect.width() < minZoomSize().width() && zoom_rect.height() < minZoomSize().height()) {
75 return false;
76 }
77 return QwtPlotZoomer::accept(polygon);
78}
79
80void PlotZoomer::applyKeepAspectRatio(QRectF& rect) const {
81 if (!keep_aspect_ratio_) {

Callers 15

wheelEventMethod · 0.45
eventFilterMethod · 0.45
mouseMoveEventMethod · 0.45
enterEventMethod · 0.45
wheelEventMethod · 0.45
mousePressEventMethod · 0.45
mouseMoveEventMethod · 0.45
mouseDoubleClickEventMethod · 0.45
mousePressEventMethod · 0.45
mouseMoveEventMethod · 0.45
mouseReleaseEventMethod · 0.45
mouseDoubleClickEventMethod · 0.45

Calls 4

heightMethod · 0.80
countMethod · 0.45
normalizedMethod · 0.45
widthMethod · 0.45

Tested by

no test coverage detected