AtCore 1.0.72
AtCore is a API to manage the serial connection between the computer and 3D Printers.
Loading...
Searching...
No Matches
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
PlotWidget Class Reference

PlotWidget Show a graph of the temperature over time. More...

#include <plotwidget.h>

Inheritance diagram for PlotWidget:

Classes

class  plot
 

Public Member Functions

 PlotWidget (QWidget *parent=nullptr)
 
 ~PlotWidget ()=default
 
void addPlot (const QString &name)
 Create a new plot.
 
void removePlot (const QString &name)
 Delete plot with name.
 
void appendPoint (const QString &name, float value)
 Append point to plot.
 
QStringList plots ()
 plots
 
void setMaximumPoints (const int newMax)
 set The Maximum Number of points per series the plot widget stores
 
void setMaximumTemperature (const uint maxTemp)
 set the maximum temperature shown on the plot
 

Private Member Functions

void update ()
 Update plot list, need to run after ALL plots added.
 

Private Attributes

QChartView * _chart
 
QDateTimeAxis * _axisX
 
QValueAxis * _axisY
 
QMap< QString, plot * > _plots
 
int m_maximumPoints
 

Detailed Description

PlotWidget Show a graph of the temperature over time.

Constructor & Destructor Documentation

◆ PlotWidget()

PlotWidget::PlotWidget ( QWidget *  parent = nullptr)
explicit

◆ ~PlotWidget()

PlotWidget::~PlotWidget ( )
default

Member Function Documentation

◆ addPlot()

void PlotWidget::addPlot ( const QString &  name)

Create a new plot.

Parameters
namep_name: plot name

◆ appendPoint()

void PlotWidget::appendPoint ( const QString &  name,
float  value 
)

Append point to plot.

Parameters
namep_name: plot name
valuep_value: value

◆ plots()

QStringList PlotWidget::plots ( )

plots

Returns
List of all named plots

◆ removePlot()

void PlotWidget::removePlot ( const QString &  name)

Delete plot with name.

Parameters
namep_name: name

◆ setMaximumPoints()

void PlotWidget::setMaximumPoints ( const int  newMax)

set The Maximum Number of points per series the plot widget stores

Parameters
newMaxnew maximum Number (default:120)

◆ setMaximumTemperature()

void PlotWidget::setMaximumTemperature ( const uint  maxTemp)

set the maximum temperature shown on the plot

Parameters
maxTemp: number greater then 0

◆ update()

void PlotWidget::update ( )
private

Update plot list, need to run after ALL plots added.

Member Data Documentation

◆ _axisX

QDateTimeAxis* PlotWidget::_axisX
private

◆ _axisY

QValueAxis* PlotWidget::_axisY
private

◆ _chart

QChartView* PlotWidget::_chart
private

◆ _plots

QMap<QString, plot*> PlotWidget::_plots
private

◆ m_maximumPoints

int PlotWidget::m_maximumPoints
private

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