-
Notifications
You must be signed in to change notification settings - Fork 3
/
activitymanagework.h
50 lines (45 loc) · 1.38 KB
/
activitymanagework.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
43
44
45
46
47
48
49
50
#pragma once
#pragma execution_character_set("utf-8")
#include <QObject>
#include "service.h"
class ActivityManageWork : public QObject
{
Q_OBJECT
public:
ActivityManageWork(QObject *parent = nullptr);
~ActivityManageWork();
void working();
void updateActStatus();
void homeWorking();
QSqlDatabase getDB();
void submitAll();
void setUid(QString uid);
void setModel(QSqlTableModel* model);
void setMemberModel(QSqlTableModel* model);
void apply(const QString aid, const QString& uid);
void cancel(const QString aid, const QString& uid);
void delActivity(const QString aid);
void m_approveAll(const QString aid);
void m_approve(const QString actm_id);
void m_reject(const QString actm_id);
void m_delete(const QString actm_id);
void setType(int t);
void setFilter(int flag, const QString& filter);
void setHeartBeat(bool flag);
float getCurScore();
bool isDisplay = false; //当前页正在展示
private:
QTimer *heartBeat = nullptr;
float curScore = 0;
int type; //1为活动页面,2为活动管理页面
QString uid; //用于统计当前用户已完成活动
service db_service;
QSqlDatabase DB, DB_SECOND;
QSqlTableModel* tabModel = nullptr, *memberTabModel = nullptr;
signals:
void activityManageWorkFinished(int type);
void actHomeWorkFinished();
void submitAllFinished(bool);
void operateFinished(QString error);
void manageOperateFinished(QString error);
};