10#ifndef SEQUENCE_DIAGRAM_H
11#define SEQUENCE_DIAGRAM_H
19#include <ui/qt/widgets/qcustomplot.h>
67 explicit SequenceDiagram(QCPAxis *keyAxis, QCPAxis *valueAxis, QCPAxis *commentAxis);
137 virtual double selectTest(
const QPointF &pos,
bool onlySelectable, QVariant *details = 0) const Q_DECL_OVERRIDE;
153 virtual
void draw(QCPPainter *painter) Q_DECL_OVERRIDE;
160 virtual
void drawLegendIcon(QCPPainter *painter, const QRectF &rect) const Q_DECL_OVERRIDE;
168 virtual QCPRange
getKeyRange(
bool &validRange, QCP::SignDomain inSignDomain = QCP::sdBoth) const Q_DECL_OVERRIDE;
177 virtual QCPRange
getValueRange(
bool &validRange, QCP::SignDomain inSignDomain=QCP::sdBoth, const QCPRange &inKeyRange = QCPRange()) const Q_DECL_OVERRIDE;
181 QCPAxis *value_axis_;
182 QCPAxis *comment_axis_;
185 uint32_t selected_packet_;
186 double selected_key_;
QCustomPlot plottable that renders a Wireshark sequence diagram, drawing arrows and comments between ...
Definition sequence_diagram.h:57
virtual ~SequenceDiagram()
Destroys the SequenceDiagram and frees the internal data map.
Definition sequence_diagram.cpp:106
void setData(struct _seq_analysis_info *sainfo)
Replaces the diagram's data with the contents of sainfo and triggers a replot.
Definition sequence_diagram.cpp:157
struct _seq_analysis_item * itemForPosY(int ypos)
Returns the sequence analysis item rendered at the given vertical pixel position in the plot.
Definition sequence_diagram.cpp:216
virtual void clearData()
Removes all data points from the internal data map.
Definition sequence_diagram.h:127
bool inComment(QPoint pos) const
Returns whether pos falls within a comment text region.
Definition sequence_diagram.cpp:226
virtual void drawLegendIcon(QCPPainter *painter, const QRectF &rect) const Q_DECL_OVERRIDE
Draws a small representative icon for the legend entry.
Definition sequence_diagram.cpp:381
virtual QCPRange getKeyRange(bool &validRange, QCP::SignDomain inSignDomain=QCP::sdBoth) const Q_DECL_OVERRIDE
Returns the key-axis range spanned by the data.
Definition sequence_diagram.cpp:385
int adjacentPacket(bool next)
Returns the frame number of the packet adjacent to the current selection.
Definition sequence_diagram.cpp:111
void setSelectedPacket(int selected_packet)
Selects the data point corresponding to selected_packet and updates selected_key_ and selected_packet...
Definition sequence_diagram.cpp:205
virtual void draw(QCPPainter *painter) Q_DECL_OVERRIDE
Draws all sequence diagram arrows, participant labels, and comment text onto painter.
Definition sequence_diagram.cpp:251
QString elidedComment(const QString &text) const
Returns text elided to fit within the comment axis width.
Definition sequence_diagram.cpp:234
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.
Definition sequence_diagram.cpp:240
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.
Definition sequence_diagram.cpp:407
double selectedKey()
Returns the plot key coordinate of the currently selected data point.
Definition sequence_diagram.h:87
Key-value pair associating a plot key coordinate with a sequence analysis item, used as the value typ...
Definition sequence_diagram.h:30
struct _seq_analysis_item * value
Definition sequence_diagram.h:43
double key
Definition sequence_diagram.h:42
WSCPSeqData()
Constructs a default WSCPSeqData with a zero key and null value.
Definition sequence_diagram.cpp:33
QMultiMap< double, WSCPSeqData > WSCPSeqDataMap
Multi-map keyed by plot coordinate, storing WSCPSeqData entries for the sequence diagram.
Definition sequence_diagram.h:48
Definition sequence_analysis.h:79
Represents a single event or message arrow in a sequence / flow graph analysis.
Definition sequence_analysis.h:52