roviz  0.7
Code Documentation of roviz
Public Member Functions | Protected Member Functions | List of all members
SparseWidget Class Reference

A widget to show sparse data. More...

#include <sparse_widget.h>

Inheritance diagram for SparseWidget:
Inheritance graph
Collaboration diagram for SparseWidget:
Collaboration graph

Public Member Functions

 SparseWidget (std::function< void(SparseWidget *)> draw_func, StreamObject default_item, std::function< Image(StreamObject)> image_fn, OutputPrivate *out)
 
void reset (void) override
 Reset the widget to make it show the default image again.
 
void newObject (StreamObject obj) override
 Called when a new sparse object arrived. More...
 
template<class T >
void draw (void)
 Draws the widget. More...
 
template<>
void draw ()
 
template<>
void draw ()
 
template<>
void draw ()
 
template<>
void draw ()
 
template<>
void draw ()
 
template<>
void draw ()
 
- Public Member Functions inherited from ImageWidget
 ImageWidget (OutputPrivate *out)
 
QWidget * qwidget (void) override
 Convert this widget to a QWidget. More...
 
- Public Member Functions inherited from StreamWidget
 StreamWidget (OutputPrivate *out)
 
OutputPrivateoutput (void)
 Get the output associated with this widget. More...
 

Protected Member Functions

void paintEvent (QPaintEvent *event) override
 Paint the widget. More...
 
- Protected Member Functions inherited from ImageWidget
void resizeEvent (QResizeEvent *event) override
 Called on a resize event. More...
 
void recalcImageRect (double w, double h)
 Recalculates the image dimensions after a resize. More...
 

Additional Inherited Members

- Protected Attributes inherited from ImageWidget
QImage image_qt
 
Image image
 
QRectF image_rect
 

Detailed Description

A widget to show sparse data.

This widget is an overlay to an ImageWidget, drawing the sparse data inside the base image.

See also
Sparse
ImageWidget

Member Function Documentation

◆ draw()

template<class T >
void SparseWidget::draw ( void  )

Draws the widget.

Draws the widget depending on the type of the sparse object

◆ newObject()

void SparseWidget::newObject ( StreamObject  obj)
overridevirtual

Called when a new sparse object arrived.

Parameters
objStreamObject representing the new sparse object to display

Reimplemented from ImageWidget.

Here is the call graph for this function:

◆ paintEvent()

void SparseWidget::paintEvent ( QPaintEvent *  event)
overrideprotectedvirtual

Paint the widget.

Parameters
eventThe paint event

See QWidget::paintEvent

See also
draw

Reimplemented from ImageWidget.

Here is the call graph for this function:

The documentation for this class was generated from the following files: