Removed tight coupling of target pin widgets with Insight window - moved target pin state toggling into an InsightWorker task.

This commit is contained in:
Nav
2021-09-04 18:03:45 +01:00
parent 1bc881e9ae
commit 85ef2c57e1
15 changed files with 114 additions and 85 deletions

View File

@@ -61,7 +61,7 @@ QuadFlatPackageWidget::QuadFlatPackageWidget(
auto pinCountPerLayout = (targetVariant.pinDescriptorsByNumber.size() / 4);
for (const auto& [targetPinNumber, targetPinDescriptor]: targetVariant.pinDescriptorsByNumber) {
auto pinWidget = new PinWidget(this, targetPinDescriptor, targetVariant);
auto pinWidget = new PinWidget(targetPinDescriptor, targetVariant, insightWorker, this);
this->pinWidgets.push_back(pinWidget);
if (targetPinNumber <= pinCountPerLayout) {
@@ -76,8 +76,6 @@ QuadFlatPackageWidget::QuadFlatPackageWidget(
} else if (targetPinNumber > (pinCountPerLayout * 3) && targetPinNumber <= (pinCountPerLayout * 4)) {
this->topPinLayout->addWidget(pinWidget, 0, Qt::AlignmentFlag::AlignBottom);
}
connect(pinWidget, &TargetPinWidget::toggleIoState, insightWindow, &InsightWindow::togglePinIoState);
}
this->bodyWidget = new BodyWidget(this);