DFlipFlopView::DFlipFlopView(DFlipFlop * comp, eViewType viewType, const char * name) : CompView(comp, viewType, name) { // setPlace(QRect(0, 0, 7*gridX, 7*gridY)); enableRotation(true); if (viewType == SHEET_VIEW) { new ConnectorLabel(getDFF()->getOutputConnector(), QString::fromLatin1("Q")); new ConnectorLabel(getDFF()->getNotOutputConnector(), QString::fromLatin1("Q")); new ConnectorLabel(getDFF()->getSetInputConnector(), QString::fromLatin1("S")); new ConnectorLabel(getDFF()->getResetInputConnector(), QString::fromLatin1("R")); new ConnectorLabel(getDFF()->getEnableInputConnector(), QString::fromLatin1("E")); new ConnectorLabel(getDFF()->getDataInputConnector(), QString::fromLatin1("D")); m_layout = new ComponentLayoutSimple(this); Q_CHECK_PTR(m_layout); m_layout->getLeft()->addSpace(1); m_layout->getLeft()->addConnector(getDFF()->getSetInputConnector()); m_layout->getLeft()->addConnector(getDFF()->getDataInputConnector()); m_layout->getLeft()->addConnector(getDFF()->getEnableInputConnector()); m_layout->getLeft()->addConnector(getDFF()->getResetInputConnector()); m_layout->getRight()->addStretch(1); m_layout->getRight()->addSpace(1); m_layout->getRight()->addConnector(getDFF()->getOutputConnector()); m_layout->getRight()->addStretch(3); m_layout->getRight()->addConnector(getDFF()->getNotOutputConnector()); m_layout->getRight()->addStretch(1); // m_layout->setMinSize(5,6); } }
FloatLatchView::FloatLatchView(FloatLatch * comp, eViewType viewType) : CompView(comp, viewType) { if (viewType == SHEET_VIEW) { enableRotation(true); m_layout = new ComponentLayout(this); CHECK_PTR(m_layout); m_ctrlBlock = new ComponentControlBlock(this, m_layout); CHECK_PTR(m_ctrlBlock); m_ctrlBlock->getLeft()->addSpace(1); m_ctrlBlock->getLeft()->addConnector(getComponent()->getInputReset()); m_ctrlBlock->getLeft()->addConnector(getComponent()->getInputEnable()); m_layout->getLeft()->addSpace(1); m_layout->getLeft()->addConnectorPack(getComponent()->getInputPack()); m_layout->getRight()->addSpace(1); m_layout->getRight()->addConnectorPack(getComponent()->getOutputPack()); m_layout->setMinSize(6,5); m_layout->updateLayout(); new ConnectorLabel(getComponent()->getInputReset(), "R"); new ConnectorLabel(getComponent()->getInputEnable(), "E"); } }
Float2In1OutView::Float2In1OutView(Float2In1Out * comp, eViewType viewType, const QString & text, const char * name) : CompView(comp, viewType, name) { setPlace(QRect(0, 0, 5*gridX, 5*gridY)); enableRotation(true); if (viewType == SHEET_VIEW) { ComponentLayoutSimple * layout = new ComponentLayoutSimple(this); Q_CHECK_PTR(layout); layout->setMinSize(3, 5); layout->getLeft()->addSpace(1); layout->getLeft()->addConnector(comp->getInputA()); layout->getLeft()->addConnector(comp->getInputB()); layout->getRight()->addStretch(2); layout->getRight()->addConnector(comp->getOutputConnector()); layout->getRight()->addStretch(2); if (!text.isEmpty()) { new ComponentLayoutBlockContentText(layout->getBlock(), text); } } }
DataRecorderView::DataRecorderView(Component * comp, eViewType viewType, const char * name) : CompView(comp,viewType,name) { setPlace(QRect(0, 0, 6*gridX, 5*gridY)); enableRotation(true); enableConnectorSpacingTop(false); enableConnectorSpacingRight(false); enableConnectorSpacingBottom(false); // enableConnectorSpacingLeft(false); }
ConvertBoolFloatView::ConvertBoolFloatView(ConvertBoolFloat * comp, eViewType viewType, const char * name) : CompView(comp, viewType, name) { setPlace(QRect(0, 0, 5*gridX, 3*gridY)); enableConnectorSpacingTop(false); enableConnectorSpacingBottom(false); // enableConnectorSpacingLeft(false); // enableConnectorSpacingRight(false); enableRotation(true); getComponent()->getInput()->setGridPos(0,1); getComponent()->getOutput()->setGridPos(4,1); }
BooleanLedView::BooleanLedView(Component * comp, eViewType viewType, const char * name) : CompViewSize(comp, viewType, name) { if (viewType == SHEET_VIEW) { setPlace(QRect(0, 0, 4*gridX, 3*gridY)); enableRotation(true); setMinSize(4*gridX,3*gridY); enableConnectorSpacingTop(false); enableConnectorSpacingBottom(false); // enableConnectorSpacingLeft(false); enableConnectorSpacingRight(false); } else { setPlace(QRect(0, 0, 3*gridX, 3*gridY)); setMinSize(3*gridX,3*gridY); } }
// slot gets called by AnimationView::mouseButtonClicked() void qavimator::backgroundClicked() { emit enableRotation(false); }