-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathstatistics.h
More file actions
38 lines (35 loc) · 725 Bytes
/
statistics.h
File metadata and controls
38 lines (35 loc) · 725 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef STATISTICS_H
#define STATISTICS_H
#include "utilsexport.h"
#include "options.h"
#include <QObject>
class UTILS_EXPORT Statistics : public QObject
{
Q_OBJECT
class Counter;
friend class Counter;
private:
Statistics();
public:
enum CounterContentType
{
Text,
Image
};
virtual ~Statistics();
static Statistics * instance();
static void release();
void initCounters();
void addCounter(const QString &url, CounterContentType type, int interval);
protected:
static bool isReleased();
void removeCounter(Counter *c);
void clearCounters();
void saveSettings() const;
void loadSettings();
private:
static Statistics * inst;
static bool released;
QList<Counter *> counters;
};
#endif // STATISTICS_H