rqt_bag.plugins.timeline_renderer module

class rqt_bag.plugins.timeline_renderer.TimelineRenderer(*args: Any, **kwargs: Any)

Bases: QObject

A custom renderer for interval of time of a topic on the timeline.

@param msg_combine_px: don’t draw discrete messages if they’re less than this many pixels

separated [default: 1.5]

@type msg_combine_px: float

close()

Close the renderer, releasing any resources.

draw_timeline_segment(painter, topic, stamp_start, stamp_end, x, y, width, height)

Draw the timeline segment.

@param painter: QPainter context to render into @param topic: topic name @param stamp_start: start of the interval on the timeline @param stamp_end: start of the interval on the timeline @param x: x coordinate of the timeline interval @param y: y coordinate of the timeline interval @param width: width in pixels of the timeline interval @param height: height in pixels of the timeline interval @return: whether the interval was renderered @rtype: bool

get_segment_height(topic)

Get the height of the topic segment on the timeline.

@param topic: topic name to draw @type topic: str @return: height in pixels of the topic segment. If none, the timeline default is used. @rtype: int or None