![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
Waveform widget. More...
#include <ecvWaveformDialog.h>


Public Member Functions | |
| ccWaveWidget (QWidget *parent=nullptr) | |
| Default constructor. More... | |
| ~ccWaveWidget () override | |
| Destructor. More... | |
| void | setTitle (const QString &str) |
| Sets title. More... | |
| void | setAxisLabels (const QString &xLabel, const QString &yLabel) |
| Sets axis labels. More... | |
| void | init (ccPointCloud *cloud, unsigned pointIndex, bool logScale, double maxValue=0.0) |
| Computes the wave (curve) from a given point waveform. More... | |
| void | clear () |
| Clears the display. More... | |
| void | refresh () |
| Updates the display. More... | |
Protected Member Functions | |
| void | mousePressEvent (QMouseEvent *event) override |
| void | mouseMoveEvent (QMouseEvent *event) override |
| void | resizeEvent (QResizeEvent *event) override |
| void | updateCurveWidth (int w, int h) |
| Updates overlay curve width depending on the widget display size. More... | |
Protected Attributes | |
| QString | m_titleStr |
| QCPTextElement * | m_titlePlot |
| QCPGraph * | m_curve |
| Wave curve. More... | |
| std::vector< double > | m_curveValues |
| double | m_dt |
| double | m_minA |
| double | m_maxA |
| double | m_echoPos |
| QCPBarsWithText * | m_vertBar |
| bool | m_drawVerticalIndicator |
| double | m_verticalIndicatorPositionPercent |
| QCPBarsWithText * | m_peakBar |
| QFont | m_renderingFont |
| Rendering font. More... | |
| QPoint | m_lastMouseClick |
| Last mouse click. More... | |
Waveform widget.
Definition at line 30 of file ecvWaveformDialog.h.
|
explicit |
Default constructor.
Definition at line 35 of file ecvWaveformDialog.cpp.
References m_renderingFont.
|
override |
Destructor.
Definition at line 68 of file ecvWaveformDialog.cpp.
| void ccWaveWidget::clear | ( | void | ) |
| void ccWaveWidget::init | ( | ccPointCloud * | cloud, |
| unsigned | pointIndex, | ||
| bool | logScale, | ||
| double | maxValue = 0.0 |
||
| ) |
Computes the wave (curve) from a given point waveform.
Definition at line 103 of file ecvWaveformDialog.cpp.
References AbsLog(), ccWaveformProxy::descriptor(), ccWaveformProxy::echoTime_ps(), CVLog::Error(), ccWaveformProxy::getSample(), ccPointCloud::hasFWF(), ccWaveformProxy::isValid(), m_curveValues, m_dt, m_echoPos, m_maxA, m_minA, max(), min(), ccWaveformProxy::numberOfSamples(), WaveformDescriptor::samplingRate_ps, and ccPointCloud::waveformProxy().
Referenced by ccWaveDialog::onPointIndexChanged().
|
overrideprotected |
Definition at line 292 of file ecvWaveformDialog.cpp.
References event, m_curve, m_curveValues, m_drawVerticalIndicator, m_verticalIndicatorPositionPercent, and refresh().
Referenced by mousePressEvent().
|
overrideprotected |
Definition at line 286 of file ecvWaveformDialog.cpp.
References event, m_lastMouseClick, and mouseMoveEvent().
| void ccWaveWidget::refresh | ( | ) |
Updates the display.
Definition at line 154 of file ecvWaveformDialog.cpp.
References QCPBarsWithText::appendText(), ecvColor::blue(), height, m_curve, m_curveValues, m_drawVerticalIndicator, m_dt, m_echoPos, m_maxA, m_minA, m_peakBar, m_renderingFont, m_titlePlot, m_titleStr, m_vertBar, m_verticalIndicatorPositionPercent, ecvGui::Parameters(), ecvColor::red(), QCPBarsWithText::setText(), QCPBarsWithText::setTextAlignment(), updateCurveWidth(), and width.
Referenced by clear(), mouseMoveEvent(), ccWaveDialog::onPointIndexChanged(), and resizeEvent().
|
overrideprotected |
Definition at line 278 of file ecvWaveformDialog.cpp.
References event, refresh(), and updateCurveWidth().
| void ccWaveWidget::setAxisLabels | ( | const QString & | xLabel, |
| const QString & | yLabel | ||
| ) |
Sets axis labels.
Definition at line 83 of file ecvWaveformDialog.cpp.
| void ccWaveWidget::setTitle | ( | const QString & | str | ) |
|
protected |
Updates overlay curve width depending on the widget display size.
Definition at line 267 of file ecvWaveformDialog.cpp.
References m_curve, and max().
Referenced by refresh(), and resizeEvent().
|
protected |
Wave curve.
Definition at line 74 of file ecvWaveformDialog.h.
Referenced by mouseMoveEvent(), refresh(), and updateCurveWidth().
|
protected |
Definition at line 75 of file ecvWaveformDialog.h.
Referenced by init(), mouseMoveEvent(), and refresh().
|
protected |
Definition at line 82 of file ecvWaveformDialog.h.
Referenced by mouseMoveEvent(), and refresh().
|
protected |
Definition at line 76 of file ecvWaveformDialog.h.
|
protected |
Definition at line 78 of file ecvWaveformDialog.h.
|
protected |
Last mouse click.
Definition at line 92 of file ecvWaveformDialog.h.
Referenced by mousePressEvent().
|
protected |
Definition at line 77 of file ecvWaveformDialog.h.
|
protected |
Definition at line 77 of file ecvWaveformDialog.h.
|
protected |
Definition at line 86 of file ecvWaveformDialog.h.
Referenced by refresh().
|
protected |
Rendering font.
Definition at line 89 of file ecvWaveformDialog.h.
Referenced by ccWaveWidget(), and refresh().
|
protected |
Definition at line 71 of file ecvWaveformDialog.h.
Referenced by refresh().
|
protected |
Definition at line 70 of file ecvWaveformDialog.h.
Referenced by refresh(), and setTitle().
|
protected |
Definition at line 81 of file ecvWaveformDialog.h.
Referenced by refresh().
|
protected |
Definition at line 83 of file ecvWaveformDialog.h.
Referenced by mouseMoveEvent(), and refresh().