|
@@ -46,9 +46,9 @@ void SingleCameraOperationWnd::initFrom() {
|
|
|
Group* widget = manager->getGroup();
|
|
|
//connect(widget,&Group::send_button_Signal,this,&SingleCameraOperationWnd::showAndHideButton);
|
|
|
//connect(widget,&Group::send_ComboBox_singal,this,&SingleCameraOperationWnd::handleComBoxChange);
|
|
|
- if (widget != nullptr) {
|
|
|
- connect(widget, &Group::sendUpdateGroupState,
|
|
|
- this, &SingleCameraOperationWnd::checkSettings);
|
|
|
+ if (widget != nullptr)
|
|
|
+ {
|
|
|
+ CameraConnectUpdateImageFun(i, widget);
|
|
|
layout->addWidget(widget);
|
|
|
widgets.append(widget);
|
|
|
groupMap[num] = widget;
|
|
@@ -142,50 +142,94 @@ void SingleCameraOperationWnd::loadGroupSettings(int Id, int Index) {
|
|
|
|
|
|
}
|
|
|
|
|
|
-void SingleCameraOperationWnd::updateMaterialWidget( int materialWndType, int groupId){
|
|
|
-
|
|
|
- switch (materialWndType) {
|
|
|
+void SingleCameraOperationWnd::updateMaterialWidget( int materialWndType, int groupId)
|
|
|
+{
|
|
|
+ switch (materialWndType)
|
|
|
+ {
|
|
|
case 1: ui->viewwidgetgroup->setWafer(waferMap.value(lastGroupId)); break;
|
|
|
case 2: ui->viewwidgetgroup->setWaffle(waffleMap.value(lastGroupId)); break;
|
|
|
case 3: ui->viewwidgetgroup->setMaterialBox(materialBoxMap.value(lastGroupId)); break;
|
|
|
- }
|
|
|
-
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
+void SingleCameraOperationWnd::InitMainCameraBind(CameraBind* pCameraBind)
|
|
|
+{
|
|
|
|
|
|
+}
|
|
|
|
|
|
+void SingleCameraOperationWnd::UnCameraBind()
|
|
|
+{
|
|
|
|
|
|
+}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-void SingleCameraOperationWnd::InitMainCameraBind(CameraBind* pCameraBind)
|
|
|
+void SingleCameraOperationWnd::CameraConnectUpdateImageFun(int nIndex, Group* widget, bool isUnCameraBind /*= false*/)
|
|
|
{
|
|
|
+ auto BinCamerasImage = [&](void (SingleCameraOperationWnd::* pCamerasImage)(const QPixmap& imageData))
|
|
|
+ {
|
|
|
+ if (isUnCameraBind)
|
|
|
+ {
|
|
|
+ //disconnect(widget, &Group::SetCurrentSelectSig, this, &ChartsAndCamerasWnd::GetCurrentSelectSlots);
|
|
|
+ disconnect(this, pCamerasImage, widget, &Group::UpDataImageShowSlots);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ //共用函数
|
|
|
+ connect(widget, &Group::sendUpdateGroupState, this, &SingleCameraOperationWnd::checkSettings);
|
|
|
+ connect(this, pCamerasImage, widget, &Group::UpDataImageShowSlots);
|
|
|
+ }
|
|
|
+
|
|
|
+ };
|
|
|
|
|
|
+ if (nIndex == 0)
|
|
|
+ {
|
|
|
+ BinCamerasImage(&SingleCameraOperationWnd::UpDataImageShowSignals0);
|
|
|
+ }
|
|
|
+ else if (nIndex == 1)
|
|
|
+ {
|
|
|
+ BinCamerasImage(&SingleCameraOperationWnd::UpDataImageShowSignals1);
|
|
|
+ }
|
|
|
+ else if (nIndex == 2)
|
|
|
+ {
|
|
|
+ BinCamerasImage(&SingleCameraOperationWnd::UpDataImageShowSignals2);
|
|
|
+ }
|
|
|
+ else if (nIndex == 3)
|
|
|
+ {
|
|
|
+ BinCamerasImage(&SingleCameraOperationWnd::UpDataImageShowSignals3);
|
|
|
+ }
|
|
|
+ else if (nIndex == 4)
|
|
|
+ {
|
|
|
+ BinCamerasImage(&SingleCameraOperationWnd::UpDataImageShowSignals4);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
void SingleCameraOperationWnd::UpdateCameraDisplay0(int iCameraId, JVision::ImageInfo imageData)
|
|
|
{
|
|
|
-
|
|
|
+ QImage image(imageData.data, imageData.width, imageData.height, QImage::Format_Indexed8);
|
|
|
+ emit UpDataImageShowSignals0(QPixmap::fromImage(image));
|
|
|
}
|
|
|
|
|
|
void SingleCameraOperationWnd::UpdateCameraDisplay1(int iCameraId, JVision::ImageInfo imageData)
|
|
|
{
|
|
|
-
|
|
|
+ QImage image(imageData.data, imageData.width, imageData.height, QImage::Format_Indexed8);
|
|
|
+ emit UpDataImageShowSignals1(QPixmap::fromImage(image));
|
|
|
}
|
|
|
|
|
|
void SingleCameraOperationWnd::UpdateCameraDisplay2(int iCameraId, JVision::ImageInfo imageData)
|
|
|
{
|
|
|
-
|
|
|
+ QImage image(imageData.data, imageData.width, imageData.height, QImage::Format_Indexed8);
|
|
|
+ emit UpDataImageShowSignals2(QPixmap::fromImage(image));
|
|
|
}
|
|
|
|
|
|
void SingleCameraOperationWnd::UpdateCameraDisplay3(int iCameraId, JVision::ImageInfo imageData)
|
|
|
{
|
|
|
-
|
|
|
+ QImage image(imageData.data, imageData.width, imageData.height, QImage::Format_Indexed8);
|
|
|
+ emit UpDataImageShowSignals3(QPixmap::fromImage(image));
|
|
|
}
|
|
|
|
|
|
void SingleCameraOperationWnd::UpdateCameraDisplay4(int iCameraId, JVision::ImageInfo imageData)
|
|
|
{
|
|
|
-
|
|
|
+ QImage image(imageData.data, imageData.width, imageData.height, QImage::Format_Indexed8);
|
|
|
+ emit UpDataImageShowSignals4(QPixmap::fromImage(image));
|
|
|
}
|
|
|
|
|
|
void SingleCameraOperationWnd::wheelEvent(QWheelEvent *event)
|