YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
Plotter Class Reference

Class representing a Plotter. More...

#include </home/runner/work/yarp-documentation/yarp-documentation/yarp/src/guis/yarpscope/plugin/plotter.h>

+ Inheritance diagram for Plotter:

Public Slots

void onInteract ()
 Sets the interaction mode to true.
 
void onTimeout ()
 Timeout on which the data is acquired.
 

Signals

void maxValueChanged ()
 
void minValueChanged ()
 
void internalAppendGraph (int index, QString title, QString color, QString type, int size, int buffer_size)
 
void plotSampleSizeChanged ()
 
void duplicateLastGraphValue (int graphIndex)
 

Public Member Functions

 Plotter (const QString &title, int gridx, int gridy, int hspan, int vspan, float minval, float maxval, int size, const QString &bgcolor, bool autorescale, QObject *parent=0)
 Constructor of the class.
 
 ~Plotter ()
 
GraphaddGraph (QString remotePort, QString localPort, int index, QString title, QString color, QString type, int size, double graph_y_scale=1.0)
 Add a Graph to the current Plotter.
 
void clear ()
 Clears the graphs data.
 
void rescale ()
 Rescales the plotter and its graphs.
 
void setPaintGeometry (QRectF)
 Sets the paint geometry for this Plotter.
 

Public Attributes

QList< QObject * > graphList
 
QCustomPlot customPlot
 
QRectF paintRectGeometry
 
QString title
 
int gridx
 
int gridy
 
int hspan
 
int vspan
 
float minval
 
float maxval
 
int size
 
QString bgcolor
 
bool autorescale
 
int initialSize
 
int start
 
bool interact
 

Detailed Description

Class representing a Plotter.

Definition at line 114 of file plotter.h.

Constructor & Destructor Documentation

◆ Plotter()

Plotter::Plotter ( const QString &  title,
int  gridx,
int  gridy,
int  hspan,
int  vspan,
float  minval,
float  maxval,
int  size,
const QString &  bgcolor,
bool  autorescale,
QObject *  parent = 0 
)
explicit

Constructor of the class.

Parameters
titlethe title of the plotter
gridxthe x pos in the grid
gridythe y pos in the grid
hspanthe horizonatl span
vspanthe vertical span
minvalthe minimum scale value
maxvalthe maximium scale value
sizenumber of sample of datas in plotter
bgcolorthe background color of the plotter
autorescalenot used

Definition at line 26 of file plotter.cpp.

◆ ~Plotter()

Plotter::~Plotter ( )

Definition at line 84 of file plotter.cpp.

Member Function Documentation

◆ addGraph()

Graph * Plotter::addGraph ( QString  remotePort,
QString  localPort,
int  index,
QString  title,
QString  color,
QString  type,
int  size,
double  graph_y_scale = 1.0 
)

Add a Graph to the current Plotter.

Parameters
indexthe index of the graph
titlethe title of the graph
colorthe color of the graph
typethe type of the graph (bar, lines, points)
thetickness of the graph
graph_y_scaleto multiply the all data points for a scale factor

Definition at line 119 of file plotter.cpp.

◆ clear()

void Plotter::clear ( )

Clears the graphs data.

Definition at line 235 of file plotter.cpp.

◆ duplicateLastGraphValue

void Plotter::duplicateLastGraphValue ( int  graphIndex)
signal

◆ internalAppendGraph

void Plotter::internalAppendGraph ( int  index,
QString  title,
QString  color,
QString  type,
int  size,
int  buffer_size 
)
signal

◆ maxValueChanged

void Plotter::maxValueChanged ( )
signal

◆ minValueChanged

void Plotter::minValueChanged ( )
signal

◆ onInteract

void Plotter::onInteract ( )
slot

Sets the interaction mode to true.

Called when the user interact with the plotter using mouse

Definition at line 77 of file plotter.cpp.

◆ onTimeout

void Plotter::onTimeout ( )
slot

Timeout on which the data is acquired.

Definition at line 171 of file plotter.cpp.

◆ plotSampleSizeChanged

void Plotter::plotSampleSizeChanged ( )
signal

◆ rescale()

void Plotter::rescale ( )

Rescales the plotter and its graphs.

Definition at line 98 of file plotter.cpp.

◆ setPaintGeometry()

void Plotter::setPaintGeometry ( QRectF  r)

Sets the paint geometry for this Plotter.

Definition at line 105 of file plotter.cpp.

Member Data Documentation

◆ autorescale

bool Plotter::autorescale

Definition at line 153 of file plotter.h.

◆ bgcolor

QString Plotter::bgcolor

Definition at line 152 of file plotter.h.

◆ customPlot

QCustomPlot Plotter::customPlot

Definition at line 139 of file plotter.h.

◆ graphList

QList<QObject*> Plotter::graphList

Definition at line 138 of file plotter.h.

◆ gridx

int Plotter::gridx

Definition at line 145 of file plotter.h.

◆ gridy

int Plotter::gridy

Definition at line 146 of file plotter.h.

◆ hspan

int Plotter::hspan

Definition at line 147 of file plotter.h.

◆ initialSize

int Plotter::initialSize

Definition at line 154 of file plotter.h.

◆ interact

bool Plotter::interact

Definition at line 156 of file plotter.h.

◆ maxval

float Plotter::maxval

Definition at line 150 of file plotter.h.

◆ minval

float Plotter::minval

Definition at line 149 of file plotter.h.

◆ paintRectGeometry

QRectF Plotter::paintRectGeometry

Definition at line 141 of file plotter.h.

◆ size

int Plotter::size

Definition at line 151 of file plotter.h.

◆ start

int Plotter::start

Definition at line 155 of file plotter.h.

◆ title

QString Plotter::title

Definition at line 144 of file plotter.h.

◆ vspan

int Plotter::vspan

Definition at line 148 of file plotter.h.


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