mirror of
https://github.com/Mahdi-zarei/nekoray.git
synced 2026-01-07 05:39:13 +08:00
31 lines
621 B
C++
31 lines
621 B
C++
#pragma once
|
|
|
|
#include <QString>
|
|
#include <QList>
|
|
#include <QMutex>
|
|
|
|
#include "TrafficData.hpp"
|
|
|
|
namespace NekoGui_traffic {
|
|
class TrafficLooper {
|
|
public:
|
|
bool loop_enabled = false;
|
|
bool looping = false;
|
|
QMutex loop_mutex;
|
|
|
|
QList<std::shared_ptr<TrafficData>> items;
|
|
TrafficData *proxy = nullptr;
|
|
|
|
void UpdateAll();
|
|
|
|
void Loop();
|
|
|
|
private:
|
|
TrafficData *direct = new TrafficData("direct");
|
|
|
|
[[nodiscard]] static TrafficData *update_stats(TrafficData *item);
|
|
};
|
|
|
|
extern TrafficLooper *trafficLooper;
|
|
} // namespace NekoGui_traffic
|