Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
marker_dialog.h
1
12#include "qobject.h"
13#include "qdialog.h"
14
15#ifndef CUSTOMPLOT_MARKER_H
16#define CUSTOMPLOT_MARKER_H
17
18class Marker : public QWidget {
19 Q_OBJECT
20public:
21 Marker(const double x, const int, const bool isPosMarker);
22 QString name() const { return isPosMarker() ? QString("P") : QString("M%1").arg(index()); }
23 int index() const { return index_; }
24 static int index(const Marker* m) { return m ? m->index() : -1; }
25 static QString toHex(long long);
26 double xCoord() const { return x_coord_; }
27 void setXCoord(double value);
28 bool isPosMarker() const { return is_pos_marker_; }
29 void setVisibility(const bool v) { visible_ = v; }
30 bool visible() const { return visible_; }
31private:
32 int index_;
33 double x_coord_;
34 bool is_pos_marker_;
35 bool visible_;
36};
37
38class MarkerDialog final : public QDialog{
39 Q_OBJECT
40
41public:
42 MarkerDialog(QWidget* parent, bool showToMove, const QVector<Marker*>& markers);
43 ~MarkerDialog() final;
44 QString getText() const { return result_; }
45 QString selectedMarker() const { return selected_marker_; }
46private slots:
47 void comboItemChanged(const QString& text);
48
49private:
50 QString result_;
51 QString selected_marker_;
52 void reject() override;
53};
54#endif //CUSTOMPLOT_MARKER_H
Definition marker_dialog.h:38
Definition marker_dialog.h:18