Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
Public Member Functions | List of all members
RtpAudioGraph Class Reference

Manages the visual rendering of an RTP audio stream as a waveform graph. More...

#include <rtp_audio_graph.h>

Inheritance diagram for RtpAudioGraph:

Public Member Functions

 RtpAudioGraph (QCustomPlot *audioPlot, QColor color)
 Constructs an RtpAudioGraph.
 
void setMuted (bool isMuted)
 Sets the muted state of the graph, adjusting its opacity.
 
void setHighlight (bool isHighlighted)
 Sets the highlight state of the graph, drawing it more prominently.
 
void setSelected (bool isSelected)
 Sets the selection state of the graph, altering its color.
 
void setData (const QVector< double > &keys, const QVector< double > &values, bool alreadySorted=false)
 Updates the data points plotted on the graph.
 
void remove (QCustomPlot *audioPlot)
 Removes the graph from the plot widget.
 
bool isMyPlottable (QCPAbstractPlottable *plottable)
 Checks if a given plottable object belongs to this graph.
 

Detailed Description

Manages the visual rendering of an RTP audio stream as a waveform graph.

Constructor & Destructor Documentation

◆ RtpAudioGraph()

RtpAudioGraph::RtpAudioGraph ( QCustomPlot *  audioPlot,
QColor  color 
)
explicit

Constructs an RtpAudioGraph.

Parameters
audioPlotPointer to the QCustomPlot widget where the graph will be drawn.
colorThe base color for the waveform graph.

Member Function Documentation

◆ isMyPlottable()

bool RtpAudioGraph::isMyPlottable ( QCPAbstractPlottable *  plottable)

Checks if a given plottable object belongs to this graph.

Parameters
plottablePointer to the abstract plottable object to check.
Returns
True if the plottable is managed by this graph, false otherwise.

◆ remove()

void RtpAudioGraph::remove ( QCustomPlot *  audioPlot)

Removes the graph from the plot widget.

Parameters
audioPlotPointer to the plot widget.

◆ setData()

void RtpAudioGraph::setData ( const QVector< double > &  keys,
const QVector< double > &  values,
bool  alreadySorted = false 
)

Updates the data points plotted on the graph.

Parameters
keysThe X-axis values (e.g., timestamps).
valuesThe Y-axis values (e.g., audio samples).
alreadySortedTrue if the data is already sorted by keys, improving performance.

◆ setHighlight()

void RtpAudioGraph::setHighlight ( bool  isHighlighted)

Sets the highlight state of the graph, drawing it more prominently.

Parameters
isHighlightedTrue to highlight, false to draw normally.

◆ setMuted()

void RtpAudioGraph::setMuted ( bool  isMuted)

Sets the muted state of the graph, adjusting its opacity.

Parameters
isMutedTrue to indicate muted, false otherwise.

◆ setSelected()

void RtpAudioGraph::setSelected ( bool  isSelected)

Sets the selection state of the graph, altering its color.

Parameters
isSelectedTrue if selected, false otherwise.

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