|
Wireshark 4.7.0
The Wireshark network protocol analyzer
|
A single tap-driven data series rendered on a QCustomPlot axis pair. More...
#include <plot.h>
Public Slots | |
| void | captureEvent (const CaptureEvent &e) |
| React to a capture lifecycle event. | |
Public Member Functions | |
| Plot (QCustomPlot *parent, QCPAxis *keyAxis=nullptr, QCPAxis *valueAxis=nullptr) | |
| Construct a Plot. | |
| ~Plot () | |
| Destroy the Plot. | |
| void | setFilterField (const QString &filter, const QString &field) |
| Set the display filter and Y-axis field for this plot. | |
| void | setPlotStyle (PlotStyles style) |
| Set the visual plot style for this series. | |
| void | setVisible (bool visible) |
| Show or hide this plot on the graph. | |
| QString | configError () const |
| Return any configuration error set by setFilterField(). | |
| double | startTime () const |
| Return the capture timestamp of the first packet seen by this plot. | |
| void | setPlotStartTime (double start_time) |
| Set the shared plot start time used for relative-time calculations. | |
| bool | absoluteTime () const |
| Return whether this plot uses absolute (wall-clock) time on the X axis. | |
| void | setAbsoluteTime (bool abs_time) |
| Set the X-axis time display mode. | |
| void | setYAxisFactor (double y_axis_factor) |
| Set a multiplier applied to all Y-axis values before plotting. | |
| int | hfIndex () const |
| Return the resolved header field index for the Y-axis field. | |
| const std::vector< plot_item_t > & | getItems () const |
| Return read-only access to the collected plot items. | |
| void | removeTapListener () |
| Remove this plot's tap listener, if one is registered. | |
| uint32_t | packetFromTime (double ts) const |
| Return the frame number of the packet closest to a given timestamp. | |
| void | makeCsv (QTextStream &stream) const |
Write all plot items as CSV rows to stream. | |
| QCPRange | recentDrawnDataRange (int count) const |
Return the key (X-axis) range covering the most recent count items. | |
Public Member Functions inherited from Graph | |
| Graph (QCustomPlot *parent, QCPAxis *keyAxis=nullptr, QCPAxis *valueAxis=nullptr) | |
| Constructs a new Graph. | |
| ~Graph () | |
| Destroys the Graph. | |
| QString | name () const |
| Retrieves the name of the graph. | |
| void | setName (const QString &name) |
| Sets the name of the graph. | |
| QRgb | color () const |
| Retrieves the color of the graph. | |
| void | setColor (const QRgb color) |
| Sets the color of the graph. | |
| bool | visible () const |
| Checks if the graph is currently visible. | |
| void | setVisible (bool visible) |
| Sets the visibility of the graph. | |
| double | yAxisFactor () const |
| Retrieves the scaling factor for the Y-axis. | |
| void | setYAxisFactor (double y_axis_factor) |
| Sets the scaling factor for the Y-axis. | |
| QCPGraph * | graph () const |
| Retrieves the underlying QCPGraph object. | |
| QCPBars * | bars () const |
| Retrieves the underlying QCPBars object. | |
| bool | addToLegend () |
| Adds the graph to the parent plot's legend. | |
| bool | setPlotStyle (PlotStyles style) |
| Sets the visual style of the plot. | |
Static Public Member Functions | |
| static bool | itemCompare (const plot_item_t &a, const plot_item_t &b) |
| Compare two plot items by absolute capture timestamp. | |
| static bool | itemRelCapCompare (const plot_item_t &a, const plot_item_t &b) |
| Compare two plot items by relative capture timestamp. | |
| static void | setAxisColor (QCPAxis *axis, const QPen &pen) |
| Set the pen colour of all visual components of a QCPAxis. | |
Additional Inherited Members | |
Public Types inherited from Graph | |
| enum | PlotStyles { psLine , psDotLine , psStepLine , psDotStepLine , psImpulse , psBar , psStackedBar , psDot , psSquare , psDiamond , psCross , psPlus , psCircle } |
| Defines the available visual styles for plotting data. More... | |
Public Attributes inherited from Graph | |
| const qreal | graph_line_width_ = 1.0 |
Static Public Attributes inherited from Graph | |
| static constexpr double | default_y_axis_factor_ = 1 |
Protected Member Functions inherited from Graph | |
| void | applyCurrentColor () |
| Applies the currently set color to the underlying graphical elements. | |
| bool | removeFromLegend () |
| Removes the graph from the parent plot's legend. | |
| void | clearAllData () |
| Clears all data points currently loaded into the graph. | |
Protected Attributes inherited from Graph | |
| QCustomPlot * | parent_ |
| QCPGraph * | graph_ |
| QCPBars * | bars_ |
| QString | name_ |
| QBrush | color_ |
| bool | visible_ |
| double | y_axis_factor_ |
A single tap-driven data series rendered on a QCustomPlot axis pair.
|
explicit |
Construct a Plot.
| parent | The QCustomPlot that owns this graph. |
| keyAxis | The X axis to plot against, or nullptr for the default. |
| valueAxis | The Y axis to plot against, or nullptr for the default. |
|
inline |
Return whether this plot uses absolute (wall-clock) time on the X axis.
|
slot |
React to a capture lifecycle event.
| e | The capture event describing the state transition. |
|
inline |
Return any configuration error set by setFilterField().
|
inline |
Return read-only access to the collected plot items.
plot_item_t values accumulated by the tap callbacks.
|
inline |
Return the resolved header field index for the Y-axis field.
hf_index for the field set by setFilterField(), or -1 if no valid field has been resolved.
|
static |
Compare two plot items by absolute capture timestamp.
| a | The first plot item. |
| b | The second plot item. |
a occurred before b.
|
static |
Compare two plot items by relative capture timestamp.
| a | The first plot item. |
| b | The second plot item. |
a has an earlier relative capture time than b. | void Plot::makeCsv | ( | QTextStream & | stream | ) | const |
Write all plot items as CSV rows to stream.
| stream | The text stream to write to. |
| uint32_t Plot::packetFromTime | ( | double | ts | ) | const |
Return the frame number of the packet closest to a given timestamp.
| ts | The target timestamp in seconds. |
items_ is empty. | QCPRange Plot::recentDrawnDataRange | ( | int | count | ) | const |
Return the key (X-axis) range covering the most recent count items.
| count | The number of most-recent data points to include in the range. |
count items, or an empty range if items_ has fewer than count entries. | void Plot::setAbsoluteTime | ( | bool | abs_time | ) |
Set the X-axis time display mode.
| abs_time | true to display absolute (wall-clock) timestamps; false to display elapsed time relative to plot_start_time_. |
|
static |
Set the pen colour of all visual components of a QCPAxis.
| axis | The axis to recolour. |
| pen | The pen (colour and width) to apply. |
| void Plot::setFilterField | ( | const QString & | filter, |
| const QString & | field | ||
| ) |
Set the display filter and Y-axis field for this plot.
| filter | The display filter expression (may be empty). |
| field | The header field abbreviation whose value is plotted on the Y axis. |
| void Plot::setPlotStartTime | ( | double | start_time | ) |
Set the shared plot start time used for relative-time calculations.
| start_time | The common time origin in seconds. |
| void Plot::setPlotStyle | ( | PlotStyles | style | ) |
Set the visual plot style for this series.
| style | The desired plot style. |
| void Plot::setVisible | ( | bool | visible | ) |
Show or hide this plot on the graph.
| visible | true to show and activate the tap; false to hide and deactivate it. |
| void Plot::setYAxisFactor | ( | double | y_axis_factor | ) |
Set a multiplier applied to all Y-axis values before plotting.
| y_axis_factor | The scale factor; 1.0 means no scaling. |
| double Plot::startTime | ( | ) | const |
Return the capture timestamp of the first packet seen by this plot.