-
Notifications
You must be signed in to change notification settings - Fork 4
/
groupmanagework.h
38 lines (33 loc) · 987 Bytes
/
groupmanagework.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
#pragma once
#pragma execution_character_set("utf-8")
#ifndef GROUPMANAGEWORK_H
#define GROUPMANAGEWORK_H
#include <QObject>
#include <QMutex>
#include <QSqlQuery>
#include "service.h"
class GroupManageWork : public QObject
{
Q_OBJECT
public:
explicit GroupManageWork(QObject *parent = nullptr);
~GroupManageWork();
void working();
void setGroupModel(QSqlTableModel* group);
QSqlDatabase getDB();
void setDepartmentModel(QSqlTableModel* department);
void submitAll(int type); //1代表提交用户组model,0为部门
void fixUser(int type, const QString& removedId);
void setHeartBeat(bool flag);
bool isDisplay = false;
private:
service db_service;
QSqlDatabase DB, DB_SECOND;
QSqlTableModel *groupModel = nullptr, *departmentModel = nullptr;
QTimer* heartBeat = nullptr;
signals:
void groupManageWorkFinished();
void submitFinished_0(bool);
void submitFinished_1(bool);
};
#endif // GROUPMANAGEWORK_H