Beispiel #1
0
bool Dip::changePinLabels(bool singleRow, bool sip) {
	if (m_viewID != ViewLayer::SchematicView) return true;

	bool hasLocal = false;
	QStringList labels = getPinLabels(hasLocal);
	if (labels.count() == 0) return true;


	QString svg;
	if (singleRow) {
		svg = MysteryPart::makeSchematicSvg(labels, sip);
	}
	else {
		svg = Dip::makeSchematicSvg(labels);
	}

    QString chipLabel = modelPart()->localProp("chip label").toString();
    if (!chipLabel.isEmpty()) {
        svg =TextUtils::replaceTextElement(svg, "label", chipLabel);
    }

    QTransform  transform = untransform();

	resetLayerKin(svg);
    resetConnectors();

    retransform(transform);

	return true;
}
Beispiel #2
0
QString Dip::retrieveSchematicSvg(QString & svg) {
	bool hasLocal = false;
	QStringList labels = getPinLabels(hasLocal);
		
	if (hasLocal) {
		if (this->isDIP()) {
			svg = makeSchematicSvg(labels);
		}
		else {
			svg = MysteryPart::makeSchematicSvg(labels, true);
		}
	}

	return TextUtils::replaceTextElement(svg, "label", m_chipLabel);
}
Beispiel #3
0
bool Dip::changePinLabels(bool singleRow, bool sip) {
	if (m_viewIdentifier != ViewIdentifierClass::SchematicView) return true;

	bool hasLocal = false;
	QStringList labels = getPinLabels(hasLocal);
	if (labels.count() == 0) return true;

	QString svg;

	if (singleRow) {
		svg = MysteryPart::makeSchematicSvg(labels, sip);
	}
	else {
		svg = Dip::makeSchematicSvg(labels);
	}

	loadExtraRenderer(svg);

	return true;
}