Kerberos: add kerberos_inject_longterm_key() helper function
[wireshark-sm.git] / ui / qt / sequence_diagram.h
bloba3c1327dcbfb562f9d74ebf06f1589d4a5fb4e0d
1 /** @file
3 * Wireshark - Network traffic analyzer
4 * By Gerald Combs <gerald@wireshark.org>
5 * Copyright 1998 Gerald Combs
7 * SPDX-License-Identifier: GPL-2.0-or-later
8 */
10 #ifndef SEQUENCE_DIAGRAM_H
11 #define SEQUENCE_DIAGRAM_H
13 #include <config.h>
15 #include <epan/address.h>
17 #include <QObject>
18 #include <QMultiMap>
19 #include <ui/qt/widgets/qcustomplot.h>
21 struct _seq_analysis_info;
22 struct _seq_analysis_item;
24 // Some of this is probably unnecessary
25 class WSCPSeqData
27 public:
28 WSCPSeqData();
29 WSCPSeqData(double key, _seq_analysis_item *value);
30 double key;
31 struct _seq_analysis_item *value;
34 typedef QMultiMap<double, WSCPSeqData> WSCPSeqDataMap;
36 class SequenceDiagram : public QCPAbstractPlottable
38 Q_OBJECT
39 public:
40 explicit SequenceDiagram(QCPAxis *keyAxis, QCPAxis *valueAxis, QCPAxis *commentAxis);
41 virtual ~SequenceDiagram();
43 // getters:
44 // Next / previous packet.
45 int adjacentPacket(bool next);
47 double selectedKey() { return selected_key_; }
49 // setters:
50 void setData(struct _seq_analysis_info *sainfo);
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;
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;
61 public slots:
62 void setSelectedPacket(int selected_packet);
64 protected:
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;
70 private:
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_;
80 #endif // SEQUENCE_DIAGRAM_H