Cockatrice 2026-10-19-Development-3.1.2-beta.2
A virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
latency_status_widget.h
Go to the documentation of this file.
1
5
6#ifndef LATENCY_STATUS_WIDGET_H
7#define LATENCY_STATUS_WIDGET_H
8
9#include <QList>
10#include <QString>
11#include <QWidget>
13#include <qtmetamacros.h>
14
15class QLabel;
17
28class LatencyStatusWidget : public QWidget
29{
30 Q_OBJECT
31public:
32 explicit LatencyStatusWidget(QWidget *parent = nullptr);
33
34public slots:
35 void updateData(const LatencyTracker::Stats &stats, const QList<int> &samplesMs);
36
37protected:
38 bool eventFilter(QObject *watched, QEvent *event) override;
39
40private:
41 void togglePopup();
42 QString statsText(const LatencyTracker::Stats &stats) const;
43
44 QLabel *pingLabel = nullptr;
46 QWidget *popup = nullptr;
48 QLabel *detailLabel = nullptr;
50};
51
52#endif
Bar graph of recent network round-trip samples.
Definition latency_graph_widget.h:25
void updateData(const LatencyTracker::Stats &stats, const QList< int > &samplesMs)
Definition latency_status_widget.cpp:42
QWidget * popup
Definition latency_status_widget.h:46
bool eventFilter(QObject *watched, QEvent *event) override
Definition latency_status_widget.cpp:66
QString statsText(const LatencyTracker::Stats &stats) const
Definition latency_status_widget.cpp:110
LatencyGraphWidget * detailGraph
Definition latency_status_widget.h:47
LatencyGraphWidget * latencyGraph
Definition latency_status_widget.h:45
LatencyStatusWidget(QWidget *parent=nullptr)
Definition latency_status_widget.cpp:19
QList< int > latestSamples
Definition latency_status_widget.h:49
void togglePopup()
Definition latency_status_widget.cpp:75
QLabel * pingLabel
Definition latency_status_widget.h:44
QLabel * detailLabel
Definition latency_status_widget.h:48
Definition remote_connection_controller.h:20
Definition latency_tracker.h:29