PlotterController Class Reference

#include <ArmarXGui/libraries/PlotterController/PlotterController.h>

+ Inheritance diagram for PlotterController:

Public Slots

void autoScale (bool toggled)
 
void clearHistory ()
 
void legendChecked (const QVariant &itemInfo, bool on)
 Required for Qt5.
 
void plottingPaused (bool toggled)
 
void setGraphStyle (const std::string &style)
 
void setupCurves (int samplingIntervalMs=-1)
 
void showCurve (QwtPlotItem *item, bool on)
 
void updateGraph ()
 

Signals

void newDataAvailable (long timestamp, const std::map< std::string, VariantPtr > &newData)
 

Public Member Functions

void clear ()
 
void clearBarList ()
 
bool getAutoScale () const
 
std::vector< Qt::GlobalColor > getCurveColors () const
 
std::map< std::string, VariantPtr > getData (const QStringList &channels)
 
std::string getGraphStyle () const
 
QWidget * getPlotterWidget ()
 
int getPollingInterval () const
 
QStringList getSelectedDatafields () const
 
std::vector< std::string > getSelectedDatafieldsKeys () const
 
int getShownInterval () const
 
int getUpdateInterval () const
 
 PlotterController (QObject *parent)
 
void pollingExec ()
 
void setAutoScale (bool value)
 
void setCurveColors (const std::vector< Qt::GlobalColor > &value)
 
void setIceManager (const IceManagerPtr &value)
 
void setPollingInterval (int value)
 
void setSelectedDatafields (const QStringList &value, int samplingIntervalMs=-1)
 Changes the datafields that are plotted.
 
void setShownInterval (int value)
 
void setUpdateInterval (int value)
 
 ~PlotterController () override
 

Protected Member Functions

QwtThermo * createBar (const QString &label)
 
QwtPlotCurve * createCurve (const QString &label)
 

Protected Attributes

bool __plottingPaused = false
 
bool autoScalePlot = true
 
QHBoxLayout * barlayout
 
std::map< std::string, QwtThermo * > bars
 
std::vector< Qt::GlobalColor > curveColors
 
std::map< std::string, QwtPlotCurve * > curves
 
GraphDataMap dataMap
 
std::recursive_mutex dataMutex
 
std::string graphStyle = "Curve (line, interpolate)"
 
IceManagerPtr iceManager
 
JSONObjectPtr json
 
std::map< std::string, std::map< IceUtil::Time, std::map< std::string, QwtPlotMarkerPtr > > > markers
 
QPointer< QwtPlot > plotter
 
int pollingInterval = 33
 
PeriodicTask< PlotterController >::pointer_type pollingTask
 
ProxyMap proxyMap
 
QStringList selectedDatafields
 
int shownInterval = 60
 
QStackedLayout * stackedLayout
 
QTimer timer
 
int updateInterval = 33
 
QPointer< QWidget > widget
 

Constructor & Destructor Documentation

◆ PlotterController()

PlotterController ( QObject * parent)

◆ ~PlotterController()

~PlotterController ( )
override

Member Function Documentation

◆ autoScale

void autoScale ( bool toggled)
slot

◆ clear()

void clear ( )

◆ clearBarList()

void clearBarList ( )

◆ clearHistory

void clearHistory ( )
slot

◆ createBar()

QwtThermo * createBar ( const QString & label)
protected

◆ createCurve()

QwtPlotCurve * createCurve ( const QString & label)
protected

◆ getAutoScale()

bool getAutoScale ( ) const

◆ getCurveColors()

std::vector< Qt::GlobalColor > getCurveColors ( ) const

◆ getData()

std::map< std::string, VariantPtr > getData ( const QStringList & channels)

◆ getGraphStyle()

std::string getGraphStyle ( ) const

◆ getPlotterWidget()

QWidget * getPlotterWidget ( )

◆ getPollingInterval()

int getPollingInterval ( ) const

◆ getSelectedDatafields()

QStringList getSelectedDatafields ( ) const

◆ getSelectedDatafieldsKeys()

std::vector< std::string > getSelectedDatafieldsKeys ( ) const

◆ getShownInterval()

int getShownInterval ( ) const

◆ getUpdateInterval()

int getUpdateInterval ( ) const

◆ legendChecked

void legendChecked ( const QVariant & itemInfo,
bool on )
slot

Required for Qt5.

This can't be deactivated via if, because the moc ignores all preprocessor code. Hence there is a dummy implementation for Qt4

◆ newDataAvailable

void newDataAvailable ( long timestamp,
const std::map< std::string, VariantPtr > & newData )
signal

◆ plottingPaused

void plottingPaused ( bool toggled)
slot

◆ pollingExec()

void pollingExec ( )

◆ setAutoScale()

void setAutoScale ( bool value)

◆ setCurveColors()

void setCurveColors ( const std::vector< Qt::GlobalColor > & value)

◆ setGraphStyle

void setGraphStyle ( const std::string & style)
slot

◆ setIceManager()

void setIceManager ( const IceManagerPtr & value)

◆ setPollingInterval()

void setPollingInterval ( int value)

◆ setSelectedDatafields()

void setSelectedDatafields ( const QStringList & value,
int samplingIntervalMs = -1 )

Changes the datafields that are plotted.

Parameters
value
samplingIntervalMs

◆ setShownInterval()

void setShownInterval ( int value)

◆ setupCurves

void setupCurves ( int samplingIntervalMs = -1)
slot

◆ setUpdateInterval()

void setUpdateInterval ( int value)

◆ showCurve

void showCurve ( QwtPlotItem * item,
bool on )
slot

◆ updateGraph

void updateGraph ( )
slot

Member Data Documentation

◆ __plottingPaused

bool __plottingPaused = false
protected

◆ autoScalePlot

bool autoScalePlot = true
protected

◆ barlayout

QHBoxLayout* barlayout
protected

◆ bars

std::map<std::string, QwtThermo*> bars
protected

◆ curveColors

std::vector<Qt::GlobalColor> curveColors
protected

◆ curves

std::map<std::string, QwtPlotCurve*> curves
protected

◆ dataMap

GraphDataMap dataMap
protected

◆ dataMutex

std::recursive_mutex dataMutex
mutableprotected

◆ graphStyle

std::string graphStyle = "Curve (line, interpolate)"
protected

◆ iceManager

IceManagerPtr iceManager
protected

◆ json

JSONObjectPtr json
protected

◆ markers

std::map<std::string, std::map<IceUtil::Time, std::map<std::string, QwtPlotMarkerPtr> > > markers
protected

◆ plotter

QPointer<QwtPlot> plotter
protected

◆ pollingInterval

int pollingInterval = 33
protected

◆ pollingTask

PeriodicTask<PlotterController>::pointer_type pollingTask
protected

◆ proxyMap

ProxyMap proxyMap
protected

◆ selectedDatafields

QStringList selectedDatafields
protected

◆ shownInterval

int shownInterval = 60
protected

◆ stackedLayout

QStackedLayout* stackedLayout
protected

◆ timer

QTimer timer
protected

◆ updateInterval

int updateInterval = 33
protected

◆ widget

QPointer<QWidget> widget
protected

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