diff --git a/HanddleAI/HandleAiUi-new/back/backEndManager.h b/HanddleAI/HandleAiUi-new/back/backEndManager.h index 37180c31..01a2e010 100644 --- a/HanddleAI/HandleAiUi-new/back/backEndManager.h +++ b/HanddleAI/HandleAiUi-new/back/backEndManager.h @@ -48,5 +48,12 @@ signals: void sendPixmapImageWidget(showImgPack*); void sendInitFinished(int); void sendInitString(QString);//初始化日志 + + void addDashBoardData(int index, bool value);//增加一个OK/NG数据到dashboard + void resetDashBoard();//reset dashBoard + + void addShowPerformanceWidgetData(int index,int timeCost); + void resetShowPerformanceWidget(); + }; #endif \ No newline at end of file diff --git a/HanddleAI/HandleAiUi-new/back/triggerManager.cpp b/HanddleAI/HandleAiUi-new/back/triggerManager.cpp index 4ca39262..7d8a3f27 100644 --- a/HanddleAI/HandleAiUi-new/back/triggerManager.cpp +++ b/HanddleAI/HandleAiUi-new/back/triggerManager.cpp @@ -73,6 +73,7 @@ void triggerManager::reciveCommond() decodeCameraCMD(readByte); //workThread->snDatas.checkSnFromWaittingVec(readByte); } +int ixxx = 0; void triggerManager::decodeCameraCMD(QByteArray byte) { #if debugTesting diff --git a/HanddleAI/HandleAiUi-new/front/pages/displayPageWidget.h b/HanddleAI/HandleAiUi-new/front/pages/displayPageWidget.h index 1c81c7fa..098c1bd4 100644 --- a/HanddleAI/HandleAiUi-new/front/pages/displayPageWidget.h +++ b/HanddleAI/HandleAiUi-new/front/pages/displayPageWidget.h @@ -6,20 +6,23 @@ #include #include #include +#include class displayWidget :public QWidget { public: - QHBoxLayout* Layout; + QGridLayout* Layout; QLabel* icon, * Title; QWidget* leftWidget, * rightWidget; ImageWidgetManager _ImageWidgetManager; + summaryDataManager* _summaryDataManager; + QListWidget* historyImgs = new QListWidget(); //ImageWidget* imgWidget; displayWidget() { this->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); this->setMaximumSize(9999, 9999); - Layout = new QHBoxLayout(this); + Layout = new QGridLayout(this); Layout->setContentsMargins(0, 0, 0, 0); this->setObjectName("DisplayWidget"); Layout->setAlignment(Qt::AlignLeft); @@ -27,17 +30,21 @@ public: leftWidget = new QWidget(); rightWidget = new QWidget(); - Layout->addWidget(leftWidget); - Layout->addWidget(rightWidget); + Layout->addWidget(leftWidget, 0, 0); + Layout->addWidget(rightWidget ,0, 1); + Layout->addWidget(historyImgs, 0, 2); + Layout->setColumnStretch(0, 3); + Layout->setColumnStretch(1, 1); + Layout->setColumnStretch(2, 1); leftItemInit(); rightItemInit(); } void rightItemInit() { - summaryDataManager* test = new summaryDataManager(); + _summaryDataManager = new summaryDataManager(); QVBoxLayout* hLayout = new QVBoxLayout(rightWidget); - hLayout->addWidget(test->widget); + hLayout->addWidget(_summaryDataManager->widget); } void leftItemInit() { diff --git a/HanddleAI/HandleAiUi-new/main.cpp b/HanddleAI/HandleAiUi-new/main.cpp index 5da12bd0..a6c7b927 100644 --- a/HanddleAI/HandleAiUi-new/main.cpp +++ b/HanddleAI/HandleAiUi-new/main.cpp @@ -20,6 +20,7 @@ void connectSignalAndSlots(MainWindow* front, backEndManager* back) QObject::connect(back, &backEndManager::sendPixmapImageWidget, front, &MainWindow::recvPixmapImageWidget); QObject::connect(back, &backEndManager::sendInitString, front, &MainWindow::recvInitString); QObject::connect(back, &backEndManager::sendInitFinished, front, &MainWindow::recvInitFinished); + QObject::connect(back, &backEndManager::addDashBoardData, front, &MainWindow::addDashBoardData); QObject::connect(front, &MainWindow::reInitSignal, back, &backEndManager::initialization); QObject::connect(front->_loadingWidget.retryBtn, &QPushButton::clicked, back, &backEndManager::initialization); diff --git a/HanddleAI/HandleAiUi-new/mainwindow.h b/HanddleAI/HandleAiUi-new/mainwindow.h index e54ccefc..9e61b0a2 100644 --- a/HanddleAI/HandleAiUi-new/mainwindow.h +++ b/HanddleAI/HandleAiUi-new/mainwindow.h @@ -209,6 +209,15 @@ public slots: _loadingWidget.initLog->append(strIn); } } + + void addDashBoardData(int index, bool value)//澧炲姞涓�涓狾K/NG鏁版嵁鍒癲ashboard + { + //_displayWidget->_summaryDataManager->dashBoardWidgets[index]->setCurrentPercentage(value); + } + //void resetDashBoard();//reset dashBoard + + //void addShowPerformanceWidgetData(int index, int timeCost); + //void resetShowPerformanceWidget(); signals: void reInitSignal(); protected: diff --git a/HanddleAI/HandleAiUi-new/uiModule/components/dashBoard.h b/HanddleAI/HandleAiUi-new/uiModule/components/dashBoard.h index 653622be..e8e12292 100644 --- a/HanddleAI/HandleAiUi-new/uiModule/components/dashBoard.h +++ b/HanddleAI/HandleAiUi-new/uiModule/components/dashBoard.h @@ -90,7 +90,7 @@ protected: private: - int currentValue; + double currentValue; QString Title; QString showText; }; \ No newline at end of file diff --git a/HanddleAI/HandleAiUi-new/uiModule/uiModule_summaryDataManager.h b/HanddleAI/HandleAiUi-new/uiModule/uiModule_summaryDataManager.h index 3d38f0fb..4be01d1b 100644 --- a/HanddleAI/HandleAiUi-new/uiModule/uiModule_summaryDataManager.h +++ b/HanddleAI/HandleAiUi-new/uiModule/uiModule_summaryDataManager.h @@ -7,18 +7,88 @@ #include #include #include +class dashBoradDataWidget : public QWidget +{ +public: + QLabel* OKLabel; + QLabel* NGLabel; + QLabel* totalLabel; + dashBoradDataWidget(QString dataName) + { + QPalette palette; + palette.setColor(QPalette::WindowText, Qt::white); + QFont font("微软雅黑", 14, QFont::Bold); + + QHBoxLayout* layout = new QHBoxLayout(); + this->setLayout(layout); + + QVBoxLayout* vlayout1 = new QVBoxLayout(); + QVBoxLayout* vlayout2 = new QVBoxLayout(); + layout->addLayout(vlayout1); + layout->addLayout(vlayout2); + + DashboardWidget* dashBoard = new DashboardWidget(); + vlayout1->addWidget(dashBoard); + vlayout1->setContentsMargins(0, 0, 0, 0); + { + + + QHBoxLayout* tempLayout = new QHBoxLayout(); + QLabel* tempLabel = new QLabel(dataName + u8"OK数量:"); + tempLabel->setFont(font); + tempLabel->setPalette(palette); + + OKLabel = new QLabel("0"); + OKLabel->setFont(font); + OKLabel->setPalette(palette); + tempLayout->addWidget(tempLabel); + tempLayout->addWidget(OKLabel); + vlayout2->addLayout(tempLayout); + } + { + QHBoxLayout* tempLayout = new QHBoxLayout(); + QLabel* tempLabel = new QLabel(dataName + u8"NG数量:"); + tempLabel->setFont(font); + tempLabel->setPalette(palette); + + NGLabel = new QLabel("0"); + NGLabel->setFont(font); + NGLabel->setPalette(palette); + tempLayout->addWidget(tempLabel); + tempLayout->addWidget(NGLabel); + vlayout2->addLayout(tempLayout); + } + { + QHBoxLayout* tempLayout = new QHBoxLayout(); + QLabel* tempLabel = new QLabel(dataName + u8"总数量:"); + tempLabel->setFont(font); + tempLabel->setPalette(palette); + + totalLabel = new QLabel("0"); + totalLabel->setFont(font); + totalLabel->setPalette(palette); + tempLayout->addWidget(tempLabel); + tempLayout->addWidget(totalLabel); + vlayout2->addLayout(tempLayout); + } + + } + void addOk() + { + + } + void addNG() + { + + } +}; + class summaryDataManager { public: fancyWidget* widget; QLabel* productNameLabel; - QLabel* OKLabel; - QLabel* NGLabel; - QLabel* totalLabel; - - QLabel* OKLabel2; - QLabel* NGLabel2; - QLabel* totalLabel2; + std::vector< dashBoradDataWidget*> dashBoardWidgets; summaryDataManager() { QPalette palette; @@ -33,111 +103,12 @@ public: QVBoxLayout* layout = new QVBoxLayout(); widget->dataWidget.setLayout(layout); - QHBoxLayout* hLayout1 = new QHBoxLayout(); - layout->addLayout(hLayout1); - { - - QVBoxLayout* vlayout1 = new QVBoxLayout(); - QVBoxLayout* vlayout2 = new QVBoxLayout(); - hLayout1->addLayout(vlayout1); - hLayout1->addLayout(vlayout2); - DashboardWidget* dashBoard = new DashboardWidget(); - vlayout1->addWidget(dashBoard); - vlayout2->setContentsMargins(0, 0, 0, 0); - { - QHBoxLayout* tempLayout = new QHBoxLayout(); - QLabel* tempLabel = new QLabel(u8"测量OK数量:"); - tempLabel->setFont(font); - tempLabel->setPalette(palette); + dashBoradDataWidget* _dashBoradDataWidget = new dashBoradDataWidget(u8"测量"); + dashBoradDataWidget* _dashBoradDataWidget2 = new dashBoradDataWidget(u8"检测"); + layout->addWidget(_dashBoradDataWidget); + layout->addWidget(_dashBoradDataWidget2); - OKLabel = new QLabel("0"); - OKLabel->setFont(font); - OKLabel->setPalette(palette); - tempLayout->addWidget(tempLabel); - tempLayout->addWidget(OKLabel); - vlayout2->addLayout(tempLayout); - } - { - QHBoxLayout* tempLayout = new QHBoxLayout(); - QLabel* tempLabel = new QLabel(u8"测量NG数量:"); - tempLabel->setFont(font); - tempLabel->setPalette(palette); - - NGLabel = new QLabel("0"); - NGLabel->setFont(font); - NGLabel->setPalette(palette); - tempLayout->addWidget(tempLabel); - tempLayout->addWidget(NGLabel); - vlayout2->addLayout(tempLayout); - } - { - QHBoxLayout* tempLayout = new QHBoxLayout(); - QLabel* tempLabel = new QLabel(u8"测量总 数 量:"); - tempLabel->setFont(font); - tempLabel->setPalette(palette); - - totalLabel = new QLabel("0"); - totalLabel->setFont(font); - totalLabel->setPalette(palette); - tempLayout->addWidget(tempLabel); - tempLayout->addWidget(totalLabel); - vlayout2->addLayout(tempLayout); - } - } - - QHBoxLayout* hLayout2 = new QHBoxLayout(); - layout->addLayout(hLayout2); - { - - QVBoxLayout* vlayout1 = new QVBoxLayout(); - QVBoxLayout* vlayout2 = new QVBoxLayout(); - hLayout2->addLayout(vlayout1); - hLayout2->addLayout(vlayout2); - - DashboardWidget* dashBoard = new DashboardWidget(); - vlayout1->addWidget(dashBoard); - vlayout2->setContentsMargins(0, 0, 0, 0); - { - QHBoxLayout* tempLayout = new QHBoxLayout(); - QLabel* tempLabel = new QLabel(u8"外观OK数量:"); - tempLabel->setFont(font); - tempLabel->setPalette(palette); - - OKLabel2 = new QLabel("0"); - OKLabel2->setFont(font); - OKLabel2->setPalette(palette); - tempLayout->addWidget(tempLabel); - tempLayout->addWidget(OKLabel2); - vlayout2->addLayout(tempLayout); - } - { - QHBoxLayout* tempLayout = new QHBoxLayout(); - QLabel* tempLabel = new QLabel(u8"外观NG数量:"); - tempLabel->setFont(font); - tempLabel->setPalette(palette); - - NGLabel2 = new QLabel("0"); - NGLabel2->setFont(font); - NGLabel2->setPalette(palette); - tempLayout->addWidget(tempLabel); - tempLayout->addWidget(NGLabel2); - vlayout2->addLayout(tempLayout); - } - { - QHBoxLayout* tempLayout = new QHBoxLayout(); - QLabel* tempLabel = new QLabel(u8"外观总 数 量:"); - tempLabel->setFont(font); - tempLabel->setPalette(palette); - - totalLabel2 = new QLabel("0"); - totalLabel2->setFont(font); - totalLabel2->setPalette(palette); - tempLayout->addWidget(tempLabel); - tempLayout->addWidget(totalLabel2); - vlayout2->addLayout(tempLayout); - } - } FrequencyBar* progressBar=new FrequencyBar("totalCT"); progressBar->setProgress(0.5); layout->addWidget(progressBar); diff --git a/lib/Hd_3DCameraLMI_module_PointLazer.exp b/lib/Hd_3DCameraLMI_module_PointLazer.exp index 6a8fa414..88c61749 100644 Binary files a/lib/Hd_3DCameraLMI_module_PointLazer.exp and b/lib/Hd_3DCameraLMI_module_PointLazer.exp differ diff --git a/lib/Hd_DalsaCamera_module.exp b/lib/Hd_DalsaCamera_module.exp index da2ea450..db9cc928 100644 Binary files a/lib/Hd_DalsaCamera_module.exp and b/lib/Hd_DalsaCamera_module.exp differ diff --git a/lib/Hd_FinsTcp_module.exp b/lib/Hd_FinsTcp_module.exp index 26d6e581..a1b15cae 100644 Binary files a/lib/Hd_FinsTcp_module.exp and b/lib/Hd_FinsTcp_module.exp differ diff --git a/lib/Hd_MvCamera_module_GENTL.exp b/lib/Hd_MvCamera_module_GENTL.exp index 6429d839..607e07c8 100644 Binary files a/lib/Hd_MvCamera_module_GENTL.exp and b/lib/Hd_MvCamera_module_GENTL.exp differ diff --git a/lib/Hd_MvCamera_module_GIGE.exp b/lib/Hd_MvCamera_module_GIGE.exp index 08f548f7..5c609989 100644 Binary files a/lib/Hd_MvCamera_module_GIGE.exp and b/lib/Hd_MvCamera_module_GIGE.exp differ diff --git a/lib/Hd_ResultsSummary_module.exp b/lib/Hd_ResultsSummary_module.exp index e310258b..0f57bb66 100644 Binary files a/lib/Hd_ResultsSummary_module.exp and b/lib/Hd_ResultsSummary_module.exp differ diff --git a/lib/Hd_SocketModule_ModbusTcp.exp b/lib/Hd_SocketModule_ModbusTcp.exp index 49ff857d..4e86b6bb 100644 Binary files a/lib/Hd_SocketModule_ModbusTcp.exp and b/lib/Hd_SocketModule_ModbusTcp.exp differ