Wireshark 2.9.0-477-g68ec514b The Wireshark network protocol analyzer

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

sequence_diagram.h
1 /* sequence_diagram.h
2 *
3 * Wireshark - Network traffic analyzer
4 * By Gerald Combs <gerald@wireshark.org>
5 * Copyright 1998 Gerald Combs
6 *
7 * SPDX-License-Identifier: GPL-2.0-or-later
8 */
9
10 #ifndef SEQUENCE_DIAGRAM_H
11 #define SEQUENCE_DIAGRAM_H
12
13 #include <config.h>
14
15 #include <glib.h>
16
17 #include <epan/address.h>
18
19 #include <QObject>
20 #include <QMultiMap>
21 #include <ui/qt/widgets/qcustomplot.h>
22
23 struct _seq_analysis_info;
24 struct _seq_analysis_item;
25
26 // Some of this is probably unnecessary
27 class WSCPSeqData
28 {
29 public:
30 WSCPSeqData();
31 WSCPSeqData(double key, _seq_analysis_item *value);
32 double key;
33 struct _seq_analysis_item *value;
34 };
35
36 typedef QMap<double, WSCPSeqData> WSCPSeqDataMap;
37
38 class SequenceDiagram : public QCPAbstractPlottable
39 {
40 Q_OBJECT
41 public:
42 explicit SequenceDiagram(QCPAxis *keyAxis, QCPAxis *valueAxis, QCPAxis *commentAxis);
43 virtual ~SequenceDiagram();
44
45 // getters:
46 // Next / previous packet.
47 int adjacentPacket(bool next);
48
49 double selectedKey() { return selected_key_; }
50
51 // setters:
52 void setData(struct _seq_analysis_info *sainfo);
53
54 // non-property methods:
55 struct _seq_analysis_item *itemForPosY(int ypos);
56
57 // reimplemented virtual methods:
58 virtual void clearData() { data_->clear(); }
59 virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const;
60
61 public slots:
62 void setSelectedPacket(int selected_packet);
63
64 protected:
65 virtual void draw(QCPPainter *painter);
66 virtual void drawLegendIcon(QCPPainter *painter, const QRectF &rect) const;
67 virtual QCPRange getKeyRange(bool &validRange, SignDomain inSignDomain=sdBoth) const;
68 virtual QCPRange getValueRange(bool &validRange, SignDomain inSignDomain=sdBoth) const;
69
70 private:
71 QCPAxis *key_axis_;
72 QCPAxis *value_axis_;
73 QCPAxis *comment_axis_;
74 WSCPSeqDataMap *data_;
75 struct _seq_analysis_info *sainfo_;
76 guint32 selected_packet_;
77 double selected_key_;
78 };
79
80 #endif // SEQUENCE_DIAGRAM_H
81
82 /*
83 * Editor modelines
84 *
85 * Local Variables:
86 * c-basic-offset: 4
87 * tab-width: 8
88 * indent-tabs-mode: nil
89 * End:
90 *
91 * ex: set shiftwidth=4 tabstop=8 expandtab:
92 * :indentSize=4:tabSize=8:noTabs=true:
93 */
SequenceDiagram::clearData
virtual void clearData()
Definition: sequence_diagram.h:58
QCPAbstractPlottable
The abstract base class for all data representing objects in a plot.
Definition: qcustomplot.h:1390
_seq_analysis_info
Definition: sequence_analysis.h:58
QCPAxis
Manages a single axis inside a QCustomPlot.
Definition: qcustomplot.h:982
QCPPainter
QPainter subclass used internally.
Definition: qcustomplot.h:314
QCPAbstractPlottable::SignDomain
SignDomain
Definition: qcustomplot.h:1457
_seq_analysis_item
Definition: sequence_analysis.h:38
SequenceDiagram
Definition: sequence_diagram.h:38
WSCPSeqData
Definition: sequence_diagram.h:27
QCPRange
Represents the range an axis is encompassing.
Definition: qcustomplot.h:478
qcustomplot.h