Add wiring
This commit is contained in:
parent
20c13c1cdf
commit
a74dfd5f5f
20 changed files with 553 additions and 14 deletions
|
@ -5,7 +5,7 @@
|
|||
#include "LatexMathExpression.h"
|
||||
|
||||
QuantumTerminalNode::QuantumTerminalNode(const Transform& transform)
|
||||
: AbstractVisualNode(transform)
|
||||
: QuantumCircuitElementNode(transform)
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ void QuantumTerminalNode::update(SceneInfo* sceneInfo)
|
|||
|
||||
void QuantumTerminalNode::createOrUpdateGeometry(SceneInfo* sceneInfo)
|
||||
{
|
||||
if (!mLabel)
|
||||
if (!mLabel && mContent->getTerminalType() != QuantumTerminal::TerminalType::OUTPUT)
|
||||
{
|
||||
const auto value = mContent->getValue();
|
||||
std::string label;
|
||||
|
@ -50,4 +50,11 @@ void QuantumTerminalNode::createOrUpdateGeometry(SceneInfo* sceneInfo)
|
|||
|
||||
addChild(mLabel.get());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Point QuantumTerminalNode::getConnectionLocation(AbstractQuantumWire*) const
|
||||
{
|
||||
auto left = mTransform.getLocation();
|
||||
left.move(mWidth, mHeight/2.0);
|
||||
return left;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue