Skip to content

Commit

Permalink
Remove remains of XSPICE CM builder
Browse files Browse the repository at this point in the history
  • Loading branch information
ra3xdh committed Jan 19, 2025
1 parent fcdcaea commit 2261b6c
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 129 deletions.
28 changes: 0 additions & 28 deletions qucs/components/libcomp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -385,34 +385,6 @@ QString LibComp::cdl_netlist()
return spice_netlist(spicecompat::CDL);
}

QStringList LibComp::getAttachedIFS()
{
QString content;
QStringList includes,attach,ifs_lst;
ifs_lst.clear();

int r = loadSection("Spice",content,&includes,&attach);
if (r<0) return ifs_lst;
for (const QString& file : attach) {
if (file.endsWith(".ifs")) ifs_lst.append(getSubcircuitFile()+'/'+file);
}
return ifs_lst;
}

QStringList LibComp::getAttachedMOD()
{
QString content;
QStringList includes,attach,mod_lst;
mod_lst.clear();

int r = loadSection("Spice",content,&includes,&attach);
if (r<0) return mod_lst;
for (const QString& file : attach) {
if (file.endsWith(".mod")) mod_lst.append(getSubcircuitFile()+'/'+file);
}
return mod_lst;
}

QString LibComp::getSpiceLibrary()
{
QStringList files;
Expand Down
2 changes: 0 additions & 2 deletions qucs/components/libcomp.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ class LibComp : public MultiViewComponent {

bool createSubNetlist(QTextStream *, QStringList&, int type=1);
QString getSubcircuitFile();
QStringList getAttachedMOD(); // LibComp can reference cfunc.mod and ifspec.ifs
QStringList getAttachedIFS(); // These should be compiled before SPICE simulation
QString getSpiceLibrary();

protected:
Expand Down
11 changes: 0 additions & 11 deletions qucs/mouseactions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -918,17 +918,6 @@ void MouseActions::rightPressMenu(Schematic *Doc, QMouseEvent *Event, float fX,
SLOT(slotSaveDiagramToGraphicsFile()));
ComponentMenu->addAction(actExport);
}
/*if (focusElement->Type & isComponent) {
Component *pc = (Component *)focusElement;
if (pc->Model == "EDD") {
QAction *actEDDtoIFS = new QAction(QObject::tr("Create XSPICE IFS"), QucsMain);
QObject::connect(actEDDtoIFS,SIGNAL(triggered(bool)),QucsMain,SLOT(slotEDDtoIFS()));
ComponentMenu->addAction(actEDDtoIFS);
QAction *actEDDtoMOD = new QAction(QObject::tr("Create XSPICE MOD"), QucsMain);
QObject::connect(actEDDtoMOD,SIGNAL(triggered(bool)),QucsMain,SLOT(slotEDDtoMOD()));
ComponentMenu->addAction(actEDDtoMOD);
}
}*/
}
break;
}
Expand Down
88 changes: 0 additions & 88 deletions qucs/qucs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3645,94 +3645,6 @@ void QucsApp::slotBuildVAModule()

}


/*void QucsApp::slotBuildXSPICEIfs(int mode)
{
if (!isTextDocument(DocumentTab->currentWidget())) {
Schematic *Sch = (Schematic*)DocumentTab->currentWidget();
QFileInfo inf(Sch->getDocName());
QString msg,ext;
switch(mode) {
case spicecompat::cmgenSUBifs:
case spicecompat::cmgenEDDifs: msg = inf.path()+QDir::separator()+inf.baseName()+".ifs";
ext = "XSPICE IFS (*.ifs)";
break;
case spicecompat::cmgenSUBmod:
case spicecompat::cmgenEDDmod: msg = inf.path()+QDir::separator()+inf.baseName()+".mod";
ext = "XSPICE MOD (*.mod)";
break;
default: break;
}
QString filename = QFileDialog::getSaveFileName(this,tr("Save XSPICE source"),msg,ext);
if (filename.isEmpty()) return;
QFile f(filename);
if (f.open(QIODevice::WriteOnly)) {
QTextStream stream(&f);
CodeModelGen *cmgen = new CodeModelGen;
bool r = false;
switch(mode) {
case spicecompat::cmgenSUBifs: r = cmgen->createIFS(stream,Sch);
case spicecompat::cmgenEDDifs: {
for(Component *pc = Sch->a_DocComps.first(); pc != 0; pc = Sch->a_DocComps.next()) {
if (pc->isSelected) {
r = cmgen->createIFSfromEDD(stream,Sch,pc);
break;
}
}
}
break;
case spicecompat::cmgenEDDmod : {
for(Component *pc = Sch->a_DocComps.first(); pc != 0; pc = Sch->a_DocComps.next()) {
if (pc->isSelected) {
r = cmgen->createMODfromEDD(stream,Sch,pc);
break;
}
}
}
break;
default: r = false;
break;
}
QString errs;
if (!r) errs = tr("Create XSPICE CodeModel"
"Create CodeModel source file failed!"
"Schematic is not subciruit!");
messageDock->reset();
messageDock->msgDock->setWindowTitle(tr("Debug messages dock"));
messageDock->builderTabs->setTabIcon(0,QPixmap());
messageDock->builderTabs->setTabText(0,tr("XSPICE"));
messageDock->builderTabs->setTabIcon(1,QPixmap());
messageDock->admsOutput->
insertPlainText(QStringLiteral("Creating XSPICE source file: %1\n").arg(filename));
errs += cmgen->getLog();
if (errs.isEmpty()) {
messageDock->admsOutput->insertPlainText(tr("Success!\n"));
} else {
messageDock->admsOutput->insertPlainText(errs);
}
messageDock->msgDock->show();
delete cmgen;
f.close();
}
}
}
void QucsApp::slotEDDtoIFS()
{
slotBuildXSPICEIfs(spicecompat::cmgenEDDifs);
}
void QucsApp::slotEDDtoMOD()
{
slotBuildXSPICEIfs(spicecompat::cmgenEDDmod);
}*/

void QucsApp::slotShowModel()
{
DisplayDialog *dlg = new DisplayDialog(this,Symbol->ModelString,
Expand Down

0 comments on commit 2261b6c

Please sign in to comment.