Wireshark 4.5.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
sequence_diagram.h
Go to the documentation of this file.
1
10#ifndef SEQUENCE_DIAGRAM_H
11#define SEQUENCE_DIAGRAM_H
12
13#include <config.h>
14
15#include <epan/address.h>
16
17#include <QObject>
18#include <QMultiMap>
19#include <ui/qt/widgets/qcustomplot.h>
20
23
24// Some of this is probably unnecessary
26{
27public:
29 WSCPSeqData(double key, _seq_analysis_item *value);
30 double key;
31 struct _seq_analysis_item *value;
32};
33
34typedef QMultiMap<double, WSCPSeqData> WSCPSeqDataMap;
35
36class SequenceDiagram : public QCPAbstractPlottable
37{
38 Q_OBJECT
39public:
40 explicit SequenceDiagram(QCPAxis *keyAxis, QCPAxis *valueAxis, QCPAxis *commentAxis);
41 virtual ~SequenceDiagram();
42
43 // getters:
44 // Next / previous packet.
45 int adjacentPacket(bool next);
46
47 double selectedKey() { return selected_key_; }
48
49 // setters:
50 void setData(struct _seq_analysis_info *sainfo);
51
52 // non-property methods:
53 struct _seq_analysis_item *itemForPosY(int ypos);
54 bool inComment(QPoint pos) const;
55 QString elidedComment(const QString &text) const;
56
57 // reimplemented virtual methods:
58 virtual void clearData() { data_->clear(); }
59 virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const Q_DECL_OVERRIDE;
60
61public slots:
62 void setSelectedPacket(int selected_packet);
63
64protected:
65 virtual void draw(QCPPainter *painter) Q_DECL_OVERRIDE;
66 virtual void drawLegendIcon(QCPPainter *painter, const QRectF &rect) const Q_DECL_OVERRIDE;
67 virtual QCPRange getKeyRange(bool &validRange, QCP::SignDomain inSignDomain=QCP::sdBoth) const Q_DECL_OVERRIDE;
68 virtual QCPRange getValueRange(bool &validRange, QCP::SignDomain inSignDomain=QCP::sdBoth, const QCPRange &inKeyRange = QCPRange()) const Q_DECL_OVERRIDE;
69
70private:
71 QCPAxis *key_axis_;
72 QCPAxis *value_axis_;
73 QCPAxis *comment_axis_;
74 WSCPSeqDataMap *data_;
75 struct _seq_analysis_info *sainfo_;
76 uint32_t selected_packet_;
77 double selected_key_;
78};
79
80#endif // SEQUENCE_DIAGRAM_H
Definition sequence_diagram.h:37
Definition sequence_diagram.h:26
Definition sequence_analysis.h:66
Definition sequence_analysis.h:44