2025-03-17 15:06:54 +08:00
|
|
|
|
#ifndef CEventForm_H
|
2025-03-14 17:05:48 +08:00
|
|
|
|
#define CEventForm_H
|
|
|
|
|
|
|
|
|
|
|
|
#include <QWidget>
|
|
|
|
|
|
#include <QDateTime>
|
|
|
|
|
|
#include <QListWidget>
|
|
|
|
|
|
#include <QLineEdit>
|
|
|
|
|
|
#include <QPushButton>
|
|
|
|
|
|
#include "CMyCalendar.h"
|
|
|
|
|
|
#include "CExcelPrinter.h"
|
|
|
|
|
|
namespace Ui {
|
|
|
|
|
|
class CEventForm;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
class CEventDelegate;
|
|
|
|
|
|
class CEventItemModel;
|
|
|
|
|
|
class CEventHistoryModel;
|
|
|
|
|
|
class QAbstractTableModel;
|
|
|
|
|
|
|
|
|
|
|
|
typedef QList<QModelIndex> QModelIndexList;
|
|
|
|
|
|
|
|
|
|
|
|
class CEventForm : public QWidget
|
|
|
|
|
|
{
|
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
explicit CEventForm(QWidget *parent, bool editMode);
|
|
|
|
|
|
~CEventForm();
|
|
|
|
|
|
void initilize();
|
|
|
|
|
|
|
|
|
|
|
|
signals:
|
|
|
|
|
|
void closeBtnClicked();
|
|
|
|
|
|
void printExcel(CEventItemModel *model,QString fileName);
|
|
|
|
|
|
void printExcelHis(CEventHistoryModel *model,QString fileName);
|
|
|
|
|
|
public slots:
|
|
|
|
|
|
void login();
|
|
|
|
|
|
|
|
|
|
|
|
void logout();
|
|
|
|
|
|
|
|
|
|
|
|
void slotShowResult(QString result);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
void initFilter();
|
|
|
|
|
|
void setLevelComboBox(bool &isLevelFilter,QList<int> &listLevel);
|
|
|
|
|
|
void setLocationComboBox(bool &isLocationFilter,QList<int> &listLocation);
|
|
|
|
|
|
void setEventTypeComboBox(bool &isEventTypeFilter,QList<int> &listEventType);
|
|
|
|
|
|
void setEventTimeLineEdit(bool &isTimeFilter, QDateTime &startTime, QDateTime &endTime);
|
|
|
|
|
|
void setFilterWndInit();
|
|
|
|
|
|
protected slots:
|
|
|
|
|
|
void slotClearRTEvent();
|
|
|
|
|
|
void slotUpdateModel();
|
|
|
|
|
|
void updateFilter();
|
|
|
|
|
|
void slot_updateFilter(bool isLevelFilter, QList<int> listLevel, bool isLocationFilter, QList<int> listLocation, bool isRegionFilter, QList<int> listRegion, bool isEventTypeFilter, QList<int> listEventType,
|
|
|
|
|
|
bool isDeviceTypeFilter, QString subSystem, QString deviceType, bool isKeywordFilterEnable,
|
|
|
|
|
|
QString keyword, bool isTimeFilter, QDateTime startTime, QDateTime endTime);
|
|
|
|
|
|
void slotRTEventStateChanged();
|
|
|
|
|
|
void slotUpdateRTTips(); //< 更新实时数据文本提示
|
|
|
|
|
|
//< 更新历史数据文本提示
|
|
|
|
|
|
void slotUpdateHISTipsRequesting();
|
|
|
|
|
|
void slotPermInvalid();
|
|
|
|
|
|
void slotUpdateHISTips();
|
|
|
|
|
|
void slotHISRecordOutOfRangeTips(QStringList stDescList);
|
|
|
|
|
|
void print();
|
|
|
|
|
|
void stateChanged1(int state);
|
|
|
|
|
|
void stateChanged2(int state);
|
|
|
|
|
|
void stateChanged3(int state);
|
|
|
|
|
|
void textChanged1(const QString &text);
|
|
|
|
|
|
void textChanged2(const QString &text);
|
|
|
|
|
|
void textChanged3(const QString &text);
|
|
|
|
|
|
|
|
|
|
|
|
void myCalendarHide(QDate startTime, QDate endTime);
|
|
|
|
|
|
void myCalendarShow();
|
|
|
|
|
|
void cancleTimeFilter();
|
|
|
|
|
|
protected:
|
|
|
|
|
|
void contextMenuEvent(QContextMenuEvent *event);
|
|
|
|
|
|
private:
|
|
|
|
|
|
Ui::CEventForm *ui;
|
|
|
|
|
|
CEventItemModel * m_pRealTimeModel;
|
|
|
|
|
|
CEventHistoryModel * m_pHistoryModel;
|
|
|
|
|
|
int m_nIsModel;
|
|
|
|
|
|
bool m_isEditMode;
|
|
|
|
|
|
|
|
|
|
|
|
QListWidget *m_pListWidget1;
|
|
|
|
|
|
QListWidget *m_pListWidget2;
|
|
|
|
|
|
QListWidget *m_pListWidget3;
|
|
|
|
|
|
|
|
|
|
|
|
QLineEdit *m_pLineEdit1;
|
|
|
|
|
|
QLineEdit *m_pLineEdit2;
|
|
|
|
|
|
QLineEdit *m_pLineEdit3;
|
|
|
|
|
|
QList<int> m_priorityList;
|
|
|
|
|
|
QList<int> m_locationList;
|
|
|
|
|
|
QList<int> m_eventTypeList;
|
|
|
|
|
|
QString m_strText1;
|
|
|
|
|
|
QString m_strText2;
|
|
|
|
|
|
QString m_strText3;
|
|
|
|
|
|
|
|
|
|
|
|
QPushButton *m_timeIcon;
|
|
|
|
|
|
|
|
|
|
|
|
CMyCalendar * m_myCalendar;
|
|
|
|
|
|
QMenu *m_timeMenu;
|
|
|
|
|
|
|
|
|
|
|
|
QThread *m_thread; //打印线程
|
|
|
|
|
|
CExcelPrinter * m_excelPrinter;
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // CEventForm_H
|