![]() |
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... | |
Public Member Functions inherited from QCustomPlot | |
| QCustomPlot (QWidget *parent=0) | |
| virtual | ~QCustomPlot () |
| QRect | viewport () const |
| double | bufferDevicePixelRatio () const |
| QPixmap | background () const |
| bool | backgroundScaled () const |
| Qt::AspectRatioMode | backgroundScaledMode () const |
| QCPLayoutGrid * | plotLayout () const |
| QCP::AntialiasedElements | antialiasedElements () const |
| QCP::AntialiasedElements | notAntialiasedElements () const |
| bool | autoAddPlottableToLegend () const |
| const QCP::Interactions | interactions () const |
| int | selectionTolerance () const |
| bool | noAntialiasingOnDrag () const |
| QCP::PlottingHints | plottingHints () const |
| Qt::KeyboardModifier | multiSelectModifier () const |
| QCP::SelectionRectMode | selectionRectMode () const |
| QCPSelectionRect * | selectionRect () const |
| bool | openGl () const |
| void | setViewport (const QRect &rect) |
| void | setBufferDevicePixelRatio (double ratio) |
| void | setBackground (const QPixmap &pm) |
| void | setBackground (const QPixmap &pm, bool scaled, Qt::AspectRatioMode mode=Qt::KeepAspectRatioByExpanding) |
| void | setBackground (const QBrush &brush) |
| void | setBackgroundScaled (bool scaled) |
| void | setBackgroundScaledMode (Qt::AspectRatioMode mode) |
| void | setAntialiasedElements (const QCP::AntialiasedElements &antialiasedElements) |
| void | setAntialiasedElement (QCP::AntialiasedElement antialiasedElement, bool enabled=true) |
| void | setNotAntialiasedElements (const QCP::AntialiasedElements ¬AntialiasedElements) |
| void | setNotAntialiasedElement (QCP::AntialiasedElement notAntialiasedElement, bool enabled=true) |
| void | setAutoAddPlottableToLegend (bool on) |
| void | setInteractions (const QCP::Interactions &interactions) |
| void | setInteraction (const QCP::Interaction &interaction, bool enabled=true) |
| void | setSelectionTolerance (int pixels) |
| void | setNoAntialiasingOnDrag (bool enabled) |
| void | setPlottingHints (const QCP::PlottingHints &hints) |
| void | setPlottingHint (QCP::PlottingHint hint, bool enabled=true) |
| void | setMultiSelectModifier (Qt::KeyboardModifier modifier) |
| void | setSelectionRectMode (QCP::SelectionRectMode mode) |
| void | setSelectionRect (QCPSelectionRect *selectionRect) |
| void | setOpenGl (bool enabled, int multisampling=16) |
| QCPAbstractPlottable * | plottable (int index) |
| QCPAbstractPlottable * | plottable () |
| bool | removePlottable (QCPAbstractPlottable *plottable) |
| bool | removePlottable (int index) |
| int | clearPlottables () |
| int | plottableCount () const |
| QList< QCPAbstractPlottable * > | selectedPlottables () const |
| QCPAbstractPlottable * | plottableAt (const QPointF &pos, bool onlySelectable=false) const |
| bool | hasPlottable (QCPAbstractPlottable *plottable) const |
| QCPGraph * | graph (int index) const |
| QCPGraph * | graph () const |
| QCPGraph * | addGraph (QCPAxis *keyAxis=0, QCPAxis *valueAxis=0) |
| bool | removeGraph (QCPGraph *graph) |
| bool | removeGraph (int index) |
| int | clearGraphs () |
| int | graphCount () const |
| QList< QCPGraph * > | selectedGraphs () const |
| QCPAbstractItem * | item (int index) const |
| QCPAbstractItem * | item () const |
| bool | removeItem (QCPAbstractItem *item) |
| bool | removeItem (int index) |
| int | clearItems () |
| int | itemCount () const |
| QList< QCPAbstractItem * > | selectedItems () const |
| QCPAbstractItem * | itemAt (const QPointF &pos, bool onlySelectable=false) const |
| bool | hasItem (QCPAbstractItem *item) const |
| QCPLayer * | layer (const QString &name) const |
| QCPLayer * | layer (int index) const |
| QCPLayer * | currentLayer () const |
| bool | setCurrentLayer (const QString &name) |
| bool | setCurrentLayer (QCPLayer *layer) |
| int | layerCount () const |
| bool | addLayer (const QString &name, QCPLayer *otherLayer=0, LayerInsertMode insertMode=limAbove) |
| bool | removeLayer (QCPLayer *layer) |
| bool | moveLayer (QCPLayer *layer, QCPLayer *otherLayer, LayerInsertMode insertMode=limAbove) |
| int | axisRectCount () const |
| QCPAxisRect * | axisRect (int index=0) const |
| QList< QCPAxisRect * > | axisRects () const |
| QCPLayoutElement * | layoutElementAt (const QPointF &pos) const |
| QCPAxisRect * | axisRectAt (const QPointF &pos) const |
| Q_SLOT void | rescaleAxes (bool onlyVisiblePlottables=false) |
| QList< QCPAxis * > | selectedAxes () const |
| QList< QCPLegend * > | selectedLegends () const |
| Q_SLOT void | deselectAll () |
| bool | savePdf (const QString &fileName, int width=0, int height=0, QCP::ExportPen exportPen=QCP::epAllowCosmetic, const QString &pdfCreator=QString(), const QString &pdfTitle=QString()) |
| bool | savePng (const QString &fileName, int width=0, int height=0, double scale=1.0, int quality=-1, int resolution=96, QCP::ResolutionUnit resolutionUnit=QCP::ruDotsPerInch) |
| bool | saveJpg (const QString &fileName, int width=0, int height=0, double scale=1.0, int quality=-1, int resolution=96, QCP::ResolutionUnit resolutionUnit=QCP::ruDotsPerInch) |
| bool | saveBmp (const QString &fileName, int width=0, int height=0, double scale=1.0, int resolution=96, QCP::ResolutionUnit resolutionUnit=QCP::ruDotsPerInch) |
| bool | saveRastered (const QString &fileName, int width, int height, double scale, const char *format, int quality=-1, int resolution=96, QCP::ResolutionUnit resolutionUnit=QCP::ruDotsPerInch) |
| QPixmap | toPixmap (int width=0, int height=0, double scale=1.0) |
| void | toPainter (QCPPainter *painter, int width=0, int height=0) |
| Q_SLOT void | replot (QCustomPlot::RefreshPriority refreshPriority=QCustomPlot::rpRefreshHint) |
| QCustomPlot (QWidget *parent=0) | |
| virtual | ~QCustomPlot () |
| QRect | viewport () const |
| QPixmap | background () const |
| bool | backgroundScaled () const |
| Qt::AspectRatioMode | backgroundScaledMode () const |
| QCPLayoutGrid * | plotLayout () const |
| QCP::AntialiasedElements | antialiasedElements () const |
| QCP::AntialiasedElements | notAntialiasedElements () const |
| bool | autoAddPlottableToLegend () const |
| const QCP::Interactions | interactions () const |
| int | selectionTolerance () const |
| bool | noAntialiasingOnDrag () const |
| QCP::PlottingHints | plottingHints () const |
| Qt::KeyboardModifier | multiSelectModifier () const |
| void | setViewport (const QRect &rect) |
| void | setBackground (const QPixmap &pm) |
| void | setBackground (const QPixmap &pm, bool scaled, Qt::AspectRatioMode mode=Qt::KeepAspectRatioByExpanding) |
| void | setBackground (const QBrush &brush) |
| void | setBackgroundScaled (bool scaled) |
| void | setBackgroundScaledMode (Qt::AspectRatioMode mode) |
| void | setAntialiasedElements (const QCP::AntialiasedElements &antialiasedElements) |
| void | setAntialiasedElement (QCP::AntialiasedElement antialiasedElement, bool enabled=true) |
| void | setNotAntialiasedElements (const QCP::AntialiasedElements ¬AntialiasedElements) |
| void | setNotAntialiasedElement (QCP::AntialiasedElement notAntialiasedElement, bool enabled=true) |
| void | setAutoAddPlottableToLegend (bool on) |
| void | setInteractions (const QCP::Interactions &interactions) |
| void | setInteraction (const QCP::Interaction &interaction, bool enabled=true) |
| void | setSelectionTolerance (int pixels) |
| void | setNoAntialiasingOnDrag (bool enabled) |
| void | setPlottingHints (const QCP::PlottingHints &hints) |
| void | setPlottingHint (QCP::PlottingHint hint, bool enabled=true) |
| void | setMultiSelectModifier (Qt::KeyboardModifier modifier) |
| QCPAbstractPlottable * | plottable (int index) |
| QCPAbstractPlottable * | plottable () |
| bool | addPlottable (QCPAbstractPlottable *plottable) |
| bool | removePlottable (QCPAbstractPlottable *plottable) |
| bool | removePlottable (int index) |
| int | clearPlottables () |
| int | plottableCount () const |
| QList< QCPAbstractPlottable * > | selectedPlottables () const |
| QCPAbstractPlottable * | plottableAt (const QPointF &pos, bool onlySelectable=false) const |
| bool | hasPlottable (QCPAbstractPlottable *plottable) const |
| QCPGraph * | graph (int index) const |
| QCPGraph * | graph () const |
| QCPGraph * | addGraph (QCPAxis *keyAxis=0, QCPAxis *valueAxis=0) |
| bool | removeGraph (QCPGraph *graph) |
| bool | removeGraph (int index) |
| int | clearGraphs () |
| int | graphCount () const |
| QList< QCPGraph * > | selectedGraphs () const |
| QCPAbstractItem * | item (int index) const |
| QCPAbstractItem * | item () const |
| bool | addItem (QCPAbstractItem *item) |
| bool | removeItem (QCPAbstractItem *item) |
| bool | removeItem (int index) |
| int | clearItems () |
| int | itemCount () const |
| QList< QCPAbstractItem * > | selectedItems () const |
| QCPAbstractItem * | itemAt (const QPointF &pos, bool onlySelectable=false) const |
| bool | hasItem (QCPAbstractItem *item) const |
| QCPLayer * | layer (const QString &name) const |
| QCPLayer * | layer (int index) const |
| QCPLayer * | currentLayer () const |
| bool | setCurrentLayer (const QString &name) |
| bool | setCurrentLayer (QCPLayer *layer) |
| int | layerCount () const |
| bool | addLayer (const QString &name, QCPLayer *otherLayer=0, LayerInsertMode insertMode=limAbove) |
| bool | removeLayer (QCPLayer *layer) |
| bool | moveLayer (QCPLayer *layer, QCPLayer *otherLayer, LayerInsertMode insertMode=limAbove) |
| int | axisRectCount () const |
| QCPAxisRect * | axisRect (int index=0) const |
| QList< QCPAxisRect * > | axisRects () const |
| QCPLayoutElement * | layoutElementAt (const QPointF &pos) const |
| Q_SLOT void | rescaleAxes (bool onlyVisiblePlottables=false) |
| QList< QCPAxis * > | selectedAxes () const |
| QList< QCPLegend * > | selectedLegends () const |
| Q_SLOT void | deselectAll () |
| bool | savePdf (const QString &fileName, bool noCosmeticPen=false, int width=0, int height=0, const QString &pdfCreator=QString(), const QString &pdfTitle=QString()) |
| bool | savePng (const QString &fileName, int width=0, int height=0, double scale=1.0, int quality=-1) |
| bool | saveJpg (const QString &fileName, int width=0, int height=0, double scale=1.0, int quality=-1) |
| bool | saveBmp (const QString &fileName, int width=0, int height=0, double scale=1.0) |
| bool | saveRastered (const QString &fileName, int width, int height, double scale, const char *format, int quality=-1) |
| QPixmap | toPixmap (int width=0, int height=0, double scale=1.0) |
| void | toPainter (QCPPainter *painter, int width=0, int height=0) |
| Q_SLOT void | replot (QCustomPlot::RefreshPriority refreshPriority=QCustomPlot::rpHint) |
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 Member Functions inherited from QCustomPlot | |
| virtual QSize | minimumSizeHint () const |
| virtual QSize | sizeHint () const |
| virtual void | paintEvent (QPaintEvent *event) |
| virtual void | mouseDoubleClickEvent (QMouseEvent *event) |
| virtual void | mouseReleaseEvent (QMouseEvent *event) |
| virtual void | wheelEvent (QWheelEvent *event) |
| virtual void | draw (QCPPainter *painter) |
| virtual void | updateLayout () |
| virtual void | axisRemoved (QCPAxis *axis) |
| virtual void | legendRemoved (QCPLegend *legend) |
| virtual Q_SLOT void | processRectSelection (QRect rect, QMouseEvent *event) |
| virtual Q_SLOT void | processRectZoom (QRect rect, QMouseEvent *event) |
| virtual Q_SLOT void | processPointSelection (QMouseEvent *event) |
| bool | registerPlottable (QCPAbstractPlottable *plottable) |
| bool | registerGraph (QCPGraph *graph) |
| bool | registerItem (QCPAbstractItem *item) |
| void | updateLayerIndices () const |
| QCPLayerable * | layerableAt (const QPointF &pos, bool onlySelectable, QVariant *selectionDetails=0) const |
| QList< QCPLayerable * > | layerableListAt (const QPointF &pos, bool onlySelectable, QList< QVariant > *selectionDetails=0) const |
| void | drawBackground (QCPPainter *painter) |
| void | setupPaintBuffers () |
| QCPAbstractPaintBuffer * | createPaintBuffer () |
| bool | hasInvalidatedPaintBuffers () |
| bool | setupOpenGl () |
| void | freeOpenGl () |
| virtual QSize | minimumSizeHint () const |
| virtual QSize | sizeHint () const |
| virtual void | paintEvent (QPaintEvent *event) |
| virtual void | mouseDoubleClickEvent (QMouseEvent *event) |
| virtual void | mouseReleaseEvent (QMouseEvent *event) |
| virtual void | wheelEvent (QWheelEvent *event) |
| virtual void | draw (QCPPainter *painter) |
| virtual void | axisRemoved (QCPAxis *axis) |
| virtual void | legendRemoved (QCPLegend *legend) |
| void | updateLayerIndices () const |
| QCPLayerable * | layerableAt (const QPointF &pos, bool onlySelectable, QVariant *selectionDetails=0) const |
| void | drawBackground (QCPPainter *painter) |
Waveform widget.
Definition at line 30 of file ecvWaveformDialog.h.
|
explicit |
Default constructor.
Definition at line 35 of file ecvWaveformDialog.cpp.
References m_renderingFont, QCustomPlot::setAutoAddPlottableToLegend(), QCPAxis::setSubTickLength(), QCPAxis::setTickLength(), QCustomPlot::xAxis, and QCustomPlot::yAxis.
|
override |
Destructor.
Definition at line 68 of file ecvWaveformDialog.cpp.
| void ccWaveWidget::clear | ( | ) |
| 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, ccWaveformProxy::numberOfSamples(), WaveformDescriptor::samplingRate_ps, and ccPointCloud::waveformProxy().
Referenced by ccWaveDialog::onPointIndexChanged().
|
overrideprotectedvirtual |
Reimplemented from QCustomPlot.
Definition at line 292 of file ecvWaveformDialog.cpp.
References event, m_curve, m_curveValues, m_drawVerticalIndicator, m_verticalIndicatorPositionPercent, and refresh().
Referenced by mousePressEvent().
|
overrideprotectedvirtual |
Reimplemented from QCustomPlot.
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 QCPLayoutGrid::addElement(), QCustomPlot::addGraph(), QCPBarsWithText::appendText(), ecvColor::blue(), QCustomPlot::clearGraphs(), QCustomPlot::clearPlottables(), height, QCPLayoutGrid::insertRow(), 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(), QCustomPlot::plotLayout(), ecvColor::red(), QCPLayout::remove(), QCustomPlot::replot(), QCPAbstractPlottable::setAntialiasedFill(), QCPAbstractPlottable::setBrush(), QCPBars::setData(), QCPGraph::setData(), QCPTextElement::setFont(), QCPAbstractPlottable::setName(), QCPAbstractPlottable::setPen(), QCPAxis::setRange(), QCPBarsWithText::setText(), QCPBarsWithText::setTextAlignment(), QCPBars::setWidth(), updateCurveWidth(), width, x, QCustomPlot::xAxis, y, and QCustomPlot::yAxis.
Referenced by clear(), mouseMoveEvent(), ccWaveDialog::onPointIndexChanged(), and resizeEvent().
|
overrideprotectedvirtual |
Reimplemented from QCustomPlot.
Definition at line 278 of file ecvWaveformDialog.cpp.
References event, refresh(), QCustomPlot::resizeEvent(), and updateCurveWidth().
| void ccWaveWidget::setAxisLabels | ( | const QString & | xLabel, |
| const QString & | yLabel | ||
| ) |
Sets axis labels.
Definition at line 83 of file ecvWaveformDialog.cpp.
References QCPAxis::setLabel(), QCPLayerable::setVisible(), QCustomPlot::xAxis, and QCustomPlot::yAxis.
| 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, QCPAbstractPlottable::pen(), and QCPAbstractPlottable::setPen().
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().