71 lines
2.0 KiB
C++
71 lines
2.0 KiB
C++
#ifndef CCOMPAREQUERYTHREAD_H
|
||
#define CCOMPAREQUERYTHREAD_H
|
||
|
||
#include <QObject>
|
||
#include <QThread>
|
||
#include <QList>
|
||
#include <QGroupBox>
|
||
#include <QCheckBox>
|
||
#include "CommonDefine.h"
|
||
#include "pub_logger_api/logger.h"
|
||
#include "db_sysinfo_api/CDbSysInfo.h"
|
||
#include "db_api_ex/CDbApi.h"
|
||
#include "CAlarmModel.h"
|
||
#include "SAlarmLevel.h"
|
||
#include "SLocation.h"
|
||
|
||
class CCompareQueryThread : public QThread
|
||
{
|
||
Q_OBJECT
|
||
|
||
public:
|
||
enum EN_DateType
|
||
{
|
||
EN_DateType_Day = 0,
|
||
EN_DateType_Month = 1
|
||
};
|
||
|
||
public:
|
||
CCompareQueryThread();
|
||
~CCompareQueryThread();
|
||
|
||
void setHiddenOptColumn(bool hide);
|
||
signals:
|
||
void signalQueryPercent( int nPercent );// 查询完成百分比
|
||
void signalQueryEnd();// 查询结束
|
||
|
||
public slots:
|
||
void slotCancel(){ m_bCancel = true; }
|
||
|
||
public:
|
||
void initVariate();
|
||
void loadData();
|
||
void run();
|
||
void clear();
|
||
void calcTimePoint();
|
||
int getAlarmLevelIndexById( int nId, SAlarmLevel* &pAlarmLevel );
|
||
|
||
public:
|
||
kbd_dbms::CDbApi* m_pDb; // 数据库接口
|
||
CAlarmModel* m_pAlarmModel; // 详细告警信息显示窗的model
|
||
QList<QColor> m_listAlarmLevelColor; // 告警优先级的颜色集合
|
||
QList<SAlarmLevel*> m_listAlarmLevel; // 告警级别列表
|
||
QList<QList<SAlarmList*> > m_listAlarm;// 第一层是设备集合,第二次是时间集合
|
||
|
||
int m_nCurrentLocationIndex;// 当前站序号,0表示全部站
|
||
qint64 m_nStartMs;// 开始时间 ms
|
||
qint64 m_nEndMs;// 结束时间 ms
|
||
QString m_sSelectedLevel;// 已选择的告警等级
|
||
bool m_bCancel;// 是否取消
|
||
|
||
QList<SLocation*> m_listLocation;// 位置信息列表
|
||
QList<QCheckBox*> m_listCheckBox;// 选择列表(站或者设备组)
|
||
EN_DateType m_eDateType;// 查询日期类型
|
||
QList<qint64> m_listTimePoint;// 根据开始时间、结束时间、查询类型计算的时间点
|
||
QString m_sKeyWord;// 查询关键字
|
||
int m_nLastId;
|
||
int m_nLastIndex;
|
||
};
|
||
|
||
#endif // CCOMPAREQUERYTHREAD_H
|