1 #ifndef TRAFFICGRAPHDATA_H 2 #define TRAFFICGRAPHDATA_H 57 bool update(quint64 totalBytesRecv, quint64 totalBytesSent);
91 #endif // TRAFFICGRAPHDATA_H TrafficSample operator+(const TrafficSample &other) const
void setLastBytes(quint64 nLastBytesIn, quint64 nLastBytesOut)
float converSampletoBandwith(float dataAmount)
static const int SMALLEST_SAMPLE_PERIOD
void switchRange(GraphRange newRange)
SampleQueue sumEach3Samples(const SampleQueue &rangeQueue, GraphRange range)
QHash< GraphRange, SampleQueue > SampleQueueMap
TrafficSample & operator+=(const TrafficSample &rhs)
TrafficGraphData(GraphRange range)
SampleQueue sumEach2Samples(const SampleQueue &rangeQueue)
SampleQueueMap sampleStash
void tryUpdateNextWithLast2Samples(GraphRange range, GraphRange nextRange)
static const int RangeMinutes[]
void tryAddingSampleToStash(GraphRange range)
TrafficSample(float in, float out)
void tryUpdateNextWithLast3Samples(GraphRange range, GraphRange nextRange)
TrafficGraphData & operator=(TrafficGraphData const &)
SampleQueue getRangeQueue(GraphRange range)
GraphRange currentGraphRange
bool update(const TrafficSample &trafficSample)
static const int DESIRED_DATA_SAMPLES
SampleQueue getCurrentRangeQueueWithAverageBandwidth()
static const int DesiredQueueSizes[]
SampleQueue getCurrentRangeQueue()
QQueue< TrafficSample > SampleQueue