aboutsummaryrefslogtreecommitdiffstats
path: root/gui/designwidget.cc
diff options
context:
space:
mode:
authorSergiusz Bazanski <q3k@q3k.org>2018-07-14 11:46:32 +0100
committerSergiusz Bazanski <q3k@q3k.org>2018-07-14 11:46:32 +0100
commit3352ff4abbcac563e08d78ed8aa77728d00284a8 (patch)
treeb8746b46f4d5f0e28ed86d0963647f6664a93d90 /gui/designwidget.cc
parentf333a68753655a4ccf7da9a4da96e7fdd19f9d08 (diff)
downloadnextpnr-3352ff4abbcac563e08d78ed8aa77728d00284a8.tar.gz
nextpnr-3352ff4abbcac563e08d78ed8aa77728d00284a8.tar.bz2
nextpnr-3352ff4abbcac563e08d78ed8aa77728d00284a8.zip
Move read methods to ReadMethods, remove some legacy access to Arch
Diffstat (limited to 'gui/designwidget.cc')
-rw-r--r--gui/designwidget.cc26
1 files changed, 14 insertions, 12 deletions
diff --git a/gui/designwidget.cc b/gui/designwidget.cc
index 110cf1b7..e839f006 100644
--- a/gui/designwidget.cc
+++ b/gui/designwidget.cc
@@ -335,10 +335,12 @@ void DesignWidget::onItemClicked(QTreeWidgetItem *clickItem, int pos)
return;
}
+ auto &&proxy = ctx->rproxy();
+
clearProperties();
if (type == ElementType::BEL) {
IdString c = static_cast<IdStringTreeItem *>(clickItem)->getData();
- BelId bel = ctx->getBelByName(c);
+ BelId bel = proxy.getBelByName(c);
QtProperty *topItem = groupManager->addProperty("Bel");
addProperty(topItem, "Bel");
@@ -352,20 +354,20 @@ void DesignWidget::onItemClicked(QTreeWidgetItem *clickItem, int pos)
topItem->addSubProperty(typeItem);
QtVariantProperty *availItem = readOnlyManager->addProperty(QVariant::Bool, "Available");
- availItem->setValue(ctx->checkBelAvail(bel));
+ availItem->setValue(proxy.checkBelAvail(bel));
topItem->addSubProperty(availItem);
QtVariantProperty *cellItem = readOnlyManager->addProperty(QVariant::String, "Bound Cell");
- cellItem->setValue(ctx->getBoundBelCell(bel).c_str(ctx));
+ cellItem->setValue(proxy.getBoundBelCell(bel).c_str(ctx));
topItem->addSubProperty(cellItem);
QtVariantProperty *conflictItem = readOnlyManager->addProperty(QVariant::String, "Conflicting Cell");
- conflictItem->setValue(ctx->getConflictingBelCell(bel).c_str(ctx));
+ conflictItem->setValue(proxy.getConflictingBelCell(bel).c_str(ctx));
topItem->addSubProperty(conflictItem);
} else if (type == ElementType::WIRE) {
IdString c = static_cast<IdStringTreeItem *>(clickItem)->getData();
- WireId wire = ctx->getWireByName(c);
+ WireId wire = proxy.getWireByName(c);
QtProperty *topItem = groupManager->addProperty("Wire");
addProperty(topItem, "Wire");
@@ -375,15 +377,15 @@ void DesignWidget::onItemClicked(QTreeWidgetItem *clickItem, int pos)
topItem->addSubProperty(nameItem);
QtVariantProperty *availItem = readOnlyManager->addProperty(QVariant::Bool, "Available");
- availItem->setValue(ctx->checkWireAvail(wire));
+ availItem->setValue(proxy.checkWireAvail(wire));
topItem->addSubProperty(availItem);
QtVariantProperty *cellItem = readOnlyManager->addProperty(QVariant::String, "Bound Net");
- cellItem->setValue(ctx->getBoundWireNet(wire).c_str(ctx));
+ cellItem->setValue(proxy.getBoundWireNet(wire).c_str(ctx));
topItem->addSubProperty(cellItem);
QtVariantProperty *conflictItem = readOnlyManager->addProperty(QVariant::String, "Conflicting Net");
- conflictItem->setValue(ctx->getConflictingWireNet(wire).c_str(ctx));
+ conflictItem->setValue(proxy.getConflictingWireNet(wire).c_str(ctx));
topItem->addSubProperty(conflictItem);
BelPin uphill = ctx->getBelPinUphill(wire);
@@ -439,7 +441,7 @@ void DesignWidget::onItemClicked(QTreeWidgetItem *clickItem, int pos)
} else if (type == ElementType::PIP) {
IdString c = static_cast<IdStringTreeItem *>(clickItem)->getData();
- PipId pip = ctx->getPipByName(c);
+ PipId pip = proxy.getPipByName(c);
QtProperty *topItem = groupManager->addProperty("Pip");
addProperty(topItem, "Pip");
@@ -449,15 +451,15 @@ void DesignWidget::onItemClicked(QTreeWidgetItem *clickItem, int pos)
topItem->addSubProperty(nameItem);
QtVariantProperty *availItem = readOnlyManager->addProperty(QVariant::Bool, "Available");
- availItem->setValue(ctx->checkPipAvail(pip));
+ availItem->setValue(proxy.checkPipAvail(pip));
topItem->addSubProperty(availItem);
QtVariantProperty *cellItem = readOnlyManager->addProperty(QVariant::String, "Bound Net");
- cellItem->setValue(ctx->getBoundPipNet(pip).c_str(ctx));
+ cellItem->setValue(proxy.getBoundPipNet(pip).c_str(ctx));
topItem->addSubProperty(cellItem);
QtVariantProperty *conflictItem = readOnlyManager->addProperty(QVariant::String, "Conflicting Net");
- conflictItem->setValue(ctx->getConflictingPipNet(pip).c_str(ctx));
+ conflictItem->setValue(proxy.getConflictingPipNet(pip).c_str(ctx));
topItem->addSubProperty(conflictItem);
QtVariantProperty *srcWireItem = readOnlyManager->addProperty(QVariant::String, "Src Wire");