EdgeCoupledEmbeddedMicrostrip2B1AWindow::EdgeCoupledEmbeddedMicrostrip2B1AWindow(MainWindow *w, QWidget *parent) : TlineWindow(w, parent, TlineWindow::Differential) { setDiagram(":/images/edge_coupled_embedded_microstrip_2B1A.png"); params["H1"] = new Parameter(QString(tr("Substrate 1 Height")), QString("H1"), parametersLayout); params["Er1"] = new Parameter(QString(tr("Substrate 1 Dielectric Const.")), QString("Er1"), parametersLayout); params["H2"] = new Parameter(QString(tr("Substrate 2 Height")), QString("H2"), parametersLayout); params["Er2"] = new Parameter(QString(tr("Substrate 2 Dielectric Const.")), QString("Er2"), parametersLayout); params["H3"] = new Parameter(QString(tr("Substrate 3 Height")), QString("H3"), parametersLayout); params["Er3"] = new Parameter(QString(tr("Substrate 3 Dielectric Const.")), QString("Er3"), parametersLayout); params["W1"] = new Parameter(QString(tr("Lower Trace Width")), QString("W1"), parametersLayout); params["W2"] = new Parameter(QString(tr("Upper Trace Width")), QString("W2"), parametersLayout); params["S1"] = new Parameter(QString(tr("Trace Separation")), QString("S1"), parametersLayout); params["T1"] = new Parameter(QString(tr("Trace Thickness")), QString("T1"), parametersLayout); }
DiagramSceneModel *DiagramsManager::bindDiagramSceneModel(MDiagram *diagram) { if (!m_diagramUidToManagedDiagramMap.contains(diagram->uid())) { auto diagramSceneModel = new DiagramSceneModel(); diagramSceneModel->setDiagramController(m_diagramController); diagramSceneModel->setDiagramSceneController(m_diagramSceneController); diagramSceneModel->setStyleController(m_styleController); diagramSceneModel->setStereotypeController(m_stereotypeController); diagramSceneModel->setDiagram(diagram); connect(diagramSceneModel, &DiagramSceneModel::diagramSceneActivated, this, &DiagramsManager::diagramActivated); connect(diagramSceneModel, &DiagramSceneModel::selectionHasChanged, this, &DiagramsManager::diagramSelectionChanged); auto managedDiagram = new ManagedDiagram(diagramSceneModel, diagram->name()); m_diagramUidToManagedDiagramMap.insert(diagram->uid(), managedDiagram); } return diagramSceneModel(diagram); }