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. More...
 
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, VariantPtrgetData (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. More...
 
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
 

Detailed Description

Definition at line 75 of file PlotterController.h.

Constructor & Destructor Documentation

◆ PlotterController()

PlotterController ( QObject *  parent)

Definition at line 36 of file PlotterController.cpp.

+ Here is the call graph for this function:

◆ ~PlotterController()

~PlotterController ( )
override

Definition at line 99 of file PlotterController.cpp.

Member Function Documentation

◆ autoScale

void autoScale ( bool  toggled)
slot

Definition at line 321 of file PlotterController.cpp.

◆ clear()

void clear ( )

Definition at line 909 of file PlotterController.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ clearBarList()

void clearBarList ( )

Definition at line 893 of file PlotterController.cpp.

+ Here is the caller graph for this function:

◆ clearHistory

void clearHistory ( )
slot

Definition at line 920 of file PlotterController.cpp.

◆ createBar()

QwtThermo * createBar ( const QString &  label)
protected

Definition at line 756 of file PlotterController.cpp.

+ Here is the caller graph for this function:

◆ createCurve()

QwtPlotCurve * createCurve ( const QString &  label)
protected

Definition at line 741 of file PlotterController.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getAutoScale()

bool getAutoScale ( ) const

Definition at line 939 of file PlotterController.cpp.

◆ getCurveColors()

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

Definition at line 984 of file PlotterController.cpp.

◆ getData()

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

Definition at line 351 of file PlotterController.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getGraphStyle()

std::string getGraphStyle ( ) const

Definition at line 949 of file PlotterController.cpp.

+ Here is the caller graph for this function:

◆ getPlotterWidget()

QWidget * getPlotterWidget ( )

Definition at line 113 of file PlotterController.cpp.

+ Here is the caller graph for this function:

◆ getPollingInterval()

int getPollingInterval ( ) const

Definition at line 861 of file PlotterController.cpp.

+ Here is the caller graph for this function:

◆ getSelectedDatafields()

QStringList getSelectedDatafields ( ) const

Definition at line 785 of file PlotterController.cpp.

+ Here is the caller graph for this function:

◆ getSelectedDatafieldsKeys()

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

Definition at line 793 of file PlotterController.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getShownInterval()

int getShownInterval ( ) const

Definition at line 926 of file PlotterController.cpp.

+ Here is the caller graph for this function:

◆ getUpdateInterval()

int getUpdateInterval ( ) const

Definition at line 875 of file PlotterController.cpp.

+ Here is the caller graph for this function:

◆ 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

Definition at line 728 of file PlotterController.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ newDataAvailable

void newDataAvailable ( long  timestamp,
const std::map< std::string, VariantPtr > &  newData 
)
signal
+ Here is the caller graph for this function:

◆ plottingPaused

void plottingPaused ( bool  toggled)
slot

Definition at line 330 of file PlotterController.cpp.

+ Here is the caller graph for this function:

◆ pollingExec()

void pollingExec ( )

Definition at line 118 of file PlotterController.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setAutoScale()

void setAutoScale ( bool  value)

Definition at line 944 of file PlotterController.cpp.

+ Here is the call graph for this function:

◆ setCurveColors()

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

Definition at line 989 of file PlotterController.cpp.

+ Here is the call graph for this function:

◆ setGraphStyle

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

Definition at line 954 of file PlotterController.cpp.

+ Here is the caller graph for this function:

◆ setIceManager()

void setIceManager ( const IceManagerPtr value)

Definition at line 886 of file PlotterController.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setPollingInterval()

void setPollingInterval ( int  value)

Definition at line 866 of file PlotterController.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setSelectedDatafields()

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

Changes the datafields that are plotted.

Parameters
value
samplingIntervalMs

Definition at line 848 of file PlotterController.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setShownInterval()

void setShownInterval ( int  value)

Definition at line 931 of file PlotterController.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setupCurves

void setupCurves ( int  samplingIntervalMs = -1)
slot

Definition at line 579 of file PlotterController.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setUpdateInterval()

void setUpdateInterval ( int  value)

Definition at line 880 of file PlotterController.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showCurve

void showCurve ( QwtPlotItem *  item,
bool  on 
)
slot

Definition at line 292 of file PlotterController.cpp.

+ Here is the caller graph for this function:

◆ updateGraph

void updateGraph ( )
slot

Definition at line 126 of file PlotterController.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ __plottingPaused

bool __plottingPaused = false
protected

Definition at line 155 of file PlotterController.h.

◆ autoScalePlot

bool autoScalePlot = true
protected

Definition at line 154 of file PlotterController.h.

◆ barlayout

QHBoxLayout* barlayout
protected

Definition at line 173 of file PlotterController.h.

◆ bars

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

Definition at line 168 of file PlotterController.h.

◆ curveColors

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

Definition at line 167 of file PlotterController.h.

◆ curves

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

Definition at line 166 of file PlotterController.h.

◆ dataMap

GraphDataMap dataMap
protected

Definition at line 164 of file PlotterController.h.

◆ dataMutex

std::recursive_mutex dataMutex
mutableprotected

Definition at line 163 of file PlotterController.h.

◆ graphStyle

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

Definition at line 153 of file PlotterController.h.

◆ iceManager

IceManagerPtr iceManager
protected

Definition at line 160 of file PlotterController.h.

◆ json

JSONObjectPtr json
protected

Definition at line 159 of file PlotterController.h.

◆ markers

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

Definition at line 170 of file PlotterController.h.

◆ plotter

QPointer<QwtPlot> plotter
protected

Definition at line 157 of file PlotterController.h.

◆ pollingInterval

int pollingInterval = 33
protected

Definition at line 150 of file PlotterController.h.

◆ pollingTask

PeriodicTask<PlotterController>::pointer_type pollingTask
protected

Definition at line 161 of file PlotterController.h.

◆ proxyMap

ProxyMap proxyMap
protected

Definition at line 165 of file PlotterController.h.

◆ selectedDatafields

QStringList selectedDatafields
protected

Definition at line 158 of file PlotterController.h.

◆ shownInterval

int shownInterval = 60
protected

Definition at line 152 of file PlotterController.h.

◆ stackedLayout

QStackedLayout* stackedLayout
protected

Definition at line 172 of file PlotterController.h.

◆ timer

QTimer timer
protected

Definition at line 162 of file PlotterController.h.

◆ updateInterval

int updateInterval = 33
protected

Definition at line 151 of file PlotterController.h.

◆ widget

QPointer<QWidget> widget
protected

Definition at line 156 of file PlotterController.h.


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