部分备份
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
#include <appCoreQtFunction.h>
|
||||
#include <qtimer.h>
|
||||
|
||||
#define enableHandleAiModel 1
|
||||
#define enableHandleAiModel 0
|
||||
#define disableBackEndCheck 1
|
||||
#define disableeAlgo 0
|
||||
#define enableHideConsle 1
|
||||
|
||||
@@ -46,8 +46,7 @@ public:
|
||||
leftItemInit();
|
||||
rightItemInit1();
|
||||
rightItemInit2();
|
||||
QObject::connect(historyImgs, &historyShowListWidget::itemClickSignal, this, &displayWidget::historyClick);
|
||||
|
||||
connectFunc();
|
||||
//historyImgs->addData(true, "D:/CCD/yuantu/2024-06-04/23H/TEST/1 (1).bmp", QPixmap("D:/CCD/yuantu/2024-06-04/23H/TEST/1 (1).bmp"));
|
||||
}
|
||||
void rightItemInit1()
|
||||
@@ -91,6 +90,18 @@ public:
|
||||
//leftWidget->setMaximumWidth(width / 1.2);
|
||||
//rightWidget->setMaximumWidth(width / 2);
|
||||
}
|
||||
void connectFunc()
|
||||
{
|
||||
QObject::connect(historyImgs, &historyShowListWidget::itemClickSignal,
|
||||
this, &displayWidget::historyClick);
|
||||
connect(_switchProductWidget, &switchProductWidget::switchProductSignal,
|
||||
_uiModuleLocationMap, [=](int index)
|
||||
{
|
||||
_uiModuleLocationMap->refreshToCurrentProduct();
|
||||
/*_uiModuleLocationMap->loadSignRects(_core._appConfig.productDatas[index].productSign);
|
||||
_uiModuleLocationMap->setImg(QPixmap(QString::fromStdString(_core._appConfig.productDatas[index].imgPosPath)));*/
|
||||
});
|
||||
}
|
||||
public slots:
|
||||
void recvMainWindowStdLogMsg(QString msg)
|
||||
{
|
||||
|
||||
@@ -83,10 +83,6 @@ public:
|
||||
setEnabled(false);
|
||||
scene = new QGraphicsScene();
|
||||
this->setScene(scene);
|
||||
imgLabel = new QLabel();
|
||||
scene->clear();
|
||||
scene->addWidget(imgLabel);
|
||||
imgLabel->setMaximumSize(9999, 9999);
|
||||
this->setObjectName("SonGraphicsView");
|
||||
this->setStyleSheet("QGraphicsView#SonGraphicsView {"
|
||||
"background: transparent;"
|
||||
@@ -95,10 +91,7 @@ public:
|
||||
"background-position: center center;"
|
||||
"}");
|
||||
mutex.unlock();
|
||||
QPixmap pixmap("./imgPosTip/asr1006.png");
|
||||
setImg(pixmap);
|
||||
auto cData = _core._appConfig._switchProductWidgetDataPtr.getCurrentProductData();
|
||||
loadSignRects(cData.productSign);
|
||||
refreshToCurrentProduct();
|
||||
resetToDefault();
|
||||
}
|
||||
void setImg(QPixmap pixmap)
|
||||
@@ -111,8 +104,16 @@ public:
|
||||
scene->clear();
|
||||
setEnabled(false);
|
||||
}
|
||||
void refreshToCurrentProduct()
|
||||
{
|
||||
auto cData = _core._appConfig._switchProductWidgetDataPtr.getCurrentProductData();
|
||||
QPixmap pixmap(QString::fromStdString(cData.imgPosPath));
|
||||
setImg(pixmap);
|
||||
loadSignRects(cData.productSign);
|
||||
}
|
||||
void loadSignRects(std::unordered_map<int, productSignStruct>&rects)
|
||||
{
|
||||
flashItems.clear();
|
||||
for (auto& data : rects)
|
||||
{
|
||||
FlashingRectItem* _FlashingRectItem = new FlashingRectItem(0,0, data.second.posRect.width, data.second.posRect.height);
|
||||
@@ -222,8 +223,12 @@ private:
|
||||
void showImg(QPixmap img)
|
||||
{
|
||||
mutex.lock();
|
||||
scene->clear();
|
||||
setEnabled(true);
|
||||
setMouseTracking(true);
|
||||
imgLabel = new QLabel();
|
||||
imgLabel->setMaximumSize(9999, 9999);
|
||||
scene->addWidget(imgLabel);
|
||||
QRect rect = img.rect();
|
||||
imageWidth = rect.width();
|
||||
imageHeight = rect.height();
|
||||
|
||||
@@ -85,7 +85,14 @@ public:
|
||||
});
|
||||
connect(switchBtn, &QPushButton::clicked, this, &switchProductWidget::startSwitch);
|
||||
connect(productSelect, &QComboBox::currentTextChanged, this, &switchProductWidget::currentProductSwitch);
|
||||
connect(productNameTypeSwitch, &QComboBox::currentTextChanged, this, [=]() {productSelectFresh(productNameTypeSwitch->currentIndex()); });
|
||||
connect(productSelect, &QComboBox::currentTextChanged, this, [=]()
|
||||
{
|
||||
emit switchProductSignal(productSelect->currentIndex());
|
||||
});
|
||||
connect(productNameTypeSwitch, &QComboBox::currentTextChanged, this, [=]()
|
||||
{
|
||||
productSelectFresh(productNameTypeSwitch->currentIndex());
|
||||
});
|
||||
}
|
||||
void productSelectFresh(int index)
|
||||
{
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user