TwiceAsNice  2019-02-18
Public Member Functions | Private Slots | Private Member Functions | Private Attributes | Friends | List of all members
CurvePlot Class Reference

An instance of this class represents an BridgePlotBuffer which is connected to a property. The Widget displays the buffered numerical data in a 2D-Curve. The curve, buffer size, scale, zoom and export functionalities are implizite provided by the Widget. To connect a property simply call the derived connect function. For additional information plaese see the TwiceAsNice Wiki. More...

#include <CurvePlot.h>

Inheritance diagram for CurvePlot:
Inheritance graph
Collaboration diagram for CurvePlot:
Collaboration graph

Public Member Functions

 CurvePlot (QWidget *parent=0)
 Constructor. More...
 
virtual ~CurvePlot ()
 Destructor. More...
 
void getSessionData (Nice::JointPtr &_data)
 
void setSessionData (Nice::JointPtr _data)
 
void connect (Nice::Joint *_a)
 

Private Slots

virtual void slot_exportPDF ()
 
virtual void slot_stop (bool _stop)
 
virtual void slot_displayChanged ()
 
virtual void slot_saveAs ()
 
virtual void slot_save ()
 
virtual void slot_updateChanged (const QTime &_time)
 
virtual void slot_scaleChanged (int _index)
 
virtual void slot_xChanged (int _index)
 
virtual void slot_bufferChanged (const QTime &_time)
 
virtual void slot_snapChanged (int _index)
 
virtual void slot_scaleX (double _factor)
 
virtual void slot_scaleOffset (double _offset)
 
virtual void slot_scaleDynamic (bool _on)
 
void slot_showCurve (QwtPlotItem *item, bool on)
 
void slot_erase ()
 
virtual void update ()
 
virtual void moved (const QPoint &pos)
 

Private Member Functions

void addScaleLabel ()
 
void showMarker (double x, double y)
 
double getClosestY (const QPoint &pos)
 
double getClosestX (const QPoint &pos)
 
void updateCurveCount ()
 Update the amount of curves pprovides by the BridgePlotBuffer (size of the vector) More...
 
void shrink (unsigned int i)
 Shrinks the amount of curves to the actual amount of data received. More...
 
void grow (unsigned int size)
 Grows the amount of curves to the actual amount of data received. More...
 
void setBufferSizeSpinBox ()
 Initialize the TimeEdit to the size of the BridgePlotBuffer. More...
 
void showOptions ()
 
virtual void setState (Nice::CompletionState _state)
 
void setAttributes (const Nice::Any &t)
 
void startDump ()
 
- Private Member Functions inherited from Ui_CurvePlotUI
void setupUi (QWidget *CurvePlotUI)
 
void retranslateUi (QWidget *CurvePlotUI)
 

Private Attributes

Nice::Mutex m_mutex
 
std::vector< QwtPlotCurve * > m_curve
 
Nice::PropertyBridgePlotBufferm_bridge
 
bool m_rel
 
Nice::Internal::TimeScaleDrawm_scale
 
QTimer * m_timer
 
Nice::Internal::Pickerm_picker
 
QwtPlotMarker * m_marker
 
QwtPlotZoomer * m_zoomer
 
QwtPlotPanner * m_panner
 
QPoint m_mousePos
 
Nice::Propertym_prop
 
Nice::Jointm_joint
 
bool m_snapToPoint
 
double m_scaleFactor
 
double m_scaleMin
 
double m_scaleMax
 
double m_scaleOffsetFactor
 
bool m_dynamicScale
 
QString m_saveFileName
 
QwtPlotMarker * m_min
 
QwtPlotMarker * m_max
 
QwtPlotMarker * m_alarm
 
- Private Attributes inherited from Ui_CurvePlotUI
QHBoxLayout * horizontalLayout_3
 
QSplitter * splitter
 
QWidget * widget
 
QGridLayout * gridLayout_2
 
QwtPlot * m_plot
 
QwtWheel * m_scaleOffset
 
QwtWheel * m_scaleX
 
QCheckBox * m_dynamicX
 
QFrame * frame
 
QGridLayout * gridLayout
 
QHBoxLayout * horizontalLayout
 
QSpacerItem * horizontalSpacer
 
QToolButton * m_saveButton
 
QToolButton * m_saveAsButton
 
QToolButton * pdfButton
 
QToolButton * m_stopButton
 
QToolButton * m_clearButton
 
QHBoxLayout * horizontalLayout_2
 
QVBoxLayout * verticalLayout_2
 
QLabel * label
 
QLabel * label_2
 
QLabel * label_3
 
QLabel * label_4
 
QLabel * label_5
 
QLabel * label_6
 
QVBoxLayout * verticalLayout
 
QComboBox * m_scaleComboBox
 
QComboBox * m_displayComboBox
 
QComboBox * m_snapComboBox
 
QTimeEdit * m_updateInterval
 
QTimeEdit * m_timeBuffer
 
QComboBox * m_XComboBox
 
QSpacerItem * verticalSpacer
 

Friends

class AbstractWidgetItem
 

Detailed Description

An instance of this class represents an BridgePlotBuffer which is connected to a property. The Widget displays the buffered numerical data in a 2D-Curve. The curve, buffer size, scale, zoom and export functionalities are implizite provided by the Widget. To connect a property simply call the derived connect function. For additional information plaese see the TwiceAsNice Wiki.

Author
Berwein
Version
Date
2012-08-10 11:05:00 AM

Constructor & Destructor Documentation

◆ CurvePlot()

CurvePlot::CurvePlot ( QWidget *  parent = 0)

Constructor.

Parameters
parentParent widget.

◆ ~CurvePlot()

CurvePlot::~CurvePlot ( )
virtual

Destructor.

Member Function Documentation

◆ addScaleLabel()

void CurvePlot::addScaleLabel ( )
private

◆ connect()

void CurvePlot::connect ( Nice::Joint _a)
Parameters

◆ getClosestX()

double CurvePlot::getClosestX ( const QPoint &  pos)
private

◆ getClosestY()

double CurvePlot::getClosestY ( const QPoint &  pos)
private

◆ getSessionData()

void CurvePlot::getSessionData ( Nice::JointPtr _data)
Parameters

◆ grow()

void CurvePlot::grow ( unsigned int  size)
private

Grows the amount of curves to the actual amount of data received.

Parameters
iThe size to grow the amount of curves to.

◆ moved

void CurvePlot::moved ( const QPoint &  pos)
privatevirtualslot
Parameters

◆ setAttributes()

void CurvePlot::setAttributes ( const Nice::Any t)
private

◆ setBufferSizeSpinBox()

void CurvePlot::setBufferSizeSpinBox ( )
private

Initialize the TimeEdit to the size of the BridgePlotBuffer.

◆ setSessionData()

void CurvePlot::setSessionData ( Nice::JointPtr  _data)
Parameters

◆ setState()

virtual void CurvePlot::setState ( Nice::CompletionState  _state)
inlineprivatevirtual
Parameters

◆ showMarker()

void CurvePlot::showMarker ( double  x,
double  y 
)
private

◆ showOptions()

void CurvePlot::showOptions ( )
private
Parameters

◆ shrink()

void CurvePlot::shrink ( unsigned int  i)
private

Shrinks the amount of curves to the actual amount of data received.

Parameters
iThe size to shrink the amount of curves to.

◆ slot_bufferChanged

void CurvePlot::slot_bufferChanged ( const QTime &  _time)
privatevirtualslot
Parameters

◆ slot_displayChanged

void CurvePlot::slot_displayChanged ( )
privatevirtualslot
Parameters

◆ slot_erase

void CurvePlot::slot_erase ( )
privateslot
Parameters

◆ slot_exportPDF

void CurvePlot::slot_exportPDF ( )
privatevirtualslot
Parameters

◆ slot_save

void CurvePlot::slot_save ( )
privatevirtualslot
Parameters

◆ slot_saveAs

void CurvePlot::slot_saveAs ( )
privatevirtualslot
Parameters

◆ slot_scaleChanged

void CurvePlot::slot_scaleChanged ( int  _index)
privatevirtualslot
Parameters

◆ slot_scaleDynamic

void CurvePlot::slot_scaleDynamic ( bool  _on)
privatevirtualslot
Parameters

◆ slot_scaleOffset

void CurvePlot::slot_scaleOffset ( double  _offset)
privatevirtualslot
Parameters

◆ slot_scaleX

void CurvePlot::slot_scaleX ( double  _factor)
privatevirtualslot
Parameters

◆ slot_showCurve

void CurvePlot::slot_showCurve ( QwtPlotItem *  item,
bool  on 
)
privateslot
Parameters

◆ slot_snapChanged

void CurvePlot::slot_snapChanged ( int  _index)
privatevirtualslot
Parameters

◆ slot_stop

void CurvePlot::slot_stop ( bool  _stop)
privatevirtualslot
Parameters

◆ slot_updateChanged

void CurvePlot::slot_updateChanged ( const QTime &  _time)
privatevirtualslot
Parameters

◆ slot_xChanged

void CurvePlot::slot_xChanged ( int  _index)
privatevirtualslot
Parameters

◆ startDump()

void CurvePlot::startDump ( )
private
Parameters

◆ update

void CurvePlot::update ( )
privatevirtualslot
Parameters

◆ updateCurveCount()

void CurvePlot::updateCurveCount ( )
private

Update the amount of curves pprovides by the BridgePlotBuffer (size of the vector)

Friends And Related Function Documentation

◆ AbstractWidgetItem

friend class AbstractWidgetItem
friend

Member Data Documentation

◆ m_alarm

QwtPlotMarker* CurvePlot::m_alarm
private

◆ m_bridge

Nice::PropertyBridgePlotBuffer* CurvePlot::m_bridge
private

◆ m_curve

std::vector<QwtPlotCurve*> CurvePlot::m_curve
private

◆ m_dynamicScale

bool CurvePlot::m_dynamicScale
private

◆ m_joint

Nice::Joint* CurvePlot::m_joint
private

◆ m_marker

QwtPlotMarker* CurvePlot::m_marker
private

◆ m_max

QwtPlotMarker* CurvePlot::m_max
private

◆ m_min

QwtPlotMarker* CurvePlot::m_min
private

◆ m_mousePos

QPoint CurvePlot::m_mousePos
private

◆ m_mutex

Nice::Mutex CurvePlot::m_mutex
private

Mutex

◆ m_panner

QwtPlotPanner* CurvePlot::m_panner
private

◆ m_picker

Nice::Internal::Picker* CurvePlot::m_picker
private

◆ m_prop

Nice::Property* CurvePlot::m_prop
private

◆ m_rel

bool CurvePlot::m_rel
private

◆ m_saveFileName

QString CurvePlot::m_saveFileName
private

◆ m_scale

Nice::Internal::TimeScaleDraw* CurvePlot::m_scale
private

◆ m_scaleFactor

double CurvePlot::m_scaleFactor
private

◆ m_scaleMax

double CurvePlot::m_scaleMax
private

◆ m_scaleMin

double CurvePlot::m_scaleMin
private

◆ m_scaleOffsetFactor

double CurvePlot::m_scaleOffsetFactor
private

◆ m_snapToPoint

bool CurvePlot::m_snapToPoint
private

◆ m_timer

QTimer* CurvePlot::m_timer
private

◆ m_zoomer

QwtPlotZoomer* CurvePlot::m_zoomer
private

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