SOFA API  b3f2f2a4
Open source framework for multi-physics simuation
sofa::gui::qt::QGraphStatWidget Class Referenceabstract

#include <QGraphStatWidget.h>

Inheritance diagram for sofa::gui::qt::QGraphStatWidget:

Detailed Description

Base class to make graphes in the stat tab of the node widget TODO add gnuplot export

Protected Attributes

simulation::Nodem_node
 pointer to the node monitored More...
 
int m_bufferSize
 size of the buffers to stored More...
 
QChart * m_chart
 Pointer to the chart Data. More...
 
std::vector< QLineSeries * > m_curves
 vector of series to be ploted More...
 
QValueAxis * m_axisX
 x axis pointer More...
 
QValueAxis * m_axisY
 y axis pointer More...
 
SReal m_yMin
 min y axis value stored More...
 
SReal m_yMax
 max y axis value stored More...
 
SReal m_lastTime
 last timestep monitored More...
 
int m_cptStep
 step counter monitored More...
 

Public Member Functions

 QGraphStatWidget (QWidget *parent, simulation::Node *node, const QString &title, unsigned numberOfCurves, int bufferSize)
 
virtual ~QGraphStatWidget ()
 
virtual void step () final
 Main method called to update the graph. More...
 
virtual void stepImpl ()=0
 the only function that should be overloaded More...
 

Protected Member Functions

void setCurve (unsigned index, const QString &name, const QColor &color)
 set the index-th curve (index must be < _numberOfCurves) More...
 
void updateYAxisBounds (SReal value)
 Method to update Y axis scale. More...
 
void flushSeries ()
 flush data from series not anymore displayed More...
 

Attribute details

◆ m_axisX

QValueAxis* sofa::gui::qt::QGraphStatWidget::m_axisX
protected

x axis pointer

◆ m_axisY

QValueAxis* sofa::gui::qt::QGraphStatWidget::m_axisY
protected

y axis pointer

◆ m_bufferSize

int sofa::gui::qt::QGraphStatWidget::m_bufferSize
protected

size of the buffers to stored

◆ m_chart

QChart* sofa::gui::qt::QGraphStatWidget::m_chart
protected

Pointer to the chart Data.

◆ m_cptStep

int sofa::gui::qt::QGraphStatWidget::m_cptStep
protected

step counter monitored

◆ m_curves

std::vector< QLineSeries *> sofa::gui::qt::QGraphStatWidget::m_curves
protected

vector of series to be ploted

◆ m_lastTime

SReal sofa::gui::qt::QGraphStatWidget::m_lastTime
protected

last timestep monitored

◆ m_node

simulation::Node* sofa::gui::qt::QGraphStatWidget::m_node
protected

pointer to the node monitored

◆ m_yMax

SReal sofa::gui::qt::QGraphStatWidget::m_yMax
protected

max y axis value stored

◆ m_yMin

SReal sofa::gui::qt::QGraphStatWidget::m_yMin
protected

min y axis value stored

Constructor details

◆ QGraphStatWidget()

sofa::gui::qt::QGraphStatWidget::QGraphStatWidget ( QWidget parent,
simulation::Node node,
const QString &  title,
unsigned  numberOfCurves,
int  bufferSize 
)

◆ ~QGraphStatWidget()

sofa::gui::qt::QGraphStatWidget::~QGraphStatWidget ( )
virtual

Function details

◆ flushSeries()

void sofa::gui::qt::QGraphStatWidget::flushSeries ( )
protected

flush data from series not anymore displayed

◆ setCurve()

void sofa::gui::qt::QGraphStatWidget::setCurve ( unsigned  index,
const QString &  name,
const QColor &  color 
)
protected

set the index-th curve (index must be < _numberOfCurves)

◆ step()

void sofa::gui::qt::QGraphStatWidget::step ( )
finalvirtual

Main method called to update the graph.

◆ stepImpl()

virtual void sofa::gui::qt::QGraphStatWidget::stepImpl ( )
pure virtual

the only function that should be overloaded

Implemented in sofa::gui::qt::QMomentumStatWidget, and sofa::gui::qt::QEnergyStatWidget.

◆ updateYAxisBounds()

void sofa::gui::qt::QGraphStatWidget::updateYAxisBounds ( SReal  value)
protected

Method to update Y axis scale.