Flair
Framework Libre Air
flair::gui::DataPlot1D Class Reference

Class displaying a 1D plot on the ground station. More...

#include <DataPlot1D.h>

+ Inheritance diagram for flair::gui::DataPlot1D:

Public Member Functions

 DataPlot1D (const LayoutPosition *position, std::string name, float ymin, float ymax)
 Constructor. More...
 
 ~DataPlot1D ()
 Destructor. More...
 
void AddCurve (const core::IODataElement *element, Color_t color, std::string curve_name="")
 Add a curve from an IODataElement to the plot. More...
 
void AddCurve (const core::IODataElement *element, uint8_t r=255, uint8_t g=0, uint8_t b=0, std::string curve_name="")
 Add a curve from an IODataElement to the plot. More...
 

Detailed Description

Class displaying a 1D plot on the ground station.

Constructor & Destructor Documentation

flair::gui::DataPlot1D::DataPlot1D ( const LayoutPosition position,
std::string  name,
float  ymin,
float  ymax 
)

Constructor.

Construct a 1D plot at given position.

Parameters
positionposition to display the plot
namename
ymindefault ymin of the plot
ymaxdefault ymax of the plot
flair::gui::DataPlot1D::~DataPlot1D ( )

Destructor.

Member Function Documentation

void flair::gui::DataPlot1D::AddCurve ( const core::IODataElement element,
Color_t  color,
std::string  curve_name = "" 
)

Add a curve from an IODataElement to the plot.

Curve's color can be selected by its name.

Parameters
elementelement to plot
colorcolor of the curve
curve_namename of the curve for the legend, if unspecified, element->ObjectName() will be used
void flair::gui::DataPlot1D::AddCurve ( const core::IODataElement element,
uint8_t  r = 255,
uint8_t  g = 0,
uint8_t  b = 0,
std::string  curve_name = "" 
)

Add a curve from an IODataElement to the plot.

Curve's color can be selected by its RGB components.

Parameters
elementelement to plot
rred component of the curve
ggreen component of the curve
bblue component of the curve
curve_namename of the curve for the legend, if unspecified, element->ObjectName() will be used