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

Method viewportLeftDisplayNs

pj_widgets/src/Timeline.cpp:1263–1270  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1261}
1262
1263qint64 Timeline::viewportLeftDisplayNs() const {
1264 // The horizontal scrollbar value is the scene-x of the visible left edge; map
1265 // it back to display-ns under the current viewport (origin pinned at scene x=0).
1266 if (view_ == nullptr || view_->horizontalScrollBar() == nullptr) {
1267 return 0;
1268 }
1269 return TimelineScene::pxToNs(static_cast<double>(view_->horizontalScrollBar()->value()), viewport_);
1270}
1271
1272void Timeline::setViewportLeftDisplayNs(qint64 display_ns) {
1273 if (view_ == nullptr || view_->horizontalScrollBar() == nullptr) {

Callers 2

TESTFunction · 0.80

Calls 2

horizontalScrollBarMethod · 0.80
valueMethod · 0.45

Tested by 1

TESTFunction · 0.64