QCustomPlot plottable that renders a Wireshark sequence diagram, drawing arrows and comments between participant columns for each analysed protocol exchange.
More...
#include <sequence_diagram.h>
|
| void | setSelectedPacket (int selected_packet) |
| | Selects the data point corresponding to selected_packet and updates selected_key_ and selected_packet_ accordingly.
|
| |
|
| | SequenceDiagram (QCPAxis *keyAxis, QCPAxis *valueAxis, QCPAxis *commentAxis) |
| | Constructs a SequenceDiagram plottable with three axes.
|
| |
|
virtual | ~SequenceDiagram () |
| | Destroys the SequenceDiagram and frees the internal data map.
|
| |
| int | adjacentPacket (bool next) |
| | Returns the frame number of the packet adjacent to the current selection.
|
| |
| double | selectedKey () |
| | Returns the plot key coordinate of the currently selected data point.
|
| |
| void | setData (struct _seq_analysis_info *sainfo) |
| | Replaces the diagram's data with the contents of sainfo and triggers a replot.
|
| |
| struct _seq_analysis_item * | itemForPosY (int ypos) |
| | Returns the sequence analysis item rendered at the given vertical pixel position in the plot.
|
| |
| bool | inComment (QPoint pos) const |
| | Returns whether pos falls within a comment text region.
|
| |
| QString | elidedComment (const QString &text) const |
| | Returns text elided to fit within the comment axis width.
|
| |
|
virtual void | clearData () |
| | Removes all data points from the internal data map.
|
| |
| virtual double | selectTest (const QPointF &pos, bool onlySelectable, QVariant *details=0) const Q_DECL_OVERRIDE |
| | Returns the distance from pos to the nearest data point for hit-testing and selection purposes.
|
| |
|
| virtual void | draw (QCPPainter *painter) Q_DECL_OVERRIDE |
| | Draws all sequence diagram arrows, participant labels, and comment text onto painter.
|
| |
| virtual void | drawLegendIcon (QCPPainter *painter, const QRectF &rect) const Q_DECL_OVERRIDE |
| | Draws a small representative icon for the legend entry.
|
| |
| virtual QCPRange | getKeyRange (bool &validRange, QCP::SignDomain inSignDomain=QCP::sdBoth) const Q_DECL_OVERRIDE |
| | Returns the key-axis range spanned by the data.
|
| |
| virtual QCPRange | getValueRange (bool &validRange, QCP::SignDomain inSignDomain=QCP::sdBoth, const QCPRange &inKeyRange=QCPRange()) const Q_DECL_OVERRIDE |
| | Returns the value-axis range spanned by the data.
|
| |
QCustomPlot plottable that renders a Wireshark sequence diagram, drawing arrows and comments between participant columns for each analysed protocol exchange.
◆ SequenceDiagram()
| SequenceDiagram::SequenceDiagram |
( |
QCPAxis * |
keyAxis, |
|
|
QCPAxis * |
valueAxis, |
|
|
QCPAxis * |
commentAxis |
|
) |
| |
|
explicit |
Constructs a SequenceDiagram plottable with three axes.
- Parameters
-
| keyAxis | Axis used for the key (time/sequence) dimension. |
| valueAxis | Axis used for the value (participant column) dimension. |
| commentAxis | Axis used to render per-arrow comment text. |
◆ adjacentPacket()
| int SequenceDiagram::adjacentPacket |
( |
bool |
next | ) |
|
Returns the frame number of the packet adjacent to the current selection.
- Parameters
-
| next | true to retrieve the next packet; false for the previous. |
- Returns
- Frame number of the adjacent packet, or -1 if none exists.
◆ draw()
| void SequenceDiagram::draw |
( |
QCPPainter * |
painter | ) |
|
|
protectedvirtual |
Draws all sequence diagram arrows, participant labels, and comment text onto painter.
- Parameters
-
| painter | QCustomPlot painter to render with. |
◆ drawLegendIcon()
| void SequenceDiagram::drawLegendIcon |
( |
QCPPainter * |
painter, |
|
|
const QRectF & |
rect |
|
) |
| const |
|
protectedvirtual |
Draws a small representative icon for the legend entry.
- Parameters
-
| painter | QCustomPlot painter to render with. |
| rect | Bounding rectangle allocated for the legend icon. |
◆ elidedComment()
| QString SequenceDiagram::elidedComment |
( |
const QString & |
text | ) |
const |
Returns text elided to fit within the comment axis width.
- Parameters
-
| text | Full comment string to elide. |
- Returns
- Elided string with a trailing ellipsis if truncation was needed.
◆ getKeyRange()
| QCPRange SequenceDiagram::getKeyRange |
( |
bool & |
validRange, |
|
|
QCP::SignDomain |
inSignDomain = QCP::sdBoth |
|
) |
| const |
|
protectedvirtual |
Returns the key-axis range spanned by the data.
- Parameters
-
| validRange | Set to true if a non-empty range was found. |
| inSignDomain | Restricts the range to positive or negative values. |
- Returns
- QCPRange covering all key values in the data map.
◆ getValueRange()
| QCPRange SequenceDiagram::getValueRange |
( |
bool & |
validRange, |
|
|
QCP::SignDomain |
inSignDomain = QCP::sdBoth, |
|
|
const QCPRange & |
inKeyRange = QCPRange() |
|
) |
| const |
|
protectedvirtual |
Returns the value-axis range spanned by the data.
- Parameters
-
| validRange | Set to true if a non-empty range was found. |
| inSignDomain | Restricts the range to positive or negative values. |
| inKeyRange | Optional key range to restrict which data points are considered. |
- Returns
- QCPRange covering all value (participant column) positions in the data map.
◆ inComment()
| bool SequenceDiagram::inComment |
( |
QPoint |
pos | ) |
const |
Returns whether pos falls within a comment text region.
- Parameters
-
| pos | Point in widget coordinates to test. |
- Returns
true if the point is over a comment label.
◆ itemForPosY()
Returns the sequence analysis item rendered at the given vertical pixel position in the plot.
- Parameters
-
| ypos | Y pixel coordinate (in widget space) to hit-test. |
- Returns
- Pointer to the matching _seq_analysis_item, or
nullptr if none.
◆ selectedKey()
| double SequenceDiagram::selectedKey |
( |
| ) |
|
|
inline |
Returns the plot key coordinate of the currently selected data point.
- Returns
- Selected key value, or 0.0 if nothing is selected.
◆ selectTest()
| double SequenceDiagram::selectTest |
( |
const QPointF & |
pos, |
|
|
bool |
onlySelectable, |
|
|
QVariant * |
details = 0 |
|
) |
| const |
|
virtual |
Returns the distance from pos to the nearest data point for hit-testing and selection purposes.
- Parameters
-
| pos | Position in plot coordinates to test. |
| onlySelectable | If true, only consider selectable plottables. |
| details | Optional output for selection detail data. |
- Returns
- Distance in pixels, or a negative value if the position is not near any point.
◆ setData()
Replaces the diagram's data with the contents of sainfo and triggers a replot.
- Parameters
-
| sainfo | Pointer to the sequence analysis info structure to visualise. |
◆ setSelectedPacket
| void SequenceDiagram::setSelectedPacket |
( |
int |
selected_packet | ) |
|
|
slot |
Selects the data point corresponding to selected_packet and updates selected_key_ and selected_packet_ accordingly.
- Parameters
-
| selected_packet | Frame number of the packet to select. |
The documentation for this class was generated from the following files:
- /builds/wireshark/wireshark/ui/qt/sequence_diagram.h
- /builds/wireshark/wireshark/ui/qt/sequence_diagram.cpp