-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgetcalendartips.h
42 lines (37 loc) · 927 Bytes
/
getcalendartips.h
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
39
40
41
42
#ifndef GETCALENDARTIPS_H
#define GETCALENDARTIPS_H
#include <QObject>
#include "calendarthread.h"
#include <QHttp>
#include <QUrl>
#include <QDebug>
#include <QQueue>
#include <QTimer>
#include <QDate>
#include <QCalendarWidget>
#include <QMutex>
#include <QSettings>
#include <QCoreApplication>
class GetCalendarTips : public QObject
{
Q_OBJECT
QList<CalendarThread*> calendarThreads;
QCalendarWidget *calendar;
QString session;
QString id;
QList<QDate> jobsDone;
QQueue<QDate> jobs;
QMutex mutex;
public slots:
void update(QString text,QDate date);
public:
GetCalendarTips();
void enqueueJob(const QDate &date,bool force=false);
void setCalendar(QCalendarWidget *cal,QString &session,QString &id);
QDate dequeueJob();
void startProcessing();
private:
void updateColors(const QDate &date,QString &text);
QSettings *settings;
};
#endif // GETCALENDARTIPS_H