Simulator command initializatio moved form AbstractSpiceKernel

This commit is contained in:
Vadim Kuznetzov 2015-01-17 12:55:26 +03:00
parent 7a05b7812d
commit e24677b11a
4 changed files with 8 additions and 23 deletions

View File

@ -26,8 +26,7 @@
AbstractSpiceKernel::AbstractSpiceKernel(Schematic *sch_,
Simulator kern, QObject *parent) :
AbstractSpiceKernel::AbstractSpiceKernel(Schematic *sch_, QObject *parent) :
QObject(parent)
{
Sch = sch_;
@ -39,20 +38,6 @@ AbstractSpiceKernel::AbstractSpiceKernel(Schematic *sch_,
dir.mkpath(workdir);
}
switch (kern) {
case AbstractSpiceKernel::Ngspice : {
simulator_cmd = "ngspice";
simulator_parameters = "";
}
break;
case AbstractSpiceKernel::Xyce : {
simulator_cmd = "/usr/local/Xyce-Release-6.2.0-OPENSOURCE/bin/runxyce";
simulator_parameters = "-a";
}
break;
default: break;
}
SimProcess = new QProcess(this);
SimProcess->setProcessChannelMode(QProcess::MergedChannels);
connect(SimProcess,SIGNAL(finished(int)),this,SLOT(slotFinished()));

View File

@ -45,10 +45,7 @@ protected:
public:
enum Simulator {Ngspice, Xyce, NoSimulator};
explicit AbstractSpiceKernel(Schematic *sch_, Simulator kern,
QObject *parent = 0);
explicit AbstractSpiceKernel(Schematic *sch_, QObject *parent = 0);
~AbstractSpiceKernel();
void parseNgSpiceSimOutput(QString ngspice_file,

View File

@ -19,9 +19,10 @@
#include "ngspice.h"
Ngspice::Ngspice(Schematic *sch_, QObject *parent) :
AbstractSpiceKernel(sch_, AbstractSpiceKernel::Ngspice, parent)
AbstractSpiceKernel(sch_, parent)
{
simulator_cmd = "ngspice";
simulator_parameters = "";
}
// Reads ngspice simulation results and merges it in single Qucs dataset

View File

@ -1,8 +1,10 @@
#include "xyce.h"
Xyce::Xyce(Schematic *sch_, QObject *parent) :
AbstractSpiceKernel(sch_, AbstractSpiceKernel::Xyce, parent)
AbstractSpiceKernel(sch_, parent)
{
simulator_cmd = "/usr/local/Xyce-Release-6.2.0-OPENSOURCE/bin/runxyce";
simulator_parameters = "-a";
}
void Xyce::determineUsedSimulations()