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

Method createConfigWidget

pj_scene2D/widgets/src/layers/image_layer.cpp:141–156  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

139}
140
141QWidget* ImageLayer::createConfigWidget(QWidget* parent) {
142 auto* widget = new QWidget(parent);
143 auto* layout = new QFormLayout(widget);
144 layout->setContentsMargins(0, 0, 0, 0);
145
146 auto* rectify = new ToggleSwitch(widget);
147 rectify->setChecked(rectify_enabled_, /*animate=*/false); // snap to state without emitting toggled
148 rectify->setToolTip(
149 tr("Rectify (lens-undistort) the image using its camera calibration when a matching\n"
150 "CameraInfo is available. Turn off to show the raw image — e.g. when the stream is\n"
151 "already rectified and would otherwise be undistorted twice."));
152 layout->addRow(tr("Rectify"), rectify);
153 connect(rectify, &ToggleSwitch::toggled, this, [this](bool on) { setRectifyEnabled(on); });
154
155 return widget;
156}
157
158void ImageLayer::onBeforeDetach() {
159 image_source_ = nullptr;

Callers 3

updateConfigPaneMethod · 0.45
showRobotLayerConfigMethod · 0.45

Calls 3

trFunction · 0.85
addRowMethod · 0.80
setCheckedMethod · 0.45

Tested by

no test coverage detected