From 789ca114a2ca04d36d11619abffb5d80b385436f Mon Sep 17 00:00:00 2001 From: shi_jq Date: Mon, 17 Mar 2025 16:46:46 +0800 Subject: [PATCH] =?UTF-8?q?[ref]=E5=90=8C=E6=AD=A5711=20711=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EventWidget/CAccidentReviewDialog.cpp | 2 +- .../EventWidget/CAccidentReviewDialog.h | 2 +- .../plugin/EventWidget/CEventDataCollect.cpp | 53 +-- .../plugin/EventWidget/CEventDataCollect.h | 8 +- .../gui/plugin/EventWidget/CEventDelegate.cpp | 2 +- .../gui/plugin/EventWidget/CEventDelegate.h | 2 +- .../EventWidget/CEventDeviceTreeItem.cpp | 16 +- .../plugin/EventWidget/CEventDeviceTreeItem.h | 5 +- .../EventWidget/CEventDeviceTreeModel.cpp | 18 +- .../EventWidget/CEventDeviceTreeModel.h | 7 +- .../EventWidget/CEventDeviceTreeView.cpp | 28 +- .../plugin/EventWidget/CEventDeviceTreeView.h | 4 +- .../plugin/EventWidget/CEventFilterDialog.cpp | 2 +- .../plugin/EventWidget/CEventFilterDialog.h | 2 +- .../plugin/EventWidget/CEventFilterDialog.ui | 6 +- .../src/gui/plugin/EventWidget/CEventForm.cpp | 52 +-- .../src/gui/plugin/EventWidget/CEventForm.h | 2 +- .../src/gui/plugin/EventWidget/CEventForm.ui | 357 +++++++++--------- .../plugin/EventWidget/CEventHisThread.cpp | 25 +- .../gui/plugin/EventWidget/CEventHisThread.h | 2 +- .../plugin/EventWidget/CEventHistoryModel.cpp | 54 +-- .../plugin/EventWidget/CEventHistoryModel.h | 2 +- .../plugin/EventWidget/CEventItemModel.cpp | 25 +- .../gui/plugin/EventWidget/CEventItemModel.h | 2 +- .../gui/plugin/EventWidget/CEventMsgInfo.cpp | 5 +- .../gui/plugin/EventWidget/CEventMsgInfo.h | 3 +- .../plugin/EventWidget/CEventMsgManage.cpp | 2 +- .../gui/plugin/EventWidget/CEventMsgManage.h | 2 +- .../plugin/EventWidget/CEventPluginWidget.cpp | 2 +- .../plugin/EventWidget/CEventPluginWidget.h | 4 +- .../src/gui/plugin/EventWidget/CEventView.cpp | 2 +- .../src/gui/plugin/EventWidget/CEventView.h | 2 +- .../gui/plugin/EventWidget/CExcelPrinter.cpp | 2 +- .../gui/plugin/EventWidget/CExcelPrinter.h | 2 +- .../gui/plugin/EventWidget/CMyCalendar.cpp | 2 +- .../src/gui/plugin/EventWidget/CMyCalendar.h | 2 +- .../gui/plugin/EventWidget/CMyCheckBox.cpp | 2 +- .../src/gui/plugin/EventWidget/CMyCheckBox.h | 2 +- .../gui/plugin/EventWidget/CMyListWidget.cpp | 2 +- .../gui/plugin/EventWidget/CMyListWidget.h | 2 +- .../plugin/EventWidget/CTableViewPrinter.cpp | 2 +- .../plugin/EventWidget/CTableViewPrinter.h | 2 +- product/src/gui/plugin/EventWidget/main.cpp | 4 +- 43 files changed, 356 insertions(+), 368 deletions(-) diff --git a/product/src/gui/plugin/EventWidget/CAccidentReviewDialog.cpp b/product/src/gui/plugin/EventWidget/CAccidentReviewDialog.cpp index 8b22972a..430d4f7a 100644 --- a/product/src/gui/plugin/EventWidget/CAccidentReviewDialog.cpp +++ b/product/src/gui/plugin/EventWidget/CAccidentReviewDialog.cpp @@ -1,4 +1,4 @@ -#include "CAccidentReviewDialog.h" +#include "CAccidentReviewDialog.h" #include "public/pub_utility_api/FileUtil.h" #include "public/pub_logger_api/logger.h" #include diff --git a/product/src/gui/plugin/EventWidget/CAccidentReviewDialog.h b/product/src/gui/plugin/EventWidget/CAccidentReviewDialog.h index 080fb279..6d475f81 100644 --- a/product/src/gui/plugin/EventWidget/CAccidentReviewDialog.h +++ b/product/src/gui/plugin/EventWidget/CAccidentReviewDialog.h @@ -1,4 +1,4 @@ -#ifndef CACCIDENTREVIEWDIALOG_H +#ifndef CACCIDENTREVIEWDIALOG_H #define CACCIDENTREVIEWDIALOG_H #include diff --git a/product/src/gui/plugin/EventWidget/CEventDataCollect.cpp b/product/src/gui/plugin/EventWidget/CEventDataCollect.cpp index f1ea5181..fa719b7b 100644 --- a/product/src/gui/plugin/EventWidget/CEventDataCollect.cpp +++ b/product/src/gui/plugin/EventWidget/CEventDataCollect.cpp @@ -1,4 +1,4 @@ -#include "CEventDataCollect.h" +#include "CEventDataCollect.h" #include #include #include @@ -8,7 +8,18 @@ #include "perm_mng_api/PermMngApi.h" #include "CEventMsgManage.h" +//< 屏蔽xml_parser编译告警 +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-copy" +#endif + #include "boost/property_tree/xml_parser.hpp" + +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif + #include "boost/typeof/typeof.hpp" #include "boost/filesystem.hpp" #include "Common.h" @@ -123,7 +134,6 @@ void CEventDataCollect::loadEventConfig() loadEventOtherStatusDescription(); loadUserName(); loadDeviceGroupDescription(); - loadSubSystemDescription(); } int CEventDataCollect::priorityId(const QString &description) @@ -181,11 +191,6 @@ QString CEventDataCollect::deviceTypeDescription(const int &id) return m_deviceTypeDescriptionMap.value(id, QString()); } -QString CEventDataCollect::deviceGroupDescription(const QString &id) -{ - return m_deviceGroupDescriptionMap.value(id, QString()); -} - QString CEventDataCollect::alarmStatusDescription(const int &id) { return m_alarmStatusMap.value(id, QString()); @@ -201,11 +206,6 @@ QString CEventDataCollect::eventShowStatusDescription(const int &id) return m_eventShowStatusMap.value(id, QString()); } -QString CEventDataCollect::subSystemDescription(const int &id) -{ - return m_subSystemDescriptionMap.value(id, QString()); -} - QList CEventDataCollect::priorityList() { return m_priorityDescriptionMap.keys(); @@ -307,35 +307,6 @@ void CEventDataCollect::loadPriorityDescription() } } -void CEventDataCollect::loadSubSystemDescription() -{ - m_subSystemDescriptionMap.clear(); - if(m_rtdbAccess->open("base", "sys_model_sub_system_info")) - { - LOGERROR("open sys_model_sub_system_info success"); - iot_dbms::CTableLockGuard locker(*m_rtdbAccess); - iot_dbms::CRdbQueryResult result; - std::vector columns; - columns.push_back("sub_system_id"); - columns.push_back("description"); - - if(m_rtdbAccess->select(result, columns)) - { - LOGERROR("select columns success"); - LOGERROR(QString::number( result.getRecordCount()).toStdString().c_str()); - for(int nIndex(0); nIndex < result.getRecordCount(); nIndex++) - { - iot_dbms::CVarType key; - iot_dbms::CVarType value; - result.getColumnValue(nIndex, 0, key); - result.getColumnValue(nIndex, 1, value); - m_subSystemDescriptionMap[key.toInt()] = QString::fromStdString(value.toStdString()); - - } - } - } -} - void CEventDataCollect::loadLocationDescription() { m_areaInfoMap.clear(); diff --git a/product/src/gui/plugin/EventWidget/CEventDataCollect.h b/product/src/gui/plugin/EventWidget/CEventDataCollect.h index d558c7bf..5436b5b4 100644 --- a/product/src/gui/plugin/EventWidget/CEventDataCollect.h +++ b/product/src/gui/plugin/EventWidget/CEventDataCollect.h @@ -1,4 +1,4 @@ -#ifndef CEventDataCollect_H +#ifndef CEventDataCollect_H #define CEventDataCollect_H #include @@ -39,10 +39,9 @@ public: QString regionDescription(const int & id); QString alarmTypeDescription(const int & id); QString deviceTypeDescription(const int & id); - QString deviceGroupDescription(const QString &id); QString alarmStatusDescription(const int & id); QString userNameDescription(const int & id); - QString subSystemDescription(const int &id); + QString eventShowStatusDescription(const int & id); QList priorityList(); @@ -113,7 +112,7 @@ private: void loadDeviceTypeDescription(); void loadAlarmStatusDescription(); void loadUserName(); - void loadSubSystemDescription(); + void loadEventShowStatusDescription(); void loadEventOtherStatusDescription(); @@ -137,7 +136,6 @@ private: QMap m_subSystemDescriptionMap; QMap m_alarmStatusMap; QMap m_userNameMap; - QMap m_DescriptionMap; static CEventDataCollect * m_pInstance; QMap m_eventShowStatusMap; // diff --git a/product/src/gui/plugin/EventWidget/CEventDelegate.cpp b/product/src/gui/plugin/EventWidget/CEventDelegate.cpp index 36accf81..3de1161c 100644 --- a/product/src/gui/plugin/EventWidget/CEventDelegate.cpp +++ b/product/src/gui/plugin/EventWidget/CEventDelegate.cpp @@ -1,4 +1,4 @@ -#include "CEventDelegate.h" +#include "CEventDelegate.h" #include #include #include diff --git a/product/src/gui/plugin/EventWidget/CEventDelegate.h b/product/src/gui/plugin/EventWidget/CEventDelegate.h index 9bfff454..185c06ae 100644 --- a/product/src/gui/plugin/EventWidget/CEventDelegate.h +++ b/product/src/gui/plugin/EventWidget/CEventDelegate.h @@ -1,4 +1,4 @@ -#ifndef CEVENTDELEGATE_H +#ifndef CEVENTDELEGATE_H #define CEVENTDELEGATE_H #include diff --git a/product/src/gui/plugin/EventWidget/CEventDeviceTreeItem.cpp b/product/src/gui/plugin/EventWidget/CEventDeviceTreeItem.cpp index 35ab017f..f588358f 100644 --- a/product/src/gui/plugin/EventWidget/CEventDeviceTreeItem.cpp +++ b/product/src/gui/plugin/EventWidget/CEventDeviceTreeItem.cpp @@ -1,4 +1,6 @@ -#include "CEventDeviceTreeItem.h" +#include "CEventDeviceTreeItem.h" + +const int TypeRole = Qt::UserRole + 1; CEventDeviceTreeItem::CEventDeviceTreeItem(const QString &data, CEventDeviceTreeItem *parent) : m_tag(QString()), @@ -11,6 +13,7 @@ CEventDeviceTreeItem::CEventDeviceTreeItem(const QString &data, CEventDeviceTree m_data = data; m_checkState = Qt::Checked; + m_nType = 0; } CEventDeviceTreeItem::~CEventDeviceTreeItem() @@ -63,6 +66,11 @@ QVariant CEventDeviceTreeItem::data(Qt::ItemDataRole role) const { return m_checkState; } + else if(Qt::ItemDataRole(TypeRole) == role) + { + return m_nType; + } + return QVariant(); } @@ -83,6 +91,12 @@ bool CEventDeviceTreeItem::setData(const QVariant &value, Qt::ItemDataRole role) m_checkState = (Qt::CheckState)value.toInt(); return true; } + else if(TypeRole == role) + { + m_nType = value.toInt(); + return true; + } + return false; } diff --git a/product/src/gui/plugin/EventWidget/CEventDeviceTreeItem.h b/product/src/gui/plugin/EventWidget/CEventDeviceTreeItem.h index a2e68a9f..57b29106 100644 --- a/product/src/gui/plugin/EventWidget/CEventDeviceTreeItem.h +++ b/product/src/gui/plugin/EventWidget/CEventDeviceTreeItem.h @@ -1,4 +1,4 @@ -/**************************************************************************** +/**************************************************************************** ** ** Copyright (C) 2016 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ @@ -54,6 +54,8 @@ #include #include +extern const int TypeRole; + class CEventDeviceTreeItem { public: @@ -75,6 +77,7 @@ private: QString m_data; QString m_tag; Qt::CheckState m_checkState; + int m_nType; QList m_childItems; CEventDeviceTreeItem *m_parentItem; diff --git a/product/src/gui/plugin/EventWidget/CEventDeviceTreeModel.cpp b/product/src/gui/plugin/EventWidget/CEventDeviceTreeModel.cpp index 7a8192d4..db841156 100644 --- a/product/src/gui/plugin/EventWidget/CEventDeviceTreeModel.cpp +++ b/product/src/gui/plugin/EventWidget/CEventDeviceTreeModel.cpp @@ -1,4 +1,4 @@ -#include "CEventDeviceTreeItem.h" +#include "CEventDeviceTreeItem.h" #include "CEventDeviceTreeModel.h" #include "CEventMsgManage.h" #include "CEventDataCollect.h" @@ -22,14 +22,27 @@ void CEventDeviceTreeModel::setupModelData(const QMaplocationDescription(locationList[nLocIndex]); CEventDeviceTreeItem * location = new CEventDeviceTreeItem(locDesc, rootItem); + location->setData(TYPE_LOCATION,Qt::ItemDataRole(TypeRole)); + const QVector > vec = locationInfos.value(locationList[nLocIndex]); for(int nDevIndex(0); nDevIndex < vec.size(); ++nDevIndex) { CEventDeviceTreeItem * device = new CEventDeviceTreeItem(vec.at(nDevIndex).second, location); device->setData(vec.at(nDevIndex).first, Qt::UserRole); + device->setData(TYPE_DEVGROUP,Qt::ItemDataRole(TypeRole)); QModelIndex modelIndex = createIndex(nDevIndex, 0, device); m_devTagIndex.insert(vec.at(nDevIndex).first, modelIndex); m_devNameIndex.insert(locDesc + "." + vec.at(nDevIndex).second, modelIndex); + + if(nDevIndex == vec.size() - 1) + { + CEventDeviceTreeItem * sys_device = new CEventDeviceTreeItem(tr(".系统"), location); + sys_device->setData("", Qt::UserRole); + sys_device->setData(TYPE_DEVGROUP,Qt::ItemDataRole(TypeRole)); + QModelIndex sys_modelIndex = createIndex(nDevIndex+1, 0, sys_device); + m_devTagIndex.insert("", sys_modelIndex); + m_devNameIndex.insert("", sys_modelIndex); + } } } } @@ -153,7 +166,8 @@ QVariant CEventDeviceTreeModel::data(const QModelIndex &index, int role) const if (Qt::DisplayRole == role) { const QString &deviceGroup = item->data(Qt::UserRole).toString(); - if(deviceGroup.isEmpty()) + int nType = item->data(Qt::ItemDataRole(TypeRole)).toInt(); + if(deviceGroup.isEmpty() && nType == TYPE_LOCATION) { return item->data(Qt::DisplayRole).toString(); } diff --git a/product/src/gui/plugin/EventWidget/CEventDeviceTreeModel.h b/product/src/gui/plugin/EventWidget/CEventDeviceTreeModel.h index 2aa55aa3..b640a485 100644 --- a/product/src/gui/plugin/EventWidget/CEventDeviceTreeModel.h +++ b/product/src/gui/plugin/EventWidget/CEventDeviceTreeModel.h @@ -1,4 +1,4 @@ -/**************************************************************************** +/**************************************************************************** ** ** Copyright (C) 2016 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ @@ -57,6 +57,11 @@ #include #include "CEventMsgInfo.h" +enum enTreeNodeType{ + TYPE_LOCATION = 0, + TYPE_DEVGROUP +}; + typedef QHash< QString, QModelIndex > HashIndex; //< Device class CEventDeviceTreeItem; diff --git a/product/src/gui/plugin/EventWidget/CEventDeviceTreeView.cpp b/product/src/gui/plugin/EventWidget/CEventDeviceTreeView.cpp index 8abecb17..9084f63c 100644 --- a/product/src/gui/plugin/EventWidget/CEventDeviceTreeView.cpp +++ b/product/src/gui/plugin/EventWidget/CEventDeviceTreeView.cpp @@ -1,7 +1,33 @@ -#include "CEventDeviceTreeView.h" +#include "CEventDeviceTreeView.h" +#include "CEventDeviceTreeModel.h" +#include "CEventDeviceTreeItem.h" +#include +#include CEventDeviceTreeView::CEventDeviceTreeView(QWidget *parent) : QTreeView(parent) { } + +void CEventDeviceTreeView::contextMenuEvent(QContextMenuEvent *event) +{ + CEventDeviceTreeModel * pModel = dynamic_cast(model()); + if(Q_NULLPTR != pModel) + { + QMenu menu; + CEventDeviceTreeItem * pItem = static_cast(indexAt(event->pos()).internalPointer()); + if (Q_NULLPTR == pItem) + { + menu.addAction(tr("全选"), [=](){ pModel->setAllDeviceCheckState(Qt::Checked); }); + menu.addAction(tr("清空"), [=](){ pModel->setAllDeviceCheckState(Qt::Unchecked); }); + } + else if (Q_NULLPTR != pItem && pItem->childCount() > 0) + { + menu.addAction(tr("选择"), [=](){ pModel->setDeviceCheckState(indexAt(event->pos()), Qt::Checked); }); + menu.addAction(tr("清除"), [=](){ pModel->setDeviceCheckState(indexAt(event->pos()), Qt::Unchecked); }); + } + menu.exec(event->globalPos()); + } + return; +} diff --git a/product/src/gui/plugin/EventWidget/CEventDeviceTreeView.h b/product/src/gui/plugin/EventWidget/CEventDeviceTreeView.h index 009bab75..b443978c 100644 --- a/product/src/gui/plugin/EventWidget/CEventDeviceTreeView.h +++ b/product/src/gui/plugin/EventWidget/CEventDeviceTreeView.h @@ -1,4 +1,4 @@ -#ifndef CEVENTDEVICETREEVIEW_H +#ifndef CEVENTDEVICETREEVIEW_H #define CEVENTDEVICETREEVIEW_H #include @@ -9,6 +9,8 @@ class CEventDeviceTreeView : public QTreeView public: CEventDeviceTreeView(QWidget *parent = Q_NULLPTR); +protected: + void contextMenuEvent(QContextMenuEvent *event); }; #endif // CEVENTDEVICETREEVIEW_H diff --git a/product/src/gui/plugin/EventWidget/CEventFilterDialog.cpp b/product/src/gui/plugin/EventWidget/CEventFilterDialog.cpp index 2b15cdb7..42e41e5c 100644 --- a/product/src/gui/plugin/EventWidget/CEventFilterDialog.cpp +++ b/product/src/gui/plugin/EventWidget/CEventFilterDialog.cpp @@ -1,4 +1,4 @@ -#include "CEventFilterDialog.h" +#include "CEventFilterDialog.h" #include "ui_CEventFilterDialog.h" #include "CEventDataCollect.h" #include "public/pub_sysinfo_api/SysInfoApi.h" diff --git a/product/src/gui/plugin/EventWidget/CEventFilterDialog.h b/product/src/gui/plugin/EventWidget/CEventFilterDialog.h index ad2a715e..c0997e9d 100644 --- a/product/src/gui/plugin/EventWidget/CEventFilterDialog.h +++ b/product/src/gui/plugin/EventWidget/CEventFilterDialog.h @@ -1,4 +1,4 @@ -#ifndef CEVENTFILTERDIALOG_H +#ifndef CEVENTFILTERDIALOG_H #define CEVENTFILTERDIALOG_H #include diff --git a/product/src/gui/plugin/EventWidget/CEventFilterDialog.ui b/product/src/gui/plugin/EventWidget/CEventFilterDialog.ui index ce477fac..af873231 100644 --- a/product/src/gui/plugin/EventWidget/CEventFilterDialog.ui +++ b/product/src/gui/plugin/EventWidget/CEventFilterDialog.ui @@ -6,13 +6,13 @@ 0 0 - 570 - 421 + 1000 + 469 - 530 + 1000 0 diff --git a/product/src/gui/plugin/EventWidget/CEventForm.cpp b/product/src/gui/plugin/EventWidget/CEventForm.cpp index cfdf395d..b551bdb6 100644 --- a/product/src/gui/plugin/EventWidget/CEventForm.cpp +++ b/product/src/gui/plugin/EventWidget/CEventForm.cpp @@ -1,4 +1,4 @@ -#include "CEventForm.h" +#include "CEventForm.h" #include "ui_CEventForm.h" #include "CEventMsgInfo.h" #include @@ -242,37 +242,31 @@ void CEventForm::initilize() { //< lingdaoyaoqiu { - QSettings columFlags1("KBD_HMI", "eventReal config"); + QSettings columFlags1("IOT_HMI", "eventReal config"); if(!columFlags1.contains(QString("eventReal/colum_0"))) { columFlags1.setValue(QString("eventReal/colum_0"), false); //< 时间 columFlags1.setValue(QString("eventReal/colum_1"), false); //< 优先级 columFlags1.setValue(QString("eventReal/colum_2"), false); //< 位置 columFlags1.setValue(QString("eventReal/colum_3"), true); //< 责任区 - columFlags1.setValue(QString("eventReal/colum_4"), true); //< 事件类型 - columFlags1.setValue(QString("eventReal/colum_5"), false); //< 事件状态 + columFlags1.setValue(QString("eventReal/colum_4"), false); //< 事件类型 + columFlags1.setValue(QString("eventReal/colum_5"), true); //< 事件状态 columFlags1.setValue(QString("eventReal/colum_6"), false); //< 复归状态 } } { - QSettings columFlags2("KBD_HMI", "eventHis config"); + QSettings columFlags2("IOT_HMI", "eventHis config"); if(!columFlags2.contains(QString("eventHis/colum_0"))) { - // tr("时间") << tr("优先级") << tr("位置") << tr("责任区") << tr("事件类型")<< tr("事件状态")<< tr("复归状态")<< tr("专业")<< tr("设备组")<< tr("确认人")<< tr("确认时间")<< tr("点标签")<< tr("事件内容") ; - columFlags2.setValue(QString("eventHis/colum_0"), false); //< 时间 columFlags2.setValue(QString("eventHis/colum_1"), false); //< 优先级 columFlags2.setValue(QString("eventHis/colum_2"), false); //< 位置 columFlags2.setValue(QString("eventHis/colum_3"), true); //< 责任区 - columFlags2.setValue(QString("eventHis/colum_4"), true); //< 事件类型 - columFlags2.setValue(QString("eventHis/colum_5"), false); //< 事件状态 + columFlags2.setValue(QString("eventHis/colum_4"), false); //< 事件类型 + columFlags2.setValue(QString("eventHis/colum_5"), true); //< 事件状态 columFlags2.setValue(QString("eventHis/colum_6"), false); //< 复归状态 - columFlags2.setValue(QString("eventHis/colum_7"), true); // - columFlags2.setValue(QString("eventHis/colum_8"), true); // - columFlags2.setValue(QString("eventHis/colum_9"), true); // - columFlags2.setValue(QString("eventHis/colum_10"),true); // - columFlags2.setValue(QString("eventHis/colum_11"),true); // - columFlags2.setValue(QString("eventHis/colum_12"),true); // + columFlags2.setValue(QString("eventHis/colum_7"), true); //< 确认人 + columFlags2.setValue(QString("eventHis/colum_8"), true); //< 确认时间 } } m_pListWidget1 = new CMyListWidget(this); @@ -339,7 +333,7 @@ void CEventForm::initHisModel() ui->eventView_2->setModel(m_pHistoryModel); m_pHistoryDelegate->setHisEventModel(m_pHistoryModel); ui->eventView_2->setColumnWidth(8, 250); - QSettings columFlags2("KBD_HMI", "eventHis config"); + QSettings columFlags2("IOT_HMI", "eventHis config"); for(int nColumnIndex(0); nColumnIndex < m_pHistoryModel->columnCount() - 1; nColumnIndex++) { bool visible = columFlags2.value(QString("eventHis/colum_%1").arg(nColumnIndex)).toBool(); @@ -354,11 +348,6 @@ void CEventForm::initHisModel() ui->eventView_2->setColumnWidth(5, 150); ui->eventView_2->setColumnWidth(6, 150); ui->eventView_2->setColumnWidth(7, 150); - ui->eventView_2->setColumnWidth(8, 150); - ui->eventView_2->setColumnWidth(9, 150); - ui->eventView_2->setColumnWidth(10, 150); - ui->eventView_2->setColumnWidth(11, 250); - ui->eventView_2->setColumnWidth(12, 350); slotUpdateHISTips(); if(m_pDeviceHisModel == NULL) @@ -386,11 +375,11 @@ void CEventForm::initRealModel() { m_pRealTimeModel = new CEventItemModel(this); connect(ui->eventView->horizontalHeader(), SIGNAL(sortIndicatorChanged(int,Qt::SortOrder)), m_pRealTimeModel, SLOT(sortColumn(int,Qt::SortOrder))); - ui->eventView->horizontalHeader()->setSortIndicator(0, Qt::AscendingOrder); + ui->eventView->horizontalHeader()->setSortIndicator(0, Qt::DescendingOrder); } ui->eventView->setModel(m_pRealTimeModel); m_pRealDelegate->setEventModel(m_pRealTimeModel); - QSettings columFlags1("KBD_HMI", "eventReal config"); + QSettings columFlags1("IOT_HMI", "eventReal config"); for(int nColumnIndex(0); nColumnIndex < m_pRealTimeModel->columnCount() - 1; nColumnIndex++) { bool visible = columFlags1.value(QString("eventReal/colum_%1").arg(nColumnIndex)).toBool(); @@ -907,7 +896,7 @@ void CEventForm::slotUpdateRTTips() ui->typeLabel->setText(tr("实时事件总数:")); if(m_pRealTimeModel) { - ui->eventCount->setText(QString::number(CEventMsgManage::instance()->getListEventCount())); + ui->eventCount->setText(QString::number(m_pRealTimeModel->rowCount())); } } @@ -1025,6 +1014,9 @@ void CEventForm::stateChanged1(int state) isCheck = true; m_pRealTimeModel->setPriorityFilter(isCheck,m_priorityList); } + + slotUpdateRTTips(); + updateDeviceGroupHiddenState(); } else if(ui->hisEventButton->isChecked()) { @@ -1081,6 +1073,9 @@ void CEventForm::stateChanged2(int state) isCheck = true; m_pRealTimeModel->setLocationFilter(isCheck,m_locationList); } + + slotUpdateRTTips(); + updateDeviceGroupHiddenState(); } else if(ui->hisEventButton->isChecked()) { @@ -1142,6 +1137,9 @@ void CEventForm::stateChanged3(int state) isCheck = true; m_pRealTimeModel->setEventTypeFilter(isCheck,m_eventStatusList,other); } + + slotUpdateRTTips(); + updateDeviceGroupHiddenState(); } else if(ui->hisEventButton->isChecked()) { @@ -1312,7 +1310,7 @@ void CEventForm::contextMenuRealEvent(QContextMenuEvent *event) connect(action, &QAction::triggered, [=](){ ui->eventView->setColumnHidden(nColumnIndex, !action->isChecked()); - QSettings columFlags1("KBD_HMI", "eventReal config"); + QSettings columFlags1("IOT_HMI", "eventReal config"); columFlags1.setValue(QString("eventReal/colum_%1").arg(nColumnIndex), !action->isChecked()); }); } @@ -1368,7 +1366,7 @@ void CEventForm::contextMenuHisEvent(QContextMenuEvent *event) action->setChecked(!ui->eventView_2->isColumnHidden(nColumnIndex)); connect(action, &QAction::triggered, [=](){ ui->eventView_2->setColumnHidden(nColumnIndex, !action->isChecked()); - QSettings columFlags2("KBD_HMI", "eventHis config"); + QSettings columFlags2("IOT_HMI", "eventHis config"); columFlags2.setValue(QString("eventHis/colum_%1").arg(nColumnIndex), !action->isChecked()); }); } @@ -1459,6 +1457,8 @@ void CEventForm::loadDeviceGroupFilterWidget() void CEventForm::updateDeviceGroupHiddenState() { + m_pDeviceModel->slotHisDevTreeUpdate(m_pRealTimeModel->getListShowAlarmInfo()); + QHash listDeviceStatisticalInfo = m_pDeviceModel->getDeviceStatisticalInfo(); for(int nTopLevelRow(0); nTopLevelRow < m_pDeviceModel->rowCount(); nTopLevelRow++) { diff --git a/product/src/gui/plugin/EventWidget/CEventForm.h b/product/src/gui/plugin/EventWidget/CEventForm.h index c5b32c59..727aeb9f 100644 --- a/product/src/gui/plugin/EventWidget/CEventForm.h +++ b/product/src/gui/plugin/EventWidget/CEventForm.h @@ -1,4 +1,4 @@ -#ifndef CEventForm_H +#ifndef CEventForm_H #define CEventForm_H #include diff --git a/product/src/gui/plugin/EventWidget/CEventForm.ui b/product/src/gui/plugin/EventWidget/CEventForm.ui index fdd997b3..e8b97b60 100644 --- a/product/src/gui/plugin/EventWidget/CEventForm.ui +++ b/product/src/gui/plugin/EventWidget/CEventForm.ui @@ -37,7 +37,7 @@ 0 - + 9 @@ -124,135 +124,17 @@ 0 - - - 6 - + - 5 + 3 - 5 + 3 - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 0 - 0 - - - - - 16777215 - 26 - - - - 优先级: - - - - - - - - 125 - 0 - - - - - 16777215 - 26 - - - - - - - - - 0 - 0 - - - - - 16777215 - 26 - - - - 位置: - - - - - - - - 125 - 0 - - - - - 16777215 - 26 - - - - - - - - - 0 - 0 - - - - - 16777215 - 26 - - - - 事件状态: - - - - - - - - 137 - 0 - - - - - 16777215 - 26 - - - - - + + 0 + + @@ -271,38 +153,13 @@ - - - - - 0 - 0 - - - - - 200 - 26 - - - - - 200 - 26 - - - - - - - - - + + Qt::Horizontal - QSizePolicy::Fixed + QSizePolicy::Preferred @@ -312,11 +169,27 @@ - + + + + Qt::Horizontal + + + QSizePolicy::Preferred + + + + 40 + 20 + + + + + - 45 + 70 26 @@ -325,24 +198,17 @@ - - - + + + - 45 - 26 + 70 + 0 - - 过滤 - - - - - - 45 + 70 26 @@ -351,11 +217,11 @@ - + - 45 + 70 26 @@ -364,6 +230,155 @@ + + + + + 70 + 26 + + + + 过滤 + + + + + + + + 0 + 0 + + + + + 16777215 + 26 + + + + 位置: + + + + + + + + 0 + 0 + + + + + 125 + 0 + + + + + 16777215 + 26 + + + + + + + + + 0 + 0 + + + + + 125 + 26 + + + + + + + + + + + + 0 + 0 + + + + + 16777215 + 26 + + + + 优先级: + + + + + + + + 0 + 0 + + + + + 125 + 0 + + + + + 16777215 + 26 + + + + + + + + + 0 + 0 + + + + + 16777215 + 26 + + + + 事件状态: + + + + + + + + 125 + 0 + + + + + 16777215 + 26 + + + + diff --git a/product/src/gui/plugin/EventWidget/CEventHisThread.cpp b/product/src/gui/plugin/EventWidget/CEventHisThread.cpp index df36d237..d32f1cbc 100644 --- a/product/src/gui/plugin/EventWidget/CEventHisThread.cpp +++ b/product/src/gui/plugin/EventWidget/CEventHisThread.cpp @@ -1,4 +1,4 @@ -#include "CEventHisThread.h" +#include "CEventHisThread.h" #include "public/pub_sysinfo_api/SysInfoApi.h" #include "pub_logger_api/logger.h" #include @@ -501,7 +501,7 @@ void CEventHisThread::doReturnFilterEnable() qint64 startStamp = m_stFilter.startTime.toMSecsSinceEpoch(); qint64 endStamp = m_stFilter.endTime.toMSecsSinceEpoch(); - sql = QString("select time_stamp,priority,location_id,region_id,content,alm_type,alm_status,alm_style,dev_type,confirm_user_id,confirm_time,key_id_tag,wave_file,dev_group_tag,SUB_SYSTEM from his_event"); + sql = QString("select time_stamp,priority,location_id,region_id,content,alm_type,alm_status,alm_style,dev_type,confirm_user_id,confirm_time,key_id_tag,wave_file,dev_group_tag from his_event"); //先查询标签和时间 然后根据时间和标签再次查询 @@ -557,7 +557,7 @@ void CEventHisThread::doReturnFilterEnable() return ; } //第2次查询结果 - QString sqlBase = QString("select time_stamp,priority,location_id,region_id,content,alm_type,alm_status,alm_style,dev_type,confirm_user_id,confirm_time,key_id_tag,wave_file,dev_group_tag,SUB_SYSTEM from his_event"); + QString sqlBase = QString("select time_stamp,priority,location_id,region_id,content,alm_type,alm_status,alm_style,dev_type,confirm_user_id,confirm_time,key_id_tag,wave_file,dev_group_tag from his_event"); int counter = 0; QString cond = QString(); for(int index(0);indexisOpen()) - { - QSqlQuery query; - try - { - m_pReadDb->execute(sql,query); - } - catch(...) - { - qDebug() << "Query Error!"; - } - search(sql,historyEventList); - } + search(sql,historyEventList); emit sigUpdateHisEvent(historyEventList); } @@ -679,9 +667,6 @@ void CEventHisThread::search(const QString &sql, QList &eventList) info->priorityOrder = queryPriorityOrder(info->priority); info->wave_file = query.value(12).toString(); info->dev_group_tag = query.value(13).toString(); - info->sub_system = query.value(14).toInt(); - - eventList.append(info); } } diff --git a/product/src/gui/plugin/EventWidget/CEventHisThread.h b/product/src/gui/plugin/EventWidget/CEventHisThread.h index a37afdd7..0f495ec4 100644 --- a/product/src/gui/plugin/EventWidget/CEventHisThread.h +++ b/product/src/gui/plugin/EventWidget/CEventHisThread.h @@ -1,4 +1,4 @@ -#ifndef CEVENTHISTHREAD_H +#ifndef CEVENTHISTHREAD_H #define CEVENTHISTHREAD_H #include diff --git a/product/src/gui/plugin/EventWidget/CEventHistoryModel.cpp b/product/src/gui/plugin/EventWidget/CEventHistoryModel.cpp index e81a761c..f37ad560 100644 --- a/product/src/gui/plugin/EventWidget/CEventHistoryModel.cpp +++ b/product/src/gui/plugin/EventWidget/CEventHistoryModel.cpp @@ -1,4 +1,4 @@ -#include "CEventHistoryModel.h" +#include "CEventHistoryModel.h" #include "CEventMsgInfo.h" #include #include @@ -18,8 +18,8 @@ CEventHistoryModel::CEventHistoryModel(QObject *parent) m_sortKey(E_SORT_TIME), m_order(Qt::DescendingOrder) { - header << tr("时间") << tr("优先级") << tr("位置") << tr("责任区") << tr("事件类型")<< tr("事件状态")<< tr("复归状态")<< tr("专业")<< tr("设备组")<< tr("确认人")<< tr("确认时间")<< tr("点标签")<< tr("事件内容") ; - initialize(); + header << tr("时间") << tr("优先级") << tr("位置") << tr("责任区") << tr("事件类型")<< tr("事件状态")<< tr("复归状态")<< tr("确认人")<< tr("确认时间") << tr("事件内容"); + initialize(); } CEventHistoryModel::~CEventHistoryModel() @@ -433,7 +433,13 @@ QVariant CEventHistoryModel::data(const QModelIndex &index, int role) const if(Qt::TextAlignmentRole == role) { - return QVariant(Qt::AlignHCenter | Qt::AlignVCenter); + if(index.column() == 9) + { + return QVariant(Qt::AlignLeft | Qt::AlignVCenter); + }else + { + return QVariant(Qt::AlignHCenter | Qt::AlignVCenter); + } } else if(Qt::DisplayRole == role) { @@ -477,29 +483,8 @@ QVariant CEventHistoryModel::data(const QModelIndex &index, int role) const return QString("-"); } } - case 7 : { - return CEventDataCollect::instance()->subSystemDescription(m_listShowEventInfo.at(index.row())->sub_system); - - - } - case 8 : - { - QString dev_group_name = CEventDataCollect::instance()->deviceGroupDescription(m_listShowEventInfo.at(index.row())->dev_group_tag); - if(dev_group_name.isEmpty()) - { - return QString("-"); - }else - { - return dev_group_name; - } - - - } - case 9 : - { - QString userName = CEventDataCollect::instance()->userNameDescription(m_listShowEventInfo.at(index.row())->cfm_user); if(userName.isEmpty()) { @@ -509,9 +494,8 @@ QVariant CEventHistoryModel::data(const QModelIndex &index, int role) const return userName; } } - case 10 : + case 8 : { - if(m_listShowEventInfo.at(index.row())->cfm_time == 0) { return QString("-"); @@ -520,22 +504,10 @@ QVariant CEventHistoryModel::data(const QModelIndex &index, int role) const return QDateTime::fromMSecsSinceEpoch(m_listShowEventInfo.at(index.row())->cfm_time).toString("yyyy-MM-dd hh:mm:ss.zzz"); } } - case 11 : + case 9 : { - if(m_listShowEventInfo.at(index.row())->key_id_tag =="") - { - return QString("-"); - }else - { - return m_listShowEventInfo.at(index.row())->key_id_tag; - } - } case 12 : - { - return m_listShowEventInfo.at(index.row())->content; - } - default: return QVariant(); } @@ -944,7 +916,7 @@ void CEventHistoryModel::updateShowEvents() QList::iterator it = m_listAllEventInfo.begin(); while (it != m_listAllEventInfo.end()) { //< 设备组 - if((*it)->dev_group_tag.isEmpty() || m_deviceGroupFilter.contains((*it)->dev_group_tag)) + if(/*(*it)->dev_group_tag.isEmpty() ||*/ m_deviceGroupFilter.contains((*it)->dev_group_tag)) { m_listShowEventInfo.append(*it); } diff --git a/product/src/gui/plugin/EventWidget/CEventHistoryModel.h b/product/src/gui/plugin/EventWidget/CEventHistoryModel.h index 314a1f29..ade99bd9 100644 --- a/product/src/gui/plugin/EventWidget/CEventHistoryModel.h +++ b/product/src/gui/plugin/EventWidget/CEventHistoryModel.h @@ -1,4 +1,4 @@ -#ifndef CEVENTHISTORYMODEL_H +#ifndef CEVENTHISTORYMODEL_H #define CEVENTHISTORYMODEL_H #include diff --git a/product/src/gui/plugin/EventWidget/CEventItemModel.cpp b/product/src/gui/plugin/EventWidget/CEventItemModel.cpp index 3ac070fe..eeee69e6 100644 --- a/product/src/gui/plugin/EventWidget/CEventItemModel.cpp +++ b/product/src/gui/plugin/EventWidget/CEventItemModel.cpp @@ -1,4 +1,4 @@ -#include "CEventItemModel.h" +#include "CEventItemModel.h" #include "CEventMsgInfo.h" #include #include @@ -16,7 +16,7 @@ typedef QPair > PAIRLISTALARMINFO; CEventItemModel::CEventItemModel(QObject *parent) :QAbstractTableModel(parent), m_sortKey(E_SORT_TIME), - m_order(Qt::AscendingOrder) + m_order(Qt::DescendingOrder) { header << tr("时间") << tr("优先级") << tr("位置") << tr("责任区") << tr("事件类型") << tr("事件状态") << tr("复归状态") << tr("事件内容"); initialize(); @@ -235,26 +235,12 @@ void CEventItemModel::sortColumn(int column, Qt::SortOrder order) { if(order == Qt::AscendingOrder) { - m_order = Qt::DescendingOrder; + m_order = Qt::AscendingOrder; } else { - m_order = Qt::AscendingOrder; + m_order = Qt::DescendingOrder; } - - if(column ==E_SORT_PRIORITY) - { - if(order == Qt::AscendingOrder) - { - m_order = Qt::AscendingOrder; - } - else - { - m_order = Qt::DescendingOrder; - } - } - - m_sortKey = (E_ALARM_SORTKEY)column; beginResetModel(); @@ -507,7 +493,8 @@ bool CEventItemModel::conditionFilter(EventMsgPtr info) } //< 设备组 - if(!info->dev_group_tag.isEmpty() && !m_deviceGroupFilter.contains(info->dev_group_tag)) + //因为系统告警也就是非设备告警的设备组字段为空,所以把为空判断取消 + if(/*!info->dev_group_tag.isEmpty() &&*/ !m_deviceGroupFilter.contains(info->dev_group_tag)) { return false; } diff --git a/product/src/gui/plugin/EventWidget/CEventItemModel.h b/product/src/gui/plugin/EventWidget/CEventItemModel.h index 0c7d378a..c1b3c08a 100644 --- a/product/src/gui/plugin/EventWidget/CEventItemModel.h +++ b/product/src/gui/plugin/EventWidget/CEventItemModel.h @@ -1,4 +1,4 @@ -#ifndef CEVENTITEMMODEL_H +#ifndef CEVENTITEMMODEL_H #define CEVENTITEMMODEL_H #include diff --git a/product/src/gui/plugin/EventWidget/CEventMsgInfo.cpp b/product/src/gui/plugin/EventWidget/CEventMsgInfo.cpp index c06a5ce7..d269f08d 100644 --- a/product/src/gui/plugin/EventWidget/CEventMsgInfo.cpp +++ b/product/src/gui/plugin/EventWidget/CEventMsgInfo.cpp @@ -1,4 +1,4 @@ -#include "CEventMsgInfo.h" +#include "CEventMsgInfo.h" #include #include "CEventDataCollect.h" #include @@ -15,7 +15,6 @@ CEventMsgInfo::CEventMsgInfo(): alm_status(0), cfm_user(0), cfm_time(0) priority = -1; dev_type = -1; region_id = -1; - sub_system = -1; key_id_tag = QString(); uuid_base64 = QString(); priorityOrder = -1; @@ -23,7 +22,6 @@ CEventMsgInfo::CEventMsgInfo(): alm_status(0), cfm_user(0), cfm_time(0) filterDelete = false; wave_file = QString(); dev_group_tag = QString(); - dev_group_tag = QString(); } CEventMsgInfo::CEventMsgInfo(const CEventMsgInfo &other): alm_status(0), cfm_user(0), cfm_time(0), priorityOrder(0) @@ -44,7 +42,6 @@ CEventMsgInfo::CEventMsgInfo(const CEventMsgInfo &other): alm_status(0), cfm_use filterDelete = other.filterDelete; wave_file = other.wave_file; dev_group_tag = other.dev_group_tag; - dev_group_tag = other.dev_group_tag; } void CEventMsgInfo::initialize(const iot_idl::SEvtInfoToEvtClt &eventInfo) diff --git a/product/src/gui/plugin/EventWidget/CEventMsgInfo.h b/product/src/gui/plugin/EventWidget/CEventMsgInfo.h index 41548161..d8151b9b 100644 --- a/product/src/gui/plugin/EventWidget/CEventMsgInfo.h +++ b/product/src/gui/plugin/EventWidget/CEventMsgInfo.h @@ -1,4 +1,4 @@ -#ifndef ALARMMSGINFO_H +#ifndef ALARMMSGINFO_H #define ALARMMSGINFO_H #include @@ -156,7 +156,6 @@ public: uint cfm_user; //确认人 uint64 cfm_time; //确认时间 QString dev_group_tag; //< 设备组 - qint32 sub_system; //专业号 //Extend qint32 priorityOrder; diff --git a/product/src/gui/plugin/EventWidget/CEventMsgManage.cpp b/product/src/gui/plugin/EventWidget/CEventMsgManage.cpp index 0f38ee17..a50b4314 100644 --- a/product/src/gui/plugin/EventWidget/CEventMsgManage.cpp +++ b/product/src/gui/plugin/EventWidget/CEventMsgManage.cpp @@ -1,4 +1,4 @@ -#include "CEventMsgManage.h" +#include "CEventMsgManage.h" #include #include CEventMsgManage * CEventMsgManage::m_pInstance = Q_NULLPTR; diff --git a/product/src/gui/plugin/EventWidget/CEventMsgManage.h b/product/src/gui/plugin/EventWidget/CEventMsgManage.h index f895457e..90219158 100644 --- a/product/src/gui/plugin/EventWidget/CEventMsgManage.h +++ b/product/src/gui/plugin/EventWidget/CEventMsgManage.h @@ -1,4 +1,4 @@ -#ifndef CEventMsgManage_H +#ifndef CEventMsgManage_H #define CEventMsgManage_H #include diff --git a/product/src/gui/plugin/EventWidget/CEventPluginWidget.cpp b/product/src/gui/plugin/EventWidget/CEventPluginWidget.cpp index adf0cc20..eae75162 100644 --- a/product/src/gui/plugin/EventWidget/CEventPluginWidget.cpp +++ b/product/src/gui/plugin/EventWidget/CEventPluginWidget.cpp @@ -1,4 +1,4 @@ -#include +#include #include "CEventPluginWidget.h" #include "CEventForm.h" diff --git a/product/src/gui/plugin/EventWidget/CEventPluginWidget.h b/product/src/gui/plugin/EventWidget/CEventPluginWidget.h index 1e530db5..6ef08a0c 100644 --- a/product/src/gui/plugin/EventWidget/CEventPluginWidget.h +++ b/product/src/gui/plugin/EventWidget/CEventPluginWidget.h @@ -1,4 +1,4 @@ -#ifndef CEVENTPLUGINWIDGET_H +#ifndef CEVENTPLUGINWIDGET_H #define CEVENTPLUGINWIDGET_H #include @@ -7,7 +7,7 @@ class CEventPluginWidget : public QObject, public CPluginWidgetInterface { Q_OBJECT - Q_PLUGIN_METADATA(IID "kbd.PluginWidgetInterface/1.0") + Q_PLUGIN_METADATA(IID HMI_WidgetPlugin_IID) Q_INTERFACES(CPluginWidgetInterface) public: diff --git a/product/src/gui/plugin/EventWidget/CEventView.cpp b/product/src/gui/plugin/EventWidget/CEventView.cpp index 86fd5ad3..0f9d73bd 100644 --- a/product/src/gui/plugin/EventWidget/CEventView.cpp +++ b/product/src/gui/plugin/EventWidget/CEventView.cpp @@ -1,4 +1,4 @@ -#include +#include #include "CEventView.h" CEventView::CEventView(QWidget *parent) diff --git a/product/src/gui/plugin/EventWidget/CEventView.h b/product/src/gui/plugin/EventWidget/CEventView.h index 5a251886..24779826 100644 --- a/product/src/gui/plugin/EventWidget/CEventView.h +++ b/product/src/gui/plugin/EventWidget/CEventView.h @@ -1,4 +1,4 @@ -#ifndef CEventView_H +#ifndef CEventView_H #define CEventView_H #include diff --git a/product/src/gui/plugin/EventWidget/CExcelPrinter.cpp b/product/src/gui/plugin/EventWidget/CExcelPrinter.cpp index 53b4f8b4..d96f2f04 100644 --- a/product/src/gui/plugin/EventWidget/CExcelPrinter.cpp +++ b/product/src/gui/plugin/EventWidget/CExcelPrinter.cpp @@ -1,4 +1,4 @@ -#include "CExcelPrinter.h" +#include "CExcelPrinter.h" CExcelPrinter::CExcelPrinter(QObject *parent) : QObject(parent) { diff --git a/product/src/gui/plugin/EventWidget/CExcelPrinter.h b/product/src/gui/plugin/EventWidget/CExcelPrinter.h index b3cdfeeb..b9b2864a 100644 --- a/product/src/gui/plugin/EventWidget/CExcelPrinter.h +++ b/product/src/gui/plugin/EventWidget/CExcelPrinter.h @@ -1,4 +1,4 @@ -#ifndef CEXCELPRINTER_H +#ifndef CEXCELPRINTER_H #define CEXCELPRINTER_H #include diff --git a/product/src/gui/plugin/EventWidget/CMyCalendar.cpp b/product/src/gui/plugin/EventWidget/CMyCalendar.cpp index e5f6ea98..94a15135 100644 --- a/product/src/gui/plugin/EventWidget/CMyCalendar.cpp +++ b/product/src/gui/plugin/EventWidget/CMyCalendar.cpp @@ -1,4 +1,4 @@ -#include "CMyCalendar.h" +#include "CMyCalendar.h" #include "ui_CMyCalendar.h" #include #include diff --git a/product/src/gui/plugin/EventWidget/CMyCalendar.h b/product/src/gui/plugin/EventWidget/CMyCalendar.h index cfce4691..44625bbf 100644 --- a/product/src/gui/plugin/EventWidget/CMyCalendar.h +++ b/product/src/gui/plugin/EventWidget/CMyCalendar.h @@ -1,4 +1,4 @@ -#ifndef CMYCALENDAR_H +#ifndef CMYCALENDAR_H #define CMYCALENDAR_H #include diff --git a/product/src/gui/plugin/EventWidget/CMyCheckBox.cpp b/product/src/gui/plugin/EventWidget/CMyCheckBox.cpp index 46f563eb..09398cd4 100644 --- a/product/src/gui/plugin/EventWidget/CMyCheckBox.cpp +++ b/product/src/gui/plugin/EventWidget/CMyCheckBox.cpp @@ -1,4 +1,4 @@ -#include "CMyCheckBox.h" +#include "CMyCheckBox.h" #include CMyCheckBox::CMyCheckBox(QString text, QWidget *parent) diff --git a/product/src/gui/plugin/EventWidget/CMyCheckBox.h b/product/src/gui/plugin/EventWidget/CMyCheckBox.h index bdba8dbc..1dad82e3 100644 --- a/product/src/gui/plugin/EventWidget/CMyCheckBox.h +++ b/product/src/gui/plugin/EventWidget/CMyCheckBox.h @@ -1,4 +1,4 @@ -#ifndef MYCHECKBOX_H +#ifndef MYCHECKBOX_H #define MYCHECKBOX_H #include diff --git a/product/src/gui/plugin/EventWidget/CMyListWidget.cpp b/product/src/gui/plugin/EventWidget/CMyListWidget.cpp index ded92615..fa73a493 100644 --- a/product/src/gui/plugin/EventWidget/CMyListWidget.cpp +++ b/product/src/gui/plugin/EventWidget/CMyListWidget.cpp @@ -1,4 +1,4 @@ -#include "CMyListWidget.h" +#include "CMyListWidget.h" CMyListWidget::CMyListWidget(QWidget *parent):QListWidget(parent) { diff --git a/product/src/gui/plugin/EventWidget/CMyListWidget.h b/product/src/gui/plugin/EventWidget/CMyListWidget.h index 3e92461e..728f308d 100644 --- a/product/src/gui/plugin/EventWidget/CMyListWidget.h +++ b/product/src/gui/plugin/EventWidget/CMyListWidget.h @@ -1,4 +1,4 @@ -#ifndef CMYLISTWIDGET_H +#ifndef CMYLISTWIDGET_H #define CMYLISTWIDGET_H #include diff --git a/product/src/gui/plugin/EventWidget/CTableViewPrinter.cpp b/product/src/gui/plugin/EventWidget/CTableViewPrinter.cpp index afbf955c..c9a7e6e8 100644 --- a/product/src/gui/plugin/EventWidget/CTableViewPrinter.cpp +++ b/product/src/gui/plugin/EventWidget/CTableViewPrinter.cpp @@ -1,4 +1,4 @@ -#include "CTableViewPrinter.h" +#include "CTableViewPrinter.h" #include #include #include diff --git a/product/src/gui/plugin/EventWidget/CTableViewPrinter.h b/product/src/gui/plugin/EventWidget/CTableViewPrinter.h index 839198f2..cb595560 100644 --- a/product/src/gui/plugin/EventWidget/CTableViewPrinter.h +++ b/product/src/gui/plugin/EventWidget/CTableViewPrinter.h @@ -1,4 +1,4 @@ -#ifndef CTABLEVIEWPRINTER_H +#ifndef CTABLEVIEWPRINTER_H #define CTABLEVIEWPRINTER_H class QPointF; diff --git a/product/src/gui/plugin/EventWidget/main.cpp b/product/src/gui/plugin/EventWidget/main.cpp index c5a7be1f..52c03481 100644 --- a/product/src/gui/plugin/EventWidget/main.cpp +++ b/product/src/gui/plugin/EventWidget/main.cpp @@ -1,4 +1,4 @@ -#include +#include //#include "CEventPlugin.h" #include "CEventForm.h" #include "pub_logger_api/logger.h" @@ -17,7 +17,7 @@ int main(int argc, char *argv[]) iot_service::CPermMngApiPtr permMngPtr = iot_service::getPermMngInstance("base"); permMngPtr->PermDllInit(); - if(permMngPtr->SysLogin("admin", "kbdct", 1, 12*60*60, "hmi") != 0) + if(permMngPtr->SysLogin("admin", "admin", 1, 12*60*60, "hmi") != 0) { iot_net::releaseMsgBus(); iot_public::StopLogSystem();