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

@@ -48,7 +48,7 @@ DualInlinePackageWidget::DualInlinePackageWidget(
assert(insightWindow != nullptr);
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 <= (targetVariant.pinDescriptorsByNumber.size() / 2)) {
@@ -56,8 +56,6 @@ DualInlinePackageWidget::DualInlinePackageWidget(
} else {
this->topPinLayout->addWidget(pinWidget, 0, Qt::AlignmentFlag::AlignRight);
}
connect(pinWidget, &TargetPinWidget::toggleIoState, insightWindow, &InsightWindow::togglePinIoState);
}
this->layout->addLayout(this->topPinLayout);