|
Wireshark 4.7.0
The Wireshark network protocol analyzer
|
An extended QCustomPlot widget supporting markers, data points, and their interactions. More...
#include <customplot.h>
Public Member Functions | |
| CustomPlot (QWidget *widget) | |
| Constructs a new CustomPlot. | |
| ~CustomPlot () | |
| Destroys the CustomPlot. | |
| void | showMarkerDifferences () |
| Shows the calculated differences between visible markers. | |
| void | setDataPointVisibility (const bool visible) |
| Sets the visibility of data points on the plot. | |
| QString | currentValue () const |
| Retrieves the current value traced by the plot. | |
| void | mouseReleased () |
| Handles mouse release logic specific to the plot markers and interactions. | |
| bool | mousePressed (QPoint pos) |
| Handles mouse press logic, returning whether interaction was captured. | |
| void | clearMarkerDifferences () |
| Clears any displayed marker differences. | |
| int | selectedMarker () const |
| Retrieves the index of the currently selected marker. | |
| void | markerVisibilityChanged (const Marker *m) |
| Handles a visibility change for a specific marker. | |
| void | showMarkersDifference (bool show) |
| Toggles the visibility of the difference between markers. | |
| void | addMarkerElements (const Marker *marker) |
| Adds plot elements (lines, labels) associated with a marker. | |
| void | deleteMarkersElements () |
| Deletes visual elements for all markers. | |
| void | deleteMarkerElements (const int index) |
| Deletes visual elements for a specific marker. | |
| void | addDataPointsMarker (QCPGraph *graph) |
| Adds data point markers along a specific graph. | |
| QString | selectedMarker (const int ignoreIdx) |
| Retrieves a string identifying the selected marker, optionally ignoring one index. | |
| QVector< Marker * > | markers () const |
| Retrieves all markers currently in the plot. | |
| Marker * | addMarker (double x, bool isPosMarker) |
| Adds a new marker at the specified X coordinate. | |
| void | deleteMarker (Marker *m) |
| Deletes a specific marker. | |
| void | deleteAllMarkers () |
| Deletes all markers from the plot. | |
| QList< const Marker * > | visibleMarkers () const |
| Retrieves a list of all currently visible markers. | |
| Marker * | marker (const QString &name) |
| Retrieves a marker by its name/identifier. | |
| Marker * | marker (const int idx) |
| Retrieves a marker by its index. | |
| Marker * | posMarker () |
| Retrieves the special position marker linked to the tracer. | |
| void | markerMoved (const Marker *m) |
| Updates plot visuals when a marker has been moved. | |
Protected Member Functions | |
| void | mouseMoveEvent (QMouseEvent *event) override |
| Handles mouse movement events for tracking and dragging. | |
| void | axisRemoved (QCPAxis *axis) override |
| Handles cleanup when an axis is removed from the plot. | |
An extended QCustomPlot widget supporting markers, data points, and their interactions.
|
explicit |
Constructs a new CustomPlot.
| widget | The parent widget. |
| void CustomPlot::addDataPointsMarker | ( | QCPGraph * | graph | ) |
Adds data point markers along a specific graph.
| graph | The graph to add data points to. |
| Marker * CustomPlot::addMarker | ( | double | x, |
| bool | isPosMarker | ||
| ) |
Adds a new marker at the specified X coordinate.
| x | The X coordinate. |
| isPosMarker | True if the marker represents the current tracer position. |
| void CustomPlot::addMarkerElements | ( | const Marker * | marker | ) |
Adds plot elements (lines, labels) associated with a marker.
| marker | The marker. |
|
overrideprotected |
Handles cleanup when an axis is removed from the plot.
| axis | The axis being removed. |
|
inline |
Retrieves the current value traced by the plot.
| void CustomPlot::deleteMarker | ( | Marker * | m | ) |
Deletes a specific marker.
| m | The marker to delete. |
| void CustomPlot::deleteMarkerElements | ( | const int | index | ) |
Deletes visual elements for a specific marker.
| index | The index of the marker. |
| Marker * CustomPlot::marker | ( | const int | idx | ) |
Retrieves a marker by its index.
| idx | The index of the marker. |
| Marker * CustomPlot::marker | ( | const QString & | name | ) |
Retrieves a marker by its name/identifier.
| name | The identifier of the marker. |
| void CustomPlot::markerMoved | ( | const Marker * | m | ) |
Updates plot visuals when a marker has been moved.
| m | The marker that moved. |
|
inline |
Retrieves all markers currently in the plot.
| void CustomPlot::markerVisibilityChanged | ( | const Marker * | m | ) |
Handles a visibility change for a specific marker.
| m | The marker whose visibility changed. |
|
overrideprotected |
Handles mouse movement events for tracking and dragging.
| event | The mouse event. |
| bool CustomPlot::mousePressed | ( | QPoint | pos | ) |
Handles mouse press logic, returning whether interaction was captured.
| pos | The position of the mouse press. |
| Marker * CustomPlot::posMarker | ( | ) |
Retrieves the special position marker linked to the tracer.
|
inline |
Retrieves the index of the currently selected marker.
| QString CustomPlot::selectedMarker | ( | const int | ignoreIdx | ) |
Retrieves a string identifying the selected marker, optionally ignoring one index.
| ignoreIdx | The index to ignore. |
| void CustomPlot::setDataPointVisibility | ( | const bool | visible | ) |
Sets the visibility of data points on the plot.
| visible | True to show data points, false to hide them. |
|
inline |
Toggles the visibility of the difference between markers.
| show | True to show the difference, false to hide it. |
| QList< const Marker * > CustomPlot::visibleMarkers | ( | ) | const |
Retrieves a list of all currently visible markers.