wip - simulator for component

This commit is contained in:
Krasilnikov Sergey 2023-06-09 13:54:29 +03:00
parent 2f05522b13
commit 7c8afceeec
144 changed files with 293 additions and 72 deletions

View File

@ -9,10 +9,12 @@
*/ */
#include "MESFET.h" #include "MESFET.h"
#include "extsimkernels/spicecompat.h"
MESFET::MESFET() MESFET::MESFET()
{ {
Description = QObject::tr ("MESFET verilog device"); Description = QObject::tr ("MESFET verilog device");
Simulator = spicecompat::simQucsator;
Props.append (new Property ("LEVEL", "1", false, Props.append (new Property ("LEVEL", "1", false,
QObject::tr ("model selector"))); QObject::tr ("model selector")));

View File

@ -16,11 +16,13 @@
***************************************************************************/ ***************************************************************************/
#include "am_modulator.h" #include "am_modulator.h"
#include "extsimkernels/spicecompat.h"
AM_Modulator::AM_Modulator() AM_Modulator::AM_Modulator()
{ {
Description = QObject::tr("ac voltage source with amplitude modulator"); Description = QObject::tr("ac voltage source with amplitude modulator");
Simulator = spicecompat::simQucsator;
Arcs.append(new qucs::Arc(-12,-12, 24, 24, 0, 16*360,QPen(Qt::darkBlue,2))); Arcs.append(new qucs::Arc(-12,-12, 24, 24, 0, 16*360,QPen(Qt::darkBlue,2)));
Arcs.append(new qucs::Arc( -7, -4, 7, 7, 0, 16*180,QPen(Qt::darkBlue,2))); Arcs.append(new qucs::Arc( -7, -4, 7, 7, 0, 16*180,QPen(Qt::darkBlue,2)));

View File

@ -18,11 +18,13 @@
#include "ampere_noise.h" #include "ampere_noise.h"
#include "node.h" #include "node.h"
#include "extsimkernels/verilogawriter.h" #include "extsimkernels/verilogawriter.h"
#include "extsimkernels/spicecompat.h"
Ampere_noise::Ampere_noise() Ampere_noise::Ampere_noise()
{ {
Description = QObject::tr("noise current source"); Description = QObject::tr("noise current source");
Simulator = spicecompat::simQucsator;
Arcs.append(new qucs::Arc(-12,-12, 24, 24, 0, 16*360,QPen(Qt::darkBlue,2))); Arcs.append(new qucs::Arc(-12,-12, 24, 24, 0, 16*360,QPen(Qt::darkBlue,2)));
Lines.append(new qucs::Line(-30, 0,-12, 0,QPen(Qt::darkBlue,2))); Lines.append(new qucs::Line(-30, 0,-12, 0,QPen(Qt::darkBlue,2)));

View File

@ -16,11 +16,13 @@
***************************************************************************/ ***************************************************************************/
#include "amplifier.h" #include "amplifier.h"
#include "extsimkernels/spicecompat.h"
Amplifier::Amplifier() Amplifier::Amplifier()
{ {
Description = QObject::tr("ideal amplifier"); Description = QObject::tr("ideal amplifier");
Simulator = spicecompat::simQucsator;
Lines.append(new qucs::Line(-16,-20,-16, 20,QPen(Qt::darkBlue,2))); Lines.append(new qucs::Line(-16,-20,-16, 20,QPen(Qt::darkBlue,2)));
Lines.append(new qucs::Line(-16,-20, 16, 0,QPen(Qt::darkBlue,2))); Lines.append(new qucs::Line(-16,-20, 16, 0,QPen(Qt::darkBlue,2)));

View File

@ -16,11 +16,13 @@
***************************************************************************/ ***************************************************************************/
#include "attenuator.h" #include "attenuator.h"
#include "extsimkernels/spicecompat.h"
Attenuator::Attenuator() Attenuator::Attenuator()
{ {
Description = QObject::tr("attenuator"); Description = QObject::tr("attenuator");
Simulator = spicecompat::simQucsator;
Lines.append(new qucs::Line( -4, -6, -4, 6,QPen(Qt::darkBlue,2))); Lines.append(new qucs::Line( -4, -6, -4, 6,QPen(Qt::darkBlue,2)));
Lines.append(new qucs::Line( -4, -6, 4, -6,QPen(Qt::darkBlue,2))); Lines.append(new qucs::Line( -4, -6, 4, -6,QPen(Qt::darkBlue,2)));

View File

@ -16,11 +16,13 @@
***************************************************************************/ ***************************************************************************/
#include "biast.h" #include "biast.h"
#include "extsimkernels/spicecompat.h"
BiasT::BiasT() BiasT::BiasT()
{ {
Description = QObject::tr("bias t"); Description = QObject::tr("bias t");
Simulator = spicecompat::simQucsator;
Arcs.append(new qucs::Arc( -3, 2, 6, 6, 16*270, 16*180,QPen(Qt::darkBlue,1))); Arcs.append(new qucs::Arc( -3, 2, 6, 6, 16*270, 16*180,QPen(Qt::darkBlue,1)));
Arcs.append(new qucs::Arc( -3, 8, 6, 6, 16*270, 16*180,QPen(Qt::darkBlue,1))); Arcs.append(new qucs::Arc( -3, 8, 6, 6, 16*270, 16*180,QPen(Qt::darkBlue,1)));

View File

@ -24,6 +24,7 @@ BJT::BJT()
{ {
// properties obtained from "Basic_BJT" in bjtsub.cpp // properties obtained from "Basic_BJT" in bjtsub.cpp
Description = QObject::tr("bipolar junction transistor"); Description = QObject::tr("bipolar junction transistor");
Simulator = spicecompat::simQucsator;
createSymbol(); createSymbol();
tx = x2+4; tx = x2+4;
ty = y1+4; ty = y1+4;

View File

@ -126,6 +126,7 @@ Basic_BJT::Basic_BJT()
BJTsub::BJTsub() BJTsub::BJTsub()
{ {
Description = QObject::tr("bipolar junction transistor with substrate"); Description = QObject::tr("bipolar junction transistor with substrate");
Simulator = spicecompat::simQucsator;
createSymbol(); createSymbol();
tx = x2+4; tx = x2+4;
ty = y1+4; ty = y1+4;

View File

@ -16,11 +16,13 @@
***************************************************************************/ ***************************************************************************/
#include "bondwire.h" #include "bondwire.h"
#include "extsimkernels/spicecompat.h"
BondWire::BondWire() BondWire::BondWire()
{ {
Description = QObject::tr("bond wire"); Description = QObject::tr("bond wire");
Simulator = spicecompat::simQucsator;
Lines.append(new qucs::Line(-30, 0,-8, 0,QPen(Qt::darkBlue,3))); Lines.append(new qucs::Line(-30, 0,-8, 0,QPen(Qt::darkBlue,3)));
Lines.append(new qucs::Line( 30, 0, 8, 0,QPen(Qt::darkBlue,3))); Lines.append(new qucs::Line( 30, 0, 8, 0,QPen(Qt::darkBlue,3)));

View File

@ -21,6 +21,7 @@
Circulator::Circulator() Circulator::Circulator()
{ {
Description = QObject::tr("circulator"); Description = QObject::tr("circulator");
Simulator = spicecompat::simQucsator;
Arcs.append(new qucs::Arc(-14,-14, 28, 28, 0,16*360,QPen(Qt::darkBlue,2))); Arcs.append(new qucs::Arc(-14,-14, 28, 28, 0,16*360,QPen(Qt::darkBlue,2)));
Lines.append(new qucs::Line(-30, 0,-14, 0,QPen(Qt::darkBlue,2))); Lines.append(new qucs::Line(-30, 0,-14, 0,QPen(Qt::darkBlue,2)));

View File

@ -16,11 +16,13 @@
***************************************************************************/ ***************************************************************************/
#include "coaxialline.h" #include "coaxialline.h"
#include "extsimkernels/spicecompat.h"
CoaxialLine::CoaxialLine() CoaxialLine::CoaxialLine()
{ {
Description = QObject::tr("coaxial transmission line"); Description = QObject::tr("coaxial transmission line");
Simulator = spicecompat::simQucsator;
Arcs.append(new qucs::Arc(-20, -9, 8, 18, 0, 16*360,QPen(Qt::darkBlue,2))); Arcs.append(new qucs::Arc(-20, -9, 8, 18, 0, 16*360,QPen(Qt::darkBlue,2)));
Arcs.append(new qucs::Arc( 11, -9, 8, 18,16*270, 16*180,QPen(Qt::darkBlue,2))); Arcs.append(new qucs::Arc( 11, -9, 8, 18,16*270, 16*180,QPen(Qt::darkBlue,2)));

View File

@ -45,6 +45,7 @@
Component::Component() Component::Component()
{ {
Type = isAnalogComponent; Type = isAnalogComponent;
Simulator = spicecompat::simAll;
SpiceModel = ""; SpiceModel = "";
isSimulation = false; isSimulation = false;

View File

@ -94,6 +94,7 @@ public:
bool isSimulation; // is it AC,DC,TR or other spice-compatible simulation? bool isSimulation; // is it AC,DC,TR or other spice-compatible simulation?
bool isProbe; // is it Voltage/Current spice-compatible probe? bool isProbe; // is it Voltage/Current spice-compatible probe?
bool isEquation; bool isEquation;
int Simulator;
QString Model, Name; QString Model, Name;
QString Description; QString Description;
QString SpiceModel; QString SpiceModel;

View File

@ -16,11 +16,13 @@
***************************************************************************/ ***************************************************************************/
#include "coplanar.h" #include "coplanar.h"
#include "extsimkernels/spicecompat.h"
Coplanar::Coplanar() Coplanar::Coplanar()
{ {
Description = QObject::tr("coplanar line"); Description = QObject::tr("coplanar line");
Simulator = spicecompat::simQucsator;
Lines.append(new qucs::Line(-30, 0,-18, 0,QPen(Qt::darkBlue,2))); Lines.append(new qucs::Line(-30, 0,-18, 0,QPen(Qt::darkBlue,2)));
Lines.append(new qucs::Line( 18, 0, 30, 0,QPen(Qt::darkBlue,2))); Lines.append(new qucs::Line( 18, 0, 30, 0,QPen(Qt::darkBlue,2)));

View File

@ -16,11 +16,13 @@
***************************************************************************/ ***************************************************************************/
#include "coupler.h" #include "coupler.h"
#include "extsimkernels/spicecompat.h"
Coupler::Coupler() Coupler::Coupler()
{ {
Description = QObject::tr("ideal coupler"); Description = QObject::tr("ideal coupler");
Simulator = spicecompat::simQucsator;
Lines.append(new qucs::Line(-23,-24, 23,-24,QPen(Qt::darkGray,1))); Lines.append(new qucs::Line(-23,-24, 23,-24,QPen(Qt::darkGray,1)));
Lines.append(new qucs::Line( 23,-24, 23, 24,QPen(Qt::darkGray,1))); Lines.append(new qucs::Line( 23,-24, 23, 24,QPen(Qt::darkGray,1)));

View File

@ -16,11 +16,13 @@
***************************************************************************/ ***************************************************************************/
#include "cpwgap.h" #include "cpwgap.h"
#include "extsimkernels/spicecompat.h"
CPWgap::CPWgap() CPWgap::CPWgap()
{ {
Description = QObject::tr("coplanar gap"); Description = QObject::tr("coplanar gap");
Simulator = spicecompat::simQucsator;
Lines.append(new qucs::Line(-30, 0,-18, 0,QPen(Qt::darkBlue,2))); Lines.append(new qucs::Line(-30, 0,-18, 0,QPen(Qt::darkBlue,2)));
Lines.append(new qucs::Line( 18, 0, 30, 0,QPen(Qt::darkBlue,2))); Lines.append(new qucs::Line( 18, 0, 30, 0,QPen(Qt::darkBlue,2)));

View File

@ -16,11 +16,13 @@
***************************************************************************/ ***************************************************************************/
#include "cpwopen.h" #include "cpwopen.h"
#include "extsimkernels/spicecompat.h"
CPWopen::CPWopen() CPWopen::CPWopen()
{ {
Description = QObject::tr("coplanar open"); Description = QObject::tr("coplanar open");
Simulator = spicecompat::simQucsator;
Lines.append(new qucs::Line(-30, 0,-18, 0,QPen(Qt::darkBlue,2))); Lines.append(new qucs::Line(-30, 0,-18, 0,QPen(Qt::darkBlue,2)));
Lines.append(new qucs::Line(-13, -8, 0, -8,QPen(Qt::darkBlue,2))); Lines.append(new qucs::Line(-13, -8, 0, -8,QPen(Qt::darkBlue,2)));

View File

@ -16,11 +16,13 @@
***************************************************************************/ ***************************************************************************/
#include "cpwshort.h" #include "cpwshort.h"
#include "extsimkernels/spicecompat.h"
CPWshort::CPWshort() CPWshort::CPWshort()
{ {
Description = QObject::tr("coplanar short"); Description = QObject::tr("coplanar short");
Simulator = spicecompat::simQucsator;
Lines.append(new qucs::Line(-30, 0,-18, 0,QPen(Qt::darkBlue,2))); Lines.append(new qucs::Line(-30, 0,-18, 0,QPen(Qt::darkBlue,2)));
Lines.append(new qucs::Line(-13, -8, 3, -8,QPen(Qt::darkBlue,2))); Lines.append(new qucs::Line(-13, -8, 3, -8,QPen(Qt::darkBlue,2)));

View File

@ -16,11 +16,13 @@
***************************************************************************/ ***************************************************************************/
#include "cpwstep.h" #include "cpwstep.h"
#include "extsimkernels/spicecompat.h"
CPWstep::CPWstep() CPWstep::CPWstep()
{ {
Description = QObject::tr("coplanar step"); Description = QObject::tr("coplanar step");
Simulator = spicecompat::simQucsator;
Lines.append(new qucs::Line(-30, 0,-18, 0,QPen(Qt::darkBlue,2))); Lines.append(new qucs::Line(-30, 0,-18, 0,QPen(Qt::darkBlue,2)));
Lines.append(new qucs::Line( 18, 0, 30, 0,QPen(Qt::darkBlue,2))); Lines.append(new qucs::Line( 18, 0, 30, 0,QPen(Qt::darkBlue,2)));

View File

@ -13,10 +13,12 @@
***************************************************************************/ ***************************************************************************/
#include "ctline.h" #include "ctline.h"
#include "extsimkernels/spicecompat.h"
CoupledTLine::CoupledTLine() CoupledTLine::CoupledTLine()
{ {
Description = QObject::tr("coupled transmission lines"); Description = QObject::tr("coupled transmission lines");
Simulator = spicecompat::simQucsator;
Arcs.append(new qucs::Arc(-28,-40, 18, 38,16*232, 16*33,QPen(Qt::darkBlue,2))); Arcs.append(new qucs::Arc(-28,-40, 18, 38,16*232, 16*33,QPen(Qt::darkBlue,2)));
Arcs.append(new qucs::Arc(-28, 2, 18, 38, 16*95, 16*33,QPen(Qt::darkBlue,2))); Arcs.append(new qucs::Arc(-28, 2, 18, 38, 16*95, 16*33,QPen(Qt::darkBlue,2)));

View File

@ -16,10 +16,12 @@
***************************************************************************/ ***************************************************************************/
#include "dcblock.h" #include "dcblock.h"
#include "extsimkernels/spicecompat.h"
dcBlock::dcBlock() dcBlock::dcBlock()
{ {
Description = QObject::tr("dc block"); Description = QObject::tr("dc block");
Simulator = spicecompat::simQucsator;
Lines.append(new qucs::Line(- 4,-11, -4, 11,QPen(Qt::darkBlue,4))); Lines.append(new qucs::Line(- 4,-11, -4, 11,QPen(Qt::darkBlue,4)));
Lines.append(new qucs::Line( 4,-11, 4, 11,QPen(Qt::darkBlue,4))); Lines.append(new qucs::Line( 4,-11, 4, 11,QPen(Qt::darkBlue,4)));

View File

@ -16,11 +16,12 @@
***************************************************************************/ ***************************************************************************/
#include "dcfeed.h" #include "dcfeed.h"
#include "extsimkernels/spicecompat.h"
dcFeed::dcFeed() dcFeed::dcFeed()
{ {
Description = QObject::tr("dc feed"); Description = QObject::tr("dc feed");
Simulator = spicecompat::simQucsator;
Arcs.append(new qucs::Arc(-17, -6, 12, 12, 0, 16*180,QPen(Qt::darkBlue,2))); Arcs.append(new qucs::Arc(-17, -6, 12, 12, 0, 16*180,QPen(Qt::darkBlue,2)));
Arcs.append(new qucs::Arc( -6, -6, 12, 12, 0, 16*180,QPen(Qt::darkBlue,2))); Arcs.append(new qucs::Arc( -6, -6, 12, 12, 0, 16*180,QPen(Qt::darkBlue,2)));

View File

@ -16,11 +16,13 @@
***************************************************************************/ ***************************************************************************/
#include "diac.h" #include "diac.h"
#include "extsimkernels/spicecompat.h"
Diac::Diac() Diac::Diac()
{ {
Description = QObject::tr("diac (bidirectional trigger diode)"); Description = QObject::tr("diac (bidirectional trigger diode)");
Simulator = spicecompat::simQucsator;
Lines.append(new qucs::Line( 0,-30, 0, -6,QPen(Qt::darkBlue,2))); Lines.append(new qucs::Line( 0,-30, 0, -6,QPen(Qt::darkBlue,2)));
Lines.append(new qucs::Line( 0, 30, 0, 6,QPen(Qt::darkBlue,2))); Lines.append(new qucs::Line( 0, 30, 0, 6,QPen(Qt::darkBlue,2)));

View File

@ -24,6 +24,7 @@
Diode::Diode() Diode::Diode()
{ {
Description = QObject::tr("diode"); Description = QObject::tr("diode");
Simulator = spicecompat::simQucsator;
Props.append(new Property("Is", "1e-15 A", true, Props.append(new Property("Is", "1e-15 A", true,
QObject::tr("saturation current"))); QObject::tr("saturation current")));

View File

@ -15,11 +15,12 @@
***************************************************************************/ ***************************************************************************/
#include "ecvs.h" #include "ecvs.h"
#include "schematic.h" #include "schematic.h"
#include "extsimkernels/spicecompat.h"
ecvs::ecvs() ecvs::ecvs()
{ {
Description = QObject::tr("externally controlled voltage source"); Description = QObject::tr("externally controlled voltage source");
Simulator = spicecompat::simQucsator;
// Arcs.append(new Arc( -3, -7, 7, 7,16*270, 16*180,QPen(Qt::darkBlue,2))); // Arcs.append(new Arc( -3, -7, 7, 7,16*270, 16*180,QPen(Qt::darkBlue,2)));
// Arcs.append(new Arc( -3, 0, 7, 7, 16*90, 16*180,QPen(Qt::darkBlue,2))); // Arcs.append(new Arc( -3, 0, 7, 7, 16*90, 16*180,QPen(Qt::darkBlue,2)));

View File

@ -21,6 +21,7 @@
ETR_Sim::ETR_Sim() ETR_Sim::ETR_Sim()
{ {
Description = QObject::tr("externally driven transient simulation"); Description = QObject::tr("externally driven transient simulation");
Simulator = spicecompat::simQucsator;
QString s = Description; QString s = Description;
int a = 17; int a = 17;

View File

@ -23,6 +23,7 @@
Gyrator::Gyrator() Gyrator::Gyrator()
{ {
Description = QObject::tr("gyrator (impedance inverter)"); Description = QObject::tr("gyrator (impedance inverter)");
Simulator = spicecompat::simQucsator;
Arcs.append(new qucs::Arc( 3, -9, 18, 18, 16*90, 16*180,QPen(Qt::darkBlue,2))); Arcs.append(new qucs::Arc( 3, -9, 18, 18, 16*90, 16*180,QPen(Qt::darkBlue,2)));
Arcs.append(new qucs::Arc(-21, -9, 18, 18,16*270, 16*180,QPen(Qt::darkBlue,2))); Arcs.append(new qucs::Arc(-21, -9, 18, 18,16*270, 16*180,QPen(Qt::darkBlue,2)));

View File

@ -24,6 +24,7 @@
HB_Sim::HB_Sim() HB_Sim::HB_Sim()
{ {
Description = QObject::tr("Harmonic balance simulation"); Description = QObject::tr("Harmonic balance simulation");
Simulator = spicecompat::simXyce + spicecompat::simQucsator;
QString s = Description; QString s = Description;
int a = s.lastIndexOf(" "); int a = s.lastIndexOf(" ");

View File

@ -13,10 +13,12 @@
***************************************************************************/ ***************************************************************************/
#include "hybrid.h" #include "hybrid.h"
#include "extsimkernels/spicecompat.h"
Hybrid::Hybrid() Hybrid::Hybrid()
{ {
Description = QObject::tr("hybrid (unsymmetrical 3dB coupler)"); Description = QObject::tr("hybrid (unsymmetrical 3dB coupler)");
Simulator = spicecompat::simQucsator;
Lines.append(new qucs::Line(-14,-14, 14,-14,QPen(Qt::darkBlue,2))); Lines.append(new qucs::Line(-14,-14, 14,-14,QPen(Qt::darkBlue,2)));
Lines.append(new qucs::Line(-14, 14, 14, 14,QPen(Qt::darkBlue,2))); Lines.append(new qucs::Line(-14, 14, 14, 14,QPen(Qt::darkBlue,2)));

View File

@ -16,11 +16,13 @@
***************************************************************************/ ***************************************************************************/
#include "isolator.h" #include "isolator.h"
#include "extsimkernels/spicecompat.h"
Isolator::Isolator() Isolator::Isolator()
{ {
Description = QObject::tr("isolator"); Description = QObject::tr("isolator");
Simulator = spicecompat::simQucsator;
Lines.append(new qucs::Line( -8, 0, 8, 0,QPen(Qt::darkBlue,3))); Lines.append(new qucs::Line( -8, 0, 8, 0,QPen(Qt::darkBlue,3)));
Lines.append(new qucs::Line( 8, 0, 0, -5,QPen(Qt::darkBlue,3))); Lines.append(new qucs::Line( 8, 0, 0, -5,QPen(Qt::darkBlue,3)));

View File

@ -22,7 +22,9 @@
JFET::JFET() JFET::JFET()
{ {
Description = QObject::tr("junction field-effect transistor"); Description = QObject::tr("junction field-effect transistor");
Simulator = spicecompat::simQucsator;
// this must be the first property in the list !!! // this must be the first property in the list !!!
Props.append(new Property("Type", "nfet", true, Props.append(new Property("Type", "nfet", true,

View File

@ -9,10 +9,12 @@
*/ */
#include "log_amp.h" #include "log_amp.h"
#include "extsimkernels/spicecompat.h"
log_amp::log_amp() log_amp::log_amp()
{ {
Description = QObject::tr ("Logarithmic Amplifier verilog device"); Description = QObject::tr ("Logarithmic Amplifier verilog device");
Simulator = spicecompat::simQucsator;
Props.append (new Property ("Kv", "1.0", false, Props.append (new Property ("Kv", "1.0", false,
QObject::tr ("scale factor"))); QObject::tr ("scale factor")));

View File

@ -9,10 +9,12 @@
*/ */
#include "mod_amp.h" #include "mod_amp.h"
#include "extsimkernels/spicecompat.h"
mod_amp::mod_amp() mod_amp::mod_amp()
{ {
Description = QObject::tr ("Modular Operational Amplifier verilog device"); Description = QObject::tr ("Modular Operational Amplifier verilog device");
Simulator = spicecompat::simQucsator;
Props.append (new Property ("GBP", "1e6", false, Props.append (new Property ("GBP", "1e6", false,
QObject::tr ("Gain bandwidth product (Hz)"))); QObject::tr ("Gain bandwidth product (Hz)")));

View File

@ -25,6 +25,7 @@ MOSFET::MOSFET()
{ {
// properties obtained from "Basic_MOSFET" in mosfet_sub.cpp // properties obtained from "Basic_MOSFET" in mosfet_sub.cpp
Description = QObject::tr("MOS field-effect transistor"); Description = QObject::tr("MOS field-effect transistor");
Simulator = spicecompat::simQucsator;
createSymbol(); createSymbol();
tx = x2+4; tx = x2+4;
ty = y1+4; ty = y1+4;

View File

@ -129,6 +129,7 @@ Basic_MOSFET::Basic_MOSFET()
MOSFET_sub::MOSFET_sub() MOSFET_sub::MOSFET_sub()
{ {
Description = QObject::tr("MOS field-effect transistor with substrate"); Description = QObject::tr("MOS field-effect transistor with substrate");
Simulator = spicecompat::simQucsator;
createSymbol(); createSymbol();
tx = x2+4; tx = x2+4;
ty = y1+4; ty = y1+4;

View File

@ -16,11 +16,13 @@
***************************************************************************/ ***************************************************************************/
#include "mscorner.h" #include "mscorner.h"
#include "extsimkernels/spicecompat.h"
MScorner::MScorner() MScorner::MScorner()
{ {
Description = QObject::tr("microstrip corner"); Description = QObject::tr("microstrip corner");
Simulator = spicecompat::simQucsator;
Lines.append(new qucs::Line(-30, 0,-18, 0,QPen(Qt::darkBlue,2))); Lines.append(new qucs::Line(-30, 0,-18, 0,QPen(Qt::darkBlue,2)));
Lines.append(new qucs::Line( 0, 18, 0, 30,QPen(Qt::darkBlue,2))); Lines.append(new qucs::Line( 0, 18, 0, 30,QPen(Qt::darkBlue,2)));

View File

@ -16,11 +16,13 @@
***************************************************************************/ ***************************************************************************/
#include "mscoupled.h" #include "mscoupled.h"
#include "extsimkernels/spicecompat.h"
MScoupled::MScoupled() MScoupled::MScoupled()
{ {
Description = QObject::tr("coupled microstrip line"); Description = QObject::tr("coupled microstrip line");
Simulator = spicecompat::simQucsator;
Lines.append(new qucs::Line(-30,-12,-16,-12,QPen(Qt::darkBlue,2))); Lines.append(new qucs::Line(-30,-12,-16,-12,QPen(Qt::darkBlue,2)));
Lines.append(new qucs::Line(-30,-30,-30,-12,QPen(Qt::darkBlue,2))); Lines.append(new qucs::Line(-30,-30,-30,-12,QPen(Qt::darkBlue,2)));

View File

@ -16,11 +16,13 @@
***************************************************************************/ ***************************************************************************/
#include "mscross.h" #include "mscross.h"
#include "extsimkernels/spicecompat.h"
MScross::MScross() MScross::MScross()
{ {
Description = QObject::tr("microstrip cross"); Description = QObject::tr("microstrip cross");
Simulator = spicecompat::simQucsator;
Model = "MCROSS"; Model = "MCROSS";
Name = "MS"; Name = "MS";

View File

@ -16,11 +16,13 @@
***************************************************************************/ ***************************************************************************/
#include "msgap.h" #include "msgap.h"
#include "extsimkernels/spicecompat.h"
MSgap::MSgap() MSgap::MSgap()
{ {
Description = QObject::tr("microstrip gap"); Description = QObject::tr("microstrip gap");
Simulator = spicecompat::simQucsator;
Lines.append(new qucs::Line(-30, 0,-18, 0,QPen(Qt::darkBlue,2))); Lines.append(new qucs::Line(-30, 0,-18, 0,QPen(Qt::darkBlue,2)));
Lines.append(new qucs::Line( 18, 0, 30, 0,QPen(Qt::darkBlue,2))); Lines.append(new qucs::Line( 18, 0, 30, 0,QPen(Qt::darkBlue,2)));

View File

@ -16,11 +16,13 @@
***************************************************************************/ ***************************************************************************/
#include "mslange.h" #include "mslange.h"
#include "extsimkernels/spicecompat.h"
MSlange::MSlange() MSlange::MSlange()
{ {
Description = QObject::tr("microstrip lange coupler"); Description = QObject::tr("microstrip lange coupler");
Simulator = spicecompat::simQucsator;
Lines.append(new qucs::Line(-30,-30,-30, 10,QPen(Qt::darkBlue,2))); Lines.append(new qucs::Line(-30,-30,-30, 10,QPen(Qt::darkBlue,2)));
Lines.append(new qucs::Line(-30, 30,-30, 20,QPen(Qt::darkBlue,2))); Lines.append(new qucs::Line(-30, 30,-30, 20,QPen(Qt::darkBlue,2)));

View File

@ -16,11 +16,13 @@
***************************************************************************/ ***************************************************************************/
#include "msline.h" #include "msline.h"
#include "extsimkernels/spicecompat.h"
MSline::MSline() MSline::MSline()
{ {
Description = QObject::tr("microstrip line"); Description = QObject::tr("microstrip line");
Simulator = spicecompat::simQucsator;
Lines.append(new qucs::Line(-30, 0,-18, 0,QPen(Qt::darkBlue,2))); Lines.append(new qucs::Line(-30, 0,-18, 0,QPen(Qt::darkBlue,2)));
Lines.append(new qucs::Line( 18, 0, 30, 0,QPen(Qt::darkBlue,2))); Lines.append(new qucs::Line( 18, 0, 30, 0,QPen(Qt::darkBlue,2)));

View File

@ -16,11 +16,13 @@
***************************************************************************/ ***************************************************************************/
#include "msmbend.h" #include "msmbend.h"
#include "extsimkernels/spicecompat.h"
MSmbend::MSmbend() MSmbend::MSmbend()
{ {
Description = QObject::tr("microstrip mitered bend"); Description = QObject::tr("microstrip mitered bend");
Simulator = spicecompat::simQucsator;
Lines.append(new qucs::Line(-30, 0,-18, 0,QPen(Qt::darkBlue,2))); Lines.append(new qucs::Line(-30, 0,-18, 0,QPen(Qt::darkBlue,2)));
Lines.append(new qucs::Line( 0, 18, 0, 30,QPen(Qt::darkBlue,2))); Lines.append(new qucs::Line( 0, 18, 0, 30,QPen(Qt::darkBlue,2)));

View File

@ -16,11 +16,13 @@
***************************************************************************/ ***************************************************************************/
#include "msopen.h" #include "msopen.h"
#include "extsimkernels/spicecompat.h"
MSopen::MSopen() MSopen::MSopen()
{ {
Description = QObject::tr("microstrip open"); Description = QObject::tr("microstrip open");
Simulator = spicecompat::simQucsator;
Lines.append(new qucs::Line(-30, 0,-18, 0,QPen(Qt::darkBlue,2))); Lines.append(new qucs::Line(-30, 0,-18, 0,QPen(Qt::darkBlue,2)));
Lines.append(new qucs::Line(-13, -8, 13, -8,QPen(Qt::darkBlue,2))); Lines.append(new qucs::Line(-13, -8, 13, -8,QPen(Qt::darkBlue,2)));

View File

@ -16,10 +16,12 @@
***************************************************************************/ ***************************************************************************/
#include "msrstub.h" #include "msrstub.h"
#include "extsimkernels/spicecompat.h"
MSrstub::MSrstub() MSrstub::MSrstub()
{ {
Description = QObject::tr("microstrip radial stub"); Description = QObject::tr("microstrip radial stub");
Simulator = spicecompat::simQucsator;
Arcs.append(new qucs::Arc( -26, -26, 52, 52,16*45, 16*90,QPen(Qt::darkBlue,2))); Arcs.append(new qucs::Arc( -26, -26, 52, 52,16*45, 16*90,QPen(Qt::darkBlue,2)));

View File

@ -16,11 +16,13 @@
***************************************************************************/ ***************************************************************************/
#include "msstep.h" #include "msstep.h"
#include "extsimkernels/spicecompat.h"
MSstep::MSstep() MSstep::MSstep()
{ {
Description = QObject::tr("microstrip impedance step"); Description = QObject::tr("microstrip impedance step");
Simulator = spicecompat::simQucsator;
Lines.append(new qucs::Line(-30, 0,-18, 0,QPen(Qt::darkBlue,2))); Lines.append(new qucs::Line(-30, 0,-18, 0,QPen(Qt::darkBlue,2)));
Lines.append(new qucs::Line( 18, 0, 30, 0,QPen(Qt::darkBlue,2))); Lines.append(new qucs::Line( 18, 0, 30, 0,QPen(Qt::darkBlue,2)));

View File

@ -23,6 +23,7 @@
MStee::MStee() MStee::MStee()
{ {
Description = QObject::tr("microstrip tee"); Description = QObject::tr("microstrip tee");
Simulator = spicecompat::simQucsator;
x1 = -30; y1 = -11; x1 = -30; y1 = -11;
x2 = 30; y2 = 30; x2 = 30; y2 = 30;

View File

@ -17,11 +17,13 @@
#include "msvia.h" #include "msvia.h"
#include "node.h" #include "node.h"
#include "extsimkernels/spicecompat.h"
MSvia::MSvia() MSvia::MSvia()
{ {
Description = QObject::tr("microstrip via"); Description = QObject::tr("microstrip via");
Simulator = spicecompat::simQucsator;
Arcs.append(new qucs::Arc(-5,-4, 10, 7, 0, 16*360,QPen(Qt::darkBlue,2))); Arcs.append(new qucs::Arc(-5,-4, 10, 7, 0, 16*360,QPen(Qt::darkBlue,2)));
Lines.append(new qucs::Line(-20, 0, -5, 0,QPen(Qt::darkBlue,2))); Lines.append(new qucs::Line(-20, 0, -5, 0,QPen(Qt::darkBlue,2)));

View File

@ -16,11 +16,13 @@
***************************************************************************/ ***************************************************************************/
#include "mutual.h" #include "mutual.h"
#include "extsimkernels/spicecompat.h"
Mutual::Mutual() Mutual::Mutual()
{ {
Description = QObject::tr("two mutual inductors"); Description = QObject::tr("two mutual inductors");
Simulator = spicecompat::simQucsator;
Arcs.append(new qucs::Arc(-16,-18,12,12, 16*270,16*180, QPen(Qt::darkBlue,2))); Arcs.append(new qucs::Arc(-16,-18,12,12, 16*270,16*180, QPen(Qt::darkBlue,2)));
Arcs.append(new qucs::Arc(-16, -6,12,12, 16*270,16*180, QPen(Qt::darkBlue,2))); Arcs.append(new qucs::Arc(-16, -6,12,12, 16*270,16*180, QPen(Qt::darkBlue,2)));

View File

@ -24,6 +24,7 @@
Mutual2::Mutual2() Mutual2::Mutual2()
{ {
Description = QObject::tr("three mutual inductors"); Description = QObject::tr("three mutual inductors");
Simulator = spicecompat::simQucsator;
QFont Font(QucsSettings.font); // default application font QFont Font(QucsSettings.font); // default application font
// symbol text is smaller (10 pt default) // symbol text is smaller (10 pt default)

View File

@ -20,11 +20,13 @@
#include "mutualx.h" #include "mutualx.h"
#include "node.h" #include "node.h"
#include "extsimkernels/spicecompat.h"
#include <cmath> #include <cmath>
MutualX::MutualX() MutualX::MutualX()
{ {
Description = QObject::tr("several mutual inductors"); Description = QObject::tr("several mutual inductors");
Simulator = spicecompat::simQucsator;
Model = "MUTX"; Model = "MUTX";
Name = "Tr"; Name = "Tr";

View File

@ -9,10 +9,12 @@
*/ */
#include "nigbt.h" #include "nigbt.h"
#include "extsimkernels/spicecompat.h"
nigbt::nigbt() nigbt::nigbt()
{ {
Description = QObject::tr ("NIGBT verilog device"); Description = QObject::tr ("NIGBT verilog device");
Simulator = spicecompat::simQucsator;
Props.append (new Property ("Agd", "5.0e-6", false, Props.append (new Property ("Agd", "5.0e-6", false,
QObject::tr ("gate-drain overlap area") QObject::tr ("gate-drain overlap area")

View File

@ -16,11 +16,13 @@
***************************************************************************/ ***************************************************************************/
#include "noise_ii.h" #include "noise_ii.h"
#include "extsimkernels/spicecompat.h"
Noise_ii::Noise_ii() Noise_ii::Noise_ii()
{ {
Description = QObject::tr("correlated current sources"); Description = QObject::tr("correlated current sources");
Simulator = spicecompat::simQucsator;
// left noise source // left noise source
Arcs.append(new qucs::Arc(-42,-12, 24, 24, 0, 16*360,QPen(Qt::darkBlue,2))); Arcs.append(new qucs::Arc(-42,-12, 24, 24, 0, 16*360,QPen(Qt::darkBlue,2)));

View File

@ -16,11 +16,13 @@
***************************************************************************/ ***************************************************************************/
#include "noise_iv.h" #include "noise_iv.h"
#include "extsimkernels/spicecompat.h"
Noise_iv::Noise_iv() Noise_iv::Noise_iv()
{ {
Description = QObject::tr("correlated current sources"); Description = QObject::tr("correlated current sources");
Simulator = spicecompat::simQucsator;
// left noise source // left noise source
Arcs.append(new qucs::Arc(-42,-12, 24, 24, 0, 16*360,QPen(Qt::darkBlue,2))); Arcs.append(new qucs::Arc(-42,-12, 24, 24, 0, 16*360,QPen(Qt::darkBlue,2)));

View File

@ -16,11 +16,13 @@
***************************************************************************/ ***************************************************************************/
#include "noise_vv.h" #include "noise_vv.h"
#include "extsimkernels/spicecompat.h"
Noise_vv::Noise_vv() Noise_vv::Noise_vv()
{ {
Description = QObject::tr("correlated current sources"); Description = QObject::tr("correlated current sources");
Simulator = spicecompat::simQucsator;
// left noise source // left noise source
Arcs.append(new qucs::Arc(-42,-12, 24, 24, 0, 16*360,QPen(Qt::darkBlue,2))); Arcs.append(new qucs::Arc(-42,-12, 24, 24, 0, 16*360,QPen(Qt::darkBlue,2)));

View File

@ -28,6 +28,7 @@
Optimize_Sim::Optimize_Sim() Optimize_Sim::Optimize_Sim()
{ {
Description = QObject::tr("Optimization"); Description = QObject::tr("Optimization");
Simulator = spicecompat::simQucsator;
Texts.append(new Text(0, 0, Description, Qt::darkBlue, QucsSettings.largeFontSize)); Texts.append(new Text(0, 0, Description, Qt::darkBlue, QucsSettings.largeFontSize));

View File

@ -16,11 +16,13 @@
***************************************************************************/ ***************************************************************************/
#include "phaseshifter.h" #include "phaseshifter.h"
#include "extsimkernels/spicecompat.h"
Phaseshifter::Phaseshifter() Phaseshifter::Phaseshifter()
{ {
Description = QObject::tr("phase shifter"); Description = QObject::tr("phase shifter");
Simulator = spicecompat::simQucsator;
Lines.append(new qucs::Line(-14,-14, 14,-14,QPen(Qt::darkBlue,2))); Lines.append(new qucs::Line(-14,-14, 14,-14,QPen(Qt::darkBlue,2)));
Lines.append(new qucs::Line(-14, 14, 14, 14,QPen(Qt::darkBlue,2))); Lines.append(new qucs::Line(-14, 14, 14, 14,QPen(Qt::darkBlue,2)));

View File

@ -9,10 +9,12 @@
*/ */
#include "photodiode.h" #include "photodiode.h"
#include "extsimkernels/spicecompat.h"
photodiode::photodiode() photodiode::photodiode()
{ {
Description = QObject::tr ("Photodiode verilog device"); Description = QObject::tr ("Photodiode verilog device");
Simulator = spicecompat::simQucsator;
Props.append (new Property ("N", "1.35", false, Props.append (new Property ("N", "1.35", false,
QObject::tr ("photodiode emission coefficient"))); QObject::tr ("photodiode emission coefficient")));

View File

@ -9,10 +9,12 @@
*/ */
#include "phototransistor.h" #include "phototransistor.h"
#include "extsimkernels/spicecompat.h"
phototransistor::phototransistor() phototransistor::phototransistor()
{ {
Description = QObject::tr ("Phototransistor verilog device"); Description = QObject::tr ("Phototransistor verilog device");
Simulator = spicecompat::simQucsator;
Props.append (new Property ("Bf", "100", false, Props.append (new Property ("Bf", "100", false,
QObject::tr ("forward beta"))); QObject::tr ("forward beta")));

View File

@ -16,11 +16,13 @@
***************************************************************************/ ***************************************************************************/
#include "pm_modulator.h" #include "pm_modulator.h"
#include "extsimkernels/spicecompat.h"
PM_Modulator::PM_Modulator() PM_Modulator::PM_Modulator()
{ {
Description = QObject::tr("ac voltage source with phase modulator"); Description = QObject::tr("ac voltage source with phase modulator");
Simulator = spicecompat::simQucsator;
Arcs.append(new qucs::Arc(-12,-12, 24, 24, 0, 16*360,QPen(Qt::darkBlue,2))); Arcs.append(new qucs::Arc(-12,-12, 24, 24, 0, 16*360,QPen(Qt::darkBlue,2)));
Arcs.append(new qucs::Arc( -7, -4, 7, 7, 0, 16*180,QPen(Qt::darkBlue,2))); Arcs.append(new qucs::Arc( -7, -4, 7, 7, 0, 16*180,QPen(Qt::darkBlue,2)));

View File

@ -9,10 +9,12 @@
*/ */
#include "potentiometer.h" #include "potentiometer.h"
#include "extsimkernels/spicecompat.h"
potentiometer::potentiometer() potentiometer::potentiometer()
{ {
Description = QObject::tr ("Potentiometer verilog device"); Description = QObject::tr ("Potentiometer verilog device");
Simulator = spicecompat::simQucsator;
Props.append (new Property ("R_pot", "1e4", false, Props.append (new Property ("R_pot", "1e4", false,
QObject::tr ("nominal device resistance") QObject::tr ("nominal device resistance")

View File

@ -15,11 +15,13 @@
***************************************************************************/ ***************************************************************************/
#include "rectline.h" #include "rectline.h"
#include "extsimkernels/spicecompat.h"
RectLine::RectLine() RectLine::RectLine()
{ {
Description = QObject::tr("Rectangular Waveguide"); Description = QObject::tr("Rectangular Waveguide");
Simulator = spicecompat::simQucsator;
Lines.append(new qucs::Line(-30, 0,-17, 0,QPen(Qt::darkBlue,2))); Lines.append(new qucs::Line(-30, 0,-17, 0,QPen(Qt::darkBlue,2)));
Lines.append(new qucs::Line( 18, 0, 30, 0,QPen(Qt::darkBlue,2))); Lines.append(new qucs::Line( 18, 0, 30, 0,QPen(Qt::darkBlue,2)));

View File

@ -24,6 +24,7 @@
RFedd::RFedd() RFedd::RFedd()
{ {
Description = QObject::tr("equation defined RF device"); Description = QObject::tr("equation defined RF device");
Simulator = spicecompat::simQucsator;
Model = "RFEDD"; Model = "RFEDD";
Name = "RF"; Name = "RF";

View File

@ -25,6 +25,7 @@
RFedd2P::RFedd2P() RFedd2P::RFedd2P()
{ {
Description = QObject::tr("equation defined 2-port RF device"); Description = QObject::tr("equation defined 2-port RF device");
Simulator = spicecompat::simQucsator;
Model = "RFEDD2P"; Model = "RFEDD2P";
Name = "RF"; Name = "RF";

View File

@ -22,6 +22,7 @@
RLCG::RLCG() RLCG::RLCG()
{ {
Description = QObject::tr("RLCG transmission line"); Description = QObject::tr("RLCG transmission line");
Simulator = spicecompat::simQucsator;
Lines.append(new qucs::Line(-30, 0, 30, 0,QPen(Qt::darkBlue,2))); Lines.append(new qucs::Line(-30, 0, 30, 0,QPen(Qt::darkBlue,2)));
Lines.append(new qucs::Line(-28, 7, 28, 7,QPen(Qt::darkBlue,2))); Lines.append(new qucs::Line(-28, 7, 28, 7,QPen(Qt::darkBlue,2)));

View File

@ -25,6 +25,7 @@
SParamFile::SParamFile() SParamFile::SParamFile()
{ {
Description = QObject::tr("S parameter file"); Description = QObject::tr("S parameter file");
Simulator = spicecompat::simQucsator;
Model = "SPfile"; Model = "SPfile";
Name = "X"; Name = "X";

View File

@ -16,11 +16,13 @@
***************************************************************************/ ***************************************************************************/
#include "substrate.h" #include "substrate.h"
#include "extsimkernels/spicecompat.h"
Substrate::Substrate() Substrate::Substrate()
{ {
Description = QObject::tr("substrate definition"); Description = QObject::tr("substrate definition");
Simulator = spicecompat::simQucsator;
Lines.append(new qucs::Line(-30,-16, 30,-16,QPen(Qt::darkBlue,2))); Lines.append(new qucs::Line(-30,-16, 30,-16,QPen(Qt::darkBlue,2)));
Lines.append(new qucs::Line(-30,-12, 30,-12,QPen(Qt::darkBlue,2))); Lines.append(new qucs::Line(-30,-12, 30,-12,QPen(Qt::darkBlue,2)));

View File

@ -17,11 +17,13 @@
#include "switch.h" #include "switch.h"
#include "node.h" #include "node.h"
#include "schematic.h" #include "schematic.h"
#include "extsimkernels/spicecompat.h"
Switch::Switch() Switch::Switch()
{ {
Description = QObject::tr("switch (time controlled)"); Description = QObject::tr("switch (time controlled)");
Simulator = spicecompat::simQucsator;
Props.append(new Property("init", "off", false, Props.append(new Property("init", "off", false,
QObject::tr("initial state")+" [on, off]")); QObject::tr("initial state")+" [on, off]"));

View File

@ -17,6 +17,7 @@
#include "main.h" #include "main.h"
#include "symtrafo.h" #include "symtrafo.h"
#include "extsimkernels/spicecompat.h"
#include<QFontMetrics> #include<QFontMetrics>
@ -24,6 +25,7 @@
symTrafo::symTrafo() symTrafo::symTrafo()
{ {
Description = QObject::tr("ideal symmetrical transformer"); Description = QObject::tr("ideal symmetrical transformer");
Simulator = spicecompat::simQucsator;
QFont Font(QucsSettings.font); // default application font QFont Font(QucsSettings.font); // default application font
// symbol text is smaller (10 pt default) // symbol text is smaller (10 pt default)

View File

@ -16,11 +16,13 @@
***************************************************************************/ ***************************************************************************/
#include "thyristor.h" #include "thyristor.h"
#include "extsimkernels/spicecompat.h"
Thyristor::Thyristor() Thyristor::Thyristor()
{ {
Description = QObject::tr("silicon controlled rectifier (SCR)"); Description = QObject::tr("silicon controlled rectifier (SCR)");
Simulator = spicecompat::simQucsator;
Lines.append(new qucs::Line( 0,-30, 0, 30,QPen(Qt::darkBlue,2))); Lines.append(new qucs::Line( 0,-30, 0, 30,QPen(Qt::darkBlue,2)));
Lines.append(new qucs::Line( -9, 6, 9, 6,QPen(Qt::darkBlue,2))); Lines.append(new qucs::Line( -9, 6, 9, 6,QPen(Qt::darkBlue,2)));

View File

@ -16,11 +16,13 @@
***************************************************************************/ ***************************************************************************/
#include "tline.h" #include "tline.h"
#include "extsimkernels/spicecompat.h"
TLine::TLine() TLine::TLine()
{ {
Description = QObject::tr("ideal transmission line"); Description = QObject::tr("ideal transmission line");
Simulator = spicecompat::simQucsator;
Lines.append(new qucs::Line(-30, 0, 30, 0,QPen(Qt::darkBlue,2))); Lines.append(new qucs::Line(-30, 0, 30, 0,QPen(Qt::darkBlue,2)));
Lines.append(new qucs::Line(-28, 7, 28, 7,QPen(Qt::darkBlue,2))); Lines.append(new qucs::Line(-28, 7, 28, 7,QPen(Qt::darkBlue,2)));

View File

@ -16,11 +16,13 @@
***************************************************************************/ ***************************************************************************/
#include "tline_4port.h" #include "tline_4port.h"
#include "extsimkernels/spicecompat.h"
TLine_4Port::TLine_4Port() TLine_4Port::TLine_4Port()
{ {
Description = QObject::tr("ideal 4-terminal transmission line"); Description = QObject::tr("ideal 4-terminal transmission line");
Simulator = spicecompat::simQucsator;
Arcs.append(new qucs::Arc(-28,-40, 18, 38,16*232, 16*33,QPen(Qt::darkBlue,1))); Arcs.append(new qucs::Arc(-28,-40, 18, 38,16*232, 16*33,QPen(Qt::darkBlue,1)));
Arcs.append(new qucs::Arc(-28, 2, 18, 38, 16*95, 16*33,QPen(Qt::darkBlue,1))); Arcs.append(new qucs::Arc(-28, 2, 18, 38, 16*95, 16*33,QPen(Qt::darkBlue,1)));

View File

@ -16,11 +16,13 @@
***************************************************************************/ ***************************************************************************/
#include "transformer.h" #include "transformer.h"
#include "extsimkernels/spicecompat.h"
Transformer::Transformer() Transformer::Transformer()
{ {
Description = QObject::tr("ideal transformer"); Description = QObject::tr("ideal transformer");
Simulator = spicecompat::simQucsator;
Arcs.append(new qucs::Arc(-16,-18,12,12, 16*270,16*180, QPen(Qt::darkBlue,2))); Arcs.append(new qucs::Arc(-16,-18,12,12, 16*270,16*180, QPen(Qt::darkBlue,2)));
Arcs.append(new qucs::Arc(-16, -6,12,12, 16*270,16*180, QPen(Qt::darkBlue,2))); Arcs.append(new qucs::Arc(-16, -6,12,12, 16*270,16*180, QPen(Qt::darkBlue,2)));

View File

@ -16,11 +16,13 @@
***************************************************************************/ ***************************************************************************/
#include "triac.h" #include "triac.h"
#include "extsimkernels/spicecompat.h"
Triac::Triac() Triac::Triac()
{ {
Description = QObject::tr("triac (bidirectional thyristor)"); Description = QObject::tr("triac (bidirectional thyristor)");
Simulator = spicecompat::simQucsator;
Lines.append(new qucs::Line( 0,-30, 0, -6,QPen(Qt::darkBlue,2))); Lines.append(new qucs::Line( 0,-30, 0, -6,QPen(Qt::darkBlue,2)));
Lines.append(new qucs::Line( 0, 30, 0, 6,QPen(Qt::darkBlue,2))); Lines.append(new qucs::Line( 0, 30, 0, 6,QPen(Qt::darkBlue,2)));

View File

@ -13,10 +13,12 @@
***************************************************************************/ ***************************************************************************/
#include "tunneldiode.h" #include "tunneldiode.h"
#include "extsimkernels/spicecompat.h"
TunnelDiode::TunnelDiode() TunnelDiode::TunnelDiode()
{ {
Description = QObject::tr("resonance tunnel diode"); Description = QObject::tr("resonance tunnel diode");
Simulator = spicecompat::simQucsator;
Props.append(new Property("Ip", "4 mA", true, Props.append(new Property("Ip", "4 mA", true,
QObject::tr("peak current"))); QObject::tr("peak current")));

View File

@ -16,11 +16,13 @@
***************************************************************************/ ***************************************************************************/
#include "vcresistor.h" #include "vcresistor.h"
#include "extsimkernels/spicecompat.h"
vcresistor::vcresistor() vcresistor::vcresistor()
{ {
Description = QObject::tr("voltage controlled resistor"); Description = QObject::tr("voltage controlled resistor");
Simulator = spicecompat::simQucsator;
// The resistor shape // The resistor shape
Lines.append(new qucs::Line(5, 18, 5, -18, QPen(Qt::darkBlue,2))); Lines.append(new qucs::Line(5, 18, 5, -18, QPen(Qt::darkBlue,2)));

View File

@ -16,11 +16,13 @@
***************************************************************************/ ***************************************************************************/
#include "volt_noise.h" #include "volt_noise.h"
#include "extsimkernels/spicecompat.h"
Volt_noise::Volt_noise() Volt_noise::Volt_noise()
{ {
Description = QObject::tr("noise voltage source"); Description = QObject::tr("noise voltage source");
Simulator = spicecompat::simQucsator;
Arcs.append(new qucs::Arc(-12,-12, 24, 24, 0, 16*360,QPen(Qt::darkBlue,2))); Arcs.append(new qucs::Arc(-12,-12, 24, 24, 0, 16*360,QPen(Qt::darkBlue,2)));
Lines.append(new qucs::Line(-30, 0,-12, 0,QPen(Qt::darkBlue,2))); Lines.append(new qucs::Line(-30, 0,-12, 0,QPen(Qt::darkBlue,2)));

View File

@ -67,6 +67,11 @@ void Module::registerComponent (QString category, pInfoFunc info) {
QString Name, Model; QString Name, Model;
char * File; char * File;
Component * c = (Component *) info (Name, File, true); Component * c = (Component *) info (Name, File, true);
if ((c->Simulator & QucsSettings.DefaultSimulator) == 0) {
return;
}
Model = c->Model; Model = c->Model;
delete c; delete c;
@ -240,6 +245,7 @@ void Module::intoCategory (Module * m) {
// registers every component available in the application. Put here // registers every component available in the application. Put here
// any new component. // any new component.
void Module::registerModules (void) { void Module::registerModules (void) {
unregisterModules();
REGISTER_LUMPED_2 (Resistor, info, info_us); REGISTER_LUMPED_2 (Resistor, info, info_us);
REGISTER_LUMPED_1 (Capacitor); REGISTER_LUMPED_1 (Capacitor);
@ -247,16 +253,16 @@ void Module::registerModules (void) {
REGISTER_LUMPED_1 (IndQ); REGISTER_LUMPED_1 (IndQ);
REGISTER_LUMPED_1 (CapQ); REGISTER_LUMPED_1 (CapQ);
// lumped components // lumped components
if (QucsSettings.DefaultSimulator != spicecompat::simQucsator) { //if (QucsSettings.DefaultSimulator != spicecompat::simQucsator) {
REGISTER_LUMPED_1 (R_SPICE); REGISTER_LUMPED_1 (R_SPICE);
REGISTER_LUMPED_1 (C_SPICE); REGISTER_LUMPED_1 (C_SPICE);
REGISTER_LUMPED_1 (L_SPICE); REGISTER_LUMPED_1 (L_SPICE);
REGISTER_LUMPED_1 (K_SPICE); REGISTER_LUMPED_1 (K_SPICE);
} //}
REGISTER_LUMPED_1 (Ground); REGISTER_LUMPED_1 (Ground);
REGISTER_LUMPED_1 (SubCirPort); REGISTER_LUMPED_1 (SubCirPort);
if (QucsSettings.DefaultSimulator == spicecompat::simQucsator) { //if (QucsSettings.DefaultSimulator == spicecompat::simQucsator) {
REGISTER_LUMPED_1 (Transformer); REGISTER_LUMPED_1 (Transformer);
REGISTER_LUMPED_1 (symTrafo); REGISTER_LUMPED_1 (symTrafo);
REGISTER_LUMPED_1 (dcBlock); REGISTER_LUMPED_1 (dcBlock);
@ -270,28 +276,28 @@ void Module::registerModules (void) {
REGISTER_LUMPED_1 (Phaseshifter); REGISTER_LUMPED_1 (Phaseshifter);
REGISTER_LUMPED_1 (Coupler); REGISTER_LUMPED_1 (Coupler);
REGISTER_LUMPED_1 (Hybrid); REGISTER_LUMPED_1 (Hybrid);
} //}
REGISTER_LUMPED_1 (iProbe); REGISTER_LUMPED_1 (iProbe);
REGISTER_LUMPED_1 (vProbe); REGISTER_LUMPED_1 (vProbe);
if (QucsSettings.DefaultSimulator == spicecompat::simQucsator) { //if (QucsSettings.DefaultSimulator == spicecompat::simQucsator) {
REGISTER_LUMPED_1 (Mutual); REGISTER_LUMPED_1 (Mutual);
REGISTER_LUMPED_1 (Mutual2); REGISTER_LUMPED_1 (Mutual2);
REGISTER_LUMPED_1 (MutualX); REGISTER_LUMPED_1 (MutualX);
REGISTER_LUMPED_1 (Switch); REGISTER_LUMPED_1 (Switch);
} else { //} else {
REGISTER_LUMPED_1 (S4Q_S); REGISTER_LUMPED_1 (S4Q_S);
REGISTER_LUMPED_1 (S4Q_W); REGISTER_LUMPED_1 (S4Q_W);
} //}
REGISTER_LUMPED_1 (Relais); REGISTER_LUMPED_1 (Relais);
if (QucsSettings.DefaultSimulator == spicecompat::simQucsator) { //if (QucsSettings.DefaultSimulator == spicecompat::simQucsator) {
REGISTER_LUMPED_1 (RFedd); REGISTER_LUMPED_1 (RFedd);
REGISTER_LUMPED_1 (RFedd2P); REGISTER_LUMPED_1 (RFedd2P);
} //}
// sources // sources
REGISTER_SOURCE_1 (Volt_dc); REGISTER_SOURCE_1 (Volt_dc);
@ -299,10 +305,10 @@ void Module::registerModules (void) {
REGISTER_SOURCE_1 (Volt_ac); REGISTER_SOURCE_1 (Volt_ac);
REGISTER_SOURCE_1 (Ampere_ac); REGISTER_SOURCE_1 (Ampere_ac);
REGISTER_SOURCE_1 (Source_ac); REGISTER_SOURCE_1 (Source_ac);
if (QucsSettings.DefaultSimulator == spicecompat::simQucsator) { //if (QucsSettings.DefaultSimulator == spicecompat::simQucsator) {
REGISTER_SOURCE_1 (Volt_noise); REGISTER_SOURCE_1 (Volt_noise);
REGISTER_SOURCE_1 (Ampere_noise); REGISTER_SOURCE_1 (Ampere_noise);
} //}
REGISTER_SOURCE_1 (VCCS); REGISTER_SOURCE_1 (VCCS);
REGISTER_SOURCE_1 (CCCS); REGISTER_SOURCE_1 (CCCS);
REGISTER_SOURCE_1 (VCVS); REGISTER_SOURCE_1 (VCVS);
@ -312,20 +318,20 @@ void Module::registerModules (void) {
REGISTER_SOURCE_1 (vRect); REGISTER_SOURCE_1 (vRect);
REGISTER_SOURCE_1 (iRect); REGISTER_SOURCE_1 (iRect);
if (QucsSettings.DefaultSimulator == spicecompat::simQucsator) { //if (QucsSettings.DefaultSimulator == spicecompat::simQucsator) {
REGISTER_SOURCE_1 (Noise_ii); REGISTER_SOURCE_1 (Noise_ii);
REGISTER_SOURCE_1 (Noise_vv); REGISTER_SOURCE_1 (Noise_vv);
REGISTER_SOURCE_1 (Noise_iv); REGISTER_SOURCE_1 (Noise_iv);
REGISTER_SOURCE_1 (AM_Modulator); REGISTER_SOURCE_1 (AM_Modulator);
REGISTER_SOURCE_1 (PM_Modulator); REGISTER_SOURCE_1 (PM_Modulator);
} //}
REGISTER_SOURCE_1 (iExp); REGISTER_SOURCE_1 (iExp);
REGISTER_SOURCE_1 (vExp); REGISTER_SOURCE_1 (vExp);
REGISTER_SOURCE_1 (vFile); REGISTER_SOURCE_1 (vFile);
REGISTER_SOURCE_1 (iFile); REGISTER_SOURCE_1 (iFile);
if (QucsSettings.DefaultSimulator != spicecompat::simQucsator) { //if (QucsSettings.DefaultSimulator != spicecompat::simQucsator) {
REGISTER_SOURCE_1 (S4Q_V); REGISTER_SOURCE_1 (S4Q_V);
REGISTER_SOURCE_1 (S4Q_I); REGISTER_SOURCE_1 (S4Q_I);
REGISTER_SOURCE_1 (Src_eqndef); REGISTER_SOURCE_1 (Src_eqndef);
@ -342,14 +348,14 @@ void Module::registerModules (void) {
REGISTER_SOURCE_1 (iTRNOISE); REGISTER_SOURCE_1 (iTRNOISE);
REGISTER_SOURCE_1 (vTRRANDOM); REGISTER_SOURCE_1 (vTRRANDOM);
REGISTER_SOURCE_1 (Vac_SPICE); REGISTER_SOURCE_1 (Vac_SPICE);
} //}
// probes // probes
REGISTER_PROBE_1 (iProbe); REGISTER_PROBE_1 (iProbe);
REGISTER_PROBE_1 (vProbe); REGISTER_PROBE_1 (vProbe);
// transmission lines // transmission lines
if (QucsSettings.DefaultSimulator == spicecompat::simQucsator) { //if (QucsSettings.DefaultSimulator == spicecompat::simQucsator) {
REGISTER_TRANS_1 (TLine); REGISTER_TRANS_1 (TLine);
REGISTER_TRANS_1 (TLine_4Port); REGISTER_TRANS_1 (TLine_4Port);
REGISTER_TRANS_1 (CoupledTLine); REGISTER_TRANS_1 (CoupledTLine);
@ -376,22 +382,22 @@ void Module::registerModules (void) {
REGISTER_TRANS_1 (CPWgap); REGISTER_TRANS_1 (CPWgap);
REGISTER_TRANS_1 (CPWstep); REGISTER_TRANS_1 (CPWstep);
REGISTER_TRANS_1 (BondWire); REGISTER_TRANS_1 (BondWire);
} else { //} else {
REGISTER_TRANS_1 (LTL_SPICE); REGISTER_TRANS_1 (LTL_SPICE);
REGISTER_TRANS_1 (LTRA_SPICE); REGISTER_TRANS_1 (LTRA_SPICE);
REGISTER_TRANS_1 (UDRCTL_SPICE); REGISTER_TRANS_1 (UDRCTL_SPICE);
} //}
// nonlinear components // nonlinear components
if (QucsSettings.DefaultSimulator == spicecompat::simQucsator) { //if (QucsSettings.DefaultSimulator == spicecompat::simQucsator) {
REGISTER_NONLINEAR_1 (Diode); REGISTER_NONLINEAR_1 (Diode);
REGISTER_NONLINEAR_2 (BJT, info, info_pnp); REGISTER_NONLINEAR_2 (BJT, info, info_pnp);
REGISTER_NONLINEAR_2 (BJTsub, info, info_pnp); REGISTER_NONLINEAR_2 (BJTsub, info, info_pnp);
REGISTER_NONLINEAR_2 (JFET, info, info_p); REGISTER_NONLINEAR_2 (JFET, info, info_p);
REGISTER_NONLINEAR_3 (MOSFET, info, info_p, info_depl); REGISTER_NONLINEAR_3 (MOSFET, info, info_p, info_depl);
REGISTER_NONLINEAR_3 (MOSFET_sub, info, info_p, info_depl); REGISTER_NONLINEAR_3 (MOSFET_sub, info, info_p, info_depl);
} else { //} else {
REGISTER_NONLINEAR_1 (DIODE_SPICE); REGISTER_NONLINEAR_1 (DIODE_SPICE);
REGISTER_NONLINEAR_1 (NPN_SPICE); REGISTER_NONLINEAR_1 (NPN_SPICE);
REGISTER_NONLINEAR_1 (PNP_SPICE); REGISTER_NONLINEAR_1 (PNP_SPICE);
@ -408,20 +414,20 @@ void Module::registerModules (void) {
REGISTER_NONLINEAR_1 (PMF_MESFET_SPICE); REGISTER_NONLINEAR_1 (PMF_MESFET_SPICE);
REGISTER_NONLINEAR_1 (S4Q_Ieqndef); REGISTER_NONLINEAR_1 (S4Q_Ieqndef);
REGISTER_NONLINEAR_1 (Src_eqndef); REGISTER_NONLINEAR_1 (Src_eqndef);
} //}
REGISTER_NONLINEAR_1 (OpAmp); REGISTER_NONLINEAR_1 (OpAmp);
REGISTER_NONLINEAR_1 (EqnDefined); REGISTER_NONLINEAR_1 (EqnDefined);
if (QucsSettings.DefaultSimulator == spicecompat::simQucsator) { //if (QucsSettings.DefaultSimulator == spicecompat::simQucsator) {
REGISTER_NONLINEAR_1 (Diac); REGISTER_NONLINEAR_1 (Diac);
REGISTER_NONLINEAR_1 (Triac); REGISTER_NONLINEAR_1 (Triac);
REGISTER_NONLINEAR_1 (Thyristor); REGISTER_NONLINEAR_1 (Thyristor);
REGISTER_NONLINEAR_1 (TunnelDiode); REGISTER_NONLINEAR_1 (TunnelDiode);
} //}
if (QucsSettings.DefaultSimulator == spicecompat::simQucsator) { //if (QucsSettings.DefaultSimulator == spicecompat::simQucsator) {
// verilog-a devices // verilog-a devices
REGISTER_VERILOGA_1 (mod_amp); REGISTER_VERILOGA_1 (mod_amp);
REGISTER_VERILOGA_1 (log_amp); REGISTER_VERILOGA_1 (log_amp);
@ -431,7 +437,7 @@ void Module::registerModules (void) {
REGISTER_VERILOGA_1 (phototransistor); REGISTER_VERILOGA_1 (phototransistor);
REGISTER_VERILOGA_1 (nigbt); REGISTER_VERILOGA_1 (nigbt);
REGISTER_VERILOGA_1 (vcresistor); REGISTER_VERILOGA_1 (vcresistor);
} //}
// digital components // digital components
REGISTER_DIGITAL_1 (Digi_Sim); REGISTER_DIGITAL_1 (Digi_Sim);
@ -481,54 +487,51 @@ void Module::registerModules (void) {
// file components // file components
REGISTER_FILE_1 (SpiceFile); REGISTER_FILE_1 (SpiceFile);
if (QucsSettings.DefaultSimulator == spicecompat::simQucsator) { //if (QucsSettings.DefaultSimulator == spicecompat::simQucsator) {
REGISTER_FILE_3 (SParamFile, info1, info2, info); REGISTER_FILE_3 (SParamFile, info1, info2, info);
} //}
REGISTER_FILE_1 (Subcircuit); REGISTER_FILE_1 (Subcircuit);
if (QucsSettings.DefaultSimulator != spicecompat::simQucsator) { //if (QucsSettings.DefaultSimulator != spicecompat::simQucsator) {
REGISTER_FILE_1 (SpiceGeneric); REGISTER_FILE_1 (SpiceGeneric);
REGISTER_FILE_1 (SpiceLibComp); REGISTER_FILE_1 (SpiceLibComp);
} //}
if ((QucsSettings.DefaultSimulator == spicecompat::simNgspice)|| //if ((QucsSettings.DefaultSimulator == spicecompat::simNgspice)|| (QucsSettings.DefaultSimulator == spicecompat::simSpiceOpus)) {
(QucsSettings.DefaultSimulator == spicecompat::simSpiceOpus)) {
REGISTER_FILE_1 (XspiceGeneric); REGISTER_FILE_1 (XspiceGeneric);
//REGISTER_FILE_1 (XSP_CMlib); //REGISTER_FILE_1 (XSP_CMlib);
//REGISTER_FILE_1 (XSP_CodeModel); //REGISTER_FILE_1 (XSP_CodeModel);
} //}
// simulations // simulations
REGISTER_SIMULATION_1 (DC_Sim); REGISTER_SIMULATION_1 (DC_Sim);
REGISTER_SIMULATION_1 (TR_Sim); REGISTER_SIMULATION_1 (TR_Sim);
REGISTER_SIMULATION_1 (AC_Sim); REGISTER_SIMULATION_1 (AC_Sim);
REGISTER_SIMULATION_1 (SP_Sim); REGISTER_SIMULATION_1 (SP_Sim);
if (QucsSettings.DefaultSimulator == spicecompat::simQucsator|| //if (QucsSettings.DefaultSimulator == spicecompat::simQucsator|| QucsSettings.DefaultSimulator == spicecompat::simXyce) {
QucsSettings.DefaultSimulator == spicecompat::simXyce) {
REGISTER_SIMULATION_1 (HB_Sim); REGISTER_SIMULATION_1 (HB_Sim);
} //}
REGISTER_SIMULATION_1 (Param_Sweep); REGISTER_SIMULATION_1 (Param_Sweep);
REGISTER_SIMULATION_1 (Digi_Sim); REGISTER_SIMULATION_1 (Digi_Sim);
if (QucsSettings.DefaultSimulator == spicecompat::simQucsator) //if (QucsSettings.DefaultSimulator == spicecompat::simQucsator)
REGISTER_SIMULATION_1 (Optimize_Sim); REGISTER_SIMULATION_1 (Optimize_Sim);
if (QucsSettings.DefaultSimulator != spicecompat::simQucsator) { //if (QucsSettings.DefaultSimulator != spicecompat::simQucsator) {
REGISTER_SIMULATION_1 (SpiceFourier); REGISTER_SIMULATION_1 (SpiceFourier);
REGISTER_SIMULATION_1 (SpiceNoise); REGISTER_SIMULATION_1 (SpiceNoise);
} //}
if (QucsSettings.DefaultSimulator == spicecompat::simNgspice || //if (QucsSettings.DefaultSimulator == spicecompat::simNgspice || QucsSettings.DefaultSimulator == spicecompat::simSpiceOpus) {
QucsSettings.DefaultSimulator == spicecompat::simSpiceOpus) {
REGISTER_SIMULATION_1 (SpiceFFT); REGISTER_SIMULATION_1 (SpiceFFT);
REGISTER_SIMULATION_1 (SpiceDisto); REGISTER_SIMULATION_1 (SpiceDisto);
REGISTER_SIMULATION_1 (SpiceCustomSim); REGISTER_SIMULATION_1 (SpiceCustomSim);
REGISTER_SIMULATION_1 (SpicePZ); REGISTER_SIMULATION_1 (SpicePZ);
REGISTER_SIMULATION_1 (SpiceSENS); REGISTER_SIMULATION_1 (SpiceSENS);
REGISTER_SIMULATION_1 (SpiceSENS_AC); REGISTER_SIMULATION_1 (SpiceSENS_AC);
} //}
if (QucsSettings.DefaultSimulator == spicecompat::simXyce) { //if (QucsSettings.DefaultSimulator == spicecompat::simXyce) {
REGISTER_SIMULATION_1 (XyceScript); REGISTER_SIMULATION_1 (XyceScript);
REGISTER_SIMULATION_1 (SpiceSENS_Xyce); REGISTER_SIMULATION_1 (SpiceSENS_Xyce);
REGISTER_SIMULATION_1 (SpiceSENS_TR_Xyce); REGISTER_SIMULATION_1 (SpiceSENS_TR_Xyce);
} //}
// diagrams // diagrams
REGISTER_DIAGRAM_1 (RectDiagram); REGISTER_DIAGRAM_1 (RectDiagram);
@ -548,12 +551,12 @@ void Module::registerModules (void) {
REGISTER_EQUATION_1 (Equation); REGISTER_EQUATION_1 (Equation);
// external simulation // external simulation
if (QucsSettings.DefaultSimulator == spicecompat::simQucsator) { //if (QucsSettings.DefaultSimulator == spicecompat::simQucsator) {
REGISTER_EXTERNAL_1 (ETR_Sim); REGISTER_EXTERNAL_1 (ETR_Sim);
REGISTER_EXTERNAL_1 (ecvs); REGISTER_EXTERNAL_1 (ecvs);
} //}
if (QucsSettings.DefaultSimulator != spicecompat::simQucsator) { //if (QucsSettings.DefaultSimulator != spicecompat::simQucsator) {
// XSPICE analogue component blocks // XSPICE analogue component blocks
REGISTER_XSPICE_1 (Icouple); REGISTER_XSPICE_1 (Icouple);
REGISTER_XSPICE_1 (core); REGISTER_XSPICE_1 (core);
@ -581,16 +584,16 @@ void Module::registerModules (void) {
// Qucs legacy devices // Qucs legacy devices
REGISTER_QUCS_2 (Resistor, info, info_us); // REGISTER_QUCS_2 (Resistor, info, info_us);
REGISTER_QUCS_1 (Capacitor); // REGISTER_QUCS_1 (Capacitor);
REGISTER_QUCS_1 (Inductor); // REGISTER_QUCS_1 (Inductor);
REGISTER_QUCS_1 (Diode); // REGISTER_QUCS_1 (Diode);
REGISTER_QUCS_2 (BJT, info, info_pnp); // REGISTER_QUCS_2 (BJT, info, info_pnp);
REGISTER_QUCS_2 (BJTsub, info, info_pnp); // REGISTER_QUCS_2 (BJTsub, info, info_pnp);
REGISTER_QUCS_2 (JFET, info, info_p); // REGISTER_QUCS_2 (JFET, info, info_p);
REGISTER_QUCS_3 (MOSFET, info, info_p, info_depl); // REGISTER_QUCS_3 (MOSFET, info, info_p, info_depl);
REGISTER_QUCS_3 (MOSFET_sub, info, info_p, info_depl); // REGISTER_QUCS_3 (MOSFET_sub, info, info_p, info_depl);
} //}
// paintings // paintings
REGISTER_PAINT_1 (GraphicLine); REGISTER_PAINT_1 (GraphicLine);
@ -609,12 +612,21 @@ void Module::unregisterModules (void) {
delete Category::Categories.takeFirst(); delete Category::Categories.takeFirst();
} }
//remove all modules by iterator, require in qhash QHash<QString, Module *>::iterator i = Modules.begin();
QHashIterator<QString, Module *> it( Modules ); while (i != Modules.end()) {
while(it.hasNext()) { if (i.value() == 0) { // test here
it.next(); i = Modules.erase(i);
delete it.value(); } else {
} ++i;
}
}
//remove all modules by iterator, require in qhash
// QHashIterator<QString, Module *> it( Modules );
// while(it.hasNext()) {
// it.next();
// delete it.value();
// }
Modules.clear (); Modules.clear ();
} }

View File

@ -714,9 +714,13 @@ QucsDoc * QucsApp::findDoc (QString File, int * Pos)
void QucsApp::fillComboBox (bool setAll) void QucsApp::fillComboBox (bool setAll)
{ {
//CompChoose->setMaxVisibleItems (13); // Increase this if you add items below. //CompChoose->setMaxVisibleItems (13); // Increase this if you add items below.
CompChoose->clear (); auto currentText = CompChoose->currentText();
CompChoose->clear();
CompSearch->clear(); // clear the search box, in case search was active... CompSearch->clear(); // clear the search box, in case search was active...
Module::registerModules ();
if (!setAll) { if (!setAll) {
CompChoose->insertItem(CompChoose->count(), QObject::tr("paintings")); CompChoose->insertItem(CompChoose->count(), QObject::tr("paintings"));
} else { } else {
@ -724,6 +728,8 @@ void QucsApp::fillComboBox (bool setAll)
for (const QString& it : cats) { for (const QString& it : cats) {
CompChoose->insertItem(CompChoose->count(), it); CompChoose->insertItem(CompChoose->count(), it);
} }
int idx = CompChoose->findText(currentText);
CompChoose->setCurrentIndex(idx = -1 ? 0 : idx);
} }
} }
@ -763,10 +769,10 @@ void QucsApp::slotChangeSimulator(int index) {
case 2: case 2:
simu = spicecompat::simXyce; simu = spicecompat::simXyce;
break; break;
case 3: case 4:
simu = spicecompat::simSpiceOpus; simu = spicecompat::simSpiceOpus;
break; break;
case 5: case 8:
simu = spicecompat::simQucsator; simu = spicecompat::simQucsator;
break; break;
default: default:
@ -777,6 +783,9 @@ void QucsApp::slotChangeSimulator(int index) {
QucsSettings.DefaultSimulator = simu; QucsSettings.DefaultSimulator = simu;
saveApplSettings(); saveApplSettings();
fillComboBox(true);
slotSetCompView(0);
simulate->setEnabled(simulatorsCombobox->currentIndex() != 0); simulate->setEnabled(simulatorsCombobox->currentIndex() != 0);
SimulatorLabel->setText(spicecompat::getDefaultSimulatorName(QucsSettings.DefaultSimulator)); SimulatorLabel->setText(spicecompat::getDefaultSimulatorName(QucsSettings.DefaultSimulator));
} }

View File

@ -27,6 +27,7 @@
BJT_SPICE::BJT_SPICE() BJT_SPICE::BJT_SPICE()
{ {
Description = QObject::tr("Q(NPN) BJT:\nMultiple line ngspice or Xyce Q model specifications allowed using \"+\" continuation lines.\nLeave continuation lines blank when NOT in use."); Description = QObject::tr("Q(NPN) BJT:\nMultiple line ngspice or Xyce Q model specifications allowed using \"+\" continuation lines.\nLeave continuation lines blank when NOT in use.");
Simulator = spicecompat::simSpice;
x1 = -30; y1 = -30; x1 = -30; y1 = -30;
x2 = 4; y2 = 30; x2 = 4; y2 = 30;

View File

@ -27,6 +27,7 @@
C_SPICE::C_SPICE() C_SPICE::C_SPICE()
{ {
Description = QObject::tr("SPICE C:\nMultiple line ngspice or Xyce C specifications allowed using \"+\" continuation lines.\nLeave continuation lines blank when NOT in use."); Description = QObject::tr("SPICE C:\nMultiple line ngspice or Xyce C specifications allowed using \"+\" continuation lines.\nLeave continuation lines blank when NOT in use.");
Simulator = spicecompat::simSpice;
Lines.append(new qucs::Line( -4,-11, -4, 11,QPen(Qt::darkRed,3))); Lines.append(new qucs::Line( -4,-11, -4, 11,QPen(Qt::darkRed,3)));
Lines.append(new qucs::Line( 4,-11, 4, 11, QPen(Qt::darkRed,3))); Lines.append(new qucs::Line( 4,-11, 4, 11, QPen(Qt::darkRed,3)));

View File

@ -27,7 +27,7 @@
DIODE_SPICE::DIODE_SPICE() DIODE_SPICE::DIODE_SPICE()
{ {
Description = QObject::tr("SPICE D:\nMultiple line ngspice or Xyce D model specifications allowed using \"+\" continuation lines.\nLeave continuation lines blank when NOT in use."); Description = QObject::tr("SPICE D:\nMultiple line ngspice or Xyce D model specifications allowed using \"+\" continuation lines.\nLeave continuation lines blank when NOT in use.");
Simulator = spicecompat::simSpice;
Lines.append(new qucs::Line(-30, 0, -20, 0,QPen(Qt::darkBlue,3))); Lines.append(new qucs::Line(-30, 0, -20, 0,QPen(Qt::darkBlue,3)));
Lines.append(new qucs::Line( -20, 0, -6, 0,QPen(Qt::darkRed,3))); Lines.append(new qucs::Line( -20, 0, -6, 0,QPen(Qt::darkRed,3)));

View File

@ -25,6 +25,7 @@
Icouple::Icouple() Icouple::Icouple()
{ {
Description = QObject::tr("XSPICE coupled inductor block:\ntwo line XSPICE specification. "); Description = QObject::tr("XSPICE coupled inductor block:\ntwo line XSPICE specification. ");
Simulator = spicecompat::simSpice;
Lines.append(new qucs::Line(-40, -40, -40, -30,QPen(Qt::darkBlue,2))); // L1 Lines.append(new qucs::Line(-40, -40, -40, -30,QPen(Qt::darkBlue,2))); // L1
Lines.append(new qucs::Line(-40, -30, -40, -25,QPen(Qt::blue,3))); // L2 Lines.append(new qucs::Line(-40, -30, -40, -25,QPen(Qt::blue,3))); // L2

View File

@ -27,6 +27,7 @@
K_SPICE::K_SPICE() K_SPICE::K_SPICE()
{ {
Description = QObject::tr("SPICE K:\nEnter the names of the coupled inductances and their coupling factor."); Description = QObject::tr("SPICE K:\nEnter the names of the coupled inductances and their coupling factor.");
Simulator = spicecompat::simSpice;
Lines.append(new qucs::Line(-10, 0, 10, 0,QPen(Qt::darkRed,3))); Lines.append(new qucs::Line(-10, 0, 10, 0,QPen(Qt::darkRed,3)));
Lines.append(new qucs::Line(-10, 0, -6, 4,QPen(Qt::darkRed,3))); Lines.append(new qucs::Line(-10, 0, -6, 4,QPen(Qt::darkRed,3)));

View File

@ -24,6 +24,7 @@
LTL_SPICE::LTL_SPICE() LTL_SPICE::LTL_SPICE()
{ {
Description = QObject::tr("SPICE T:"); Description = QObject::tr("SPICE T:");
Simulator = spicecompat::simSpice;
Arcs.append(new qucs::Arc(-28,-40, 18, 38,16*232, 16*33,QPen(Qt::darkBlue,2))); Arcs.append(new qucs::Arc(-28,-40, 18, 38,16*232, 16*33,QPen(Qt::darkBlue,2)));
Arcs.append(new qucs::Arc(-28, 2, 18, 38, 16*95, 16*33,QPen(Qt::darkBlue,2))); Arcs.append(new qucs::Arc(-28, 2, 18, 38, 16*95, 16*33,QPen(Qt::darkBlue,2)));

View File

@ -27,6 +27,7 @@
LTRA_SPICE::LTRA_SPICE() LTRA_SPICE::LTRA_SPICE()
{ {
Description = QObject::tr("SPICE O(LTRA):"); Description = QObject::tr("SPICE O(LTRA):");
Simulator = spicecompat::simSpice;
Lines.append(new qucs::Line(-60, -20,-45, -20,QPen(Qt::darkBlue,2))); Lines.append(new qucs::Line(-60, -20,-45, -20,QPen(Qt::darkBlue,2)));
Lines.append(new qucs::Line(-45, -20, 45, -20,QPen(Qt::darkRed,4))); Lines.append(new qucs::Line(-45, -20, 45, -20,QPen(Qt::darkRed,4)));

View File

@ -27,6 +27,7 @@
L_SPICE::L_SPICE() L_SPICE::L_SPICE()
{ {
Description = QObject::tr("SPICE L:\nMultiple line ngspice or Xyce L specifications allowed using \"+\" continuation lines.\nLeave continuation lines blank when NOT in use. "); Description = QObject::tr("SPICE L:\nMultiple line ngspice or Xyce L specifications allowed using \"+\" continuation lines.\nLeave continuation lines blank when NOT in use. ");
Simulator = spicecompat::simSpice;
Arcs.append(new qucs::Arc(-18, -6, 12, 12, 0, 16*180,QPen(Qt::darkRed,3))); Arcs.append(new qucs::Arc(-18, -6, 12, 12, 0, 16*180,QPen(Qt::darkRed,3)));
Arcs.append(new qucs::Arc( -6, -6, 12, 12, 0, 16*180,QPen(Qt::darkRed,3))); Arcs.append(new qucs::Arc( -6, -6, 12, 12, 0, 16*180,QPen(Qt::darkRed,3)));

View File

@ -27,6 +27,7 @@
MESFET_SPICE::MESFET_SPICE() MESFET_SPICE::MESFET_SPICE()
{ {
Description = QObject::tr("Z(NMF) MESFET:\nMultiple line ngspice or Xyce Z model specifications allowed using \"+\" continuation lines.\nLeave continuation lines blank when NOT in use."); Description = QObject::tr("Z(NMF) MESFET:\nMultiple line ngspice or Xyce Z model specifications allowed using \"+\" continuation lines.\nLeave continuation lines blank when NOT in use.");
Simulator = spicecompat::simSpice;
Lines.append(new qucs::Line(-10,-15,-10, 15,QPen(Qt::darkRed,3))); Lines.append(new qucs::Line(-10,-15,-10, 15,QPen(Qt::darkRed,3)));
Lines.append(new qucs::Line(-30, 0,-10, 0,QPen(Qt::darkRed,3))); Lines.append(new qucs::Line(-30, 0,-10, 0,QPen(Qt::darkRed,3)));

View File

@ -27,6 +27,7 @@
MOS_SPICE::MOS_SPICE() MOS_SPICE::MOS_SPICE()
{ {
Description = QObject::tr("Unified (M,X,3-,4-pin) MOS:\nMultiple line ngspice or Xyce M model specifications allowed using \"+\" continuation lines.\nLeave continuation lines blank when NOT in use."); Description = QObject::tr("Unified (M,X,3-,4-pin) MOS:\nMultiple line ngspice or Xyce M model specifications allowed using \"+\" continuation lines.\nLeave continuation lines blank when NOT in use.");
Simulator = spicecompat::simSpice;
Props.append(new Property("Letter", "M", true,"[M,X] SPICE letter")); Props.append(new Property("Letter", "M", true,"[M,X] SPICE letter"));
Props.append(new Property("Pins", "4", true,"[3,4] Pins count")); Props.append(new Property("Pins", "4", true,"[3,4] Pins count"));

View File

@ -27,6 +27,8 @@
NJF_SPICE::NJF_SPICE() NJF_SPICE::NJF_SPICE()
{ {
Description = QObject::tr("J(NJF) JFET:\nMultiple line ngspice or Xyce J model specifications allowed using \"+\" continuation lines.\nLeave continuation lines blank when NOT in use."); Description = QObject::tr("J(NJF) JFET:\nMultiple line ngspice or Xyce J model specifications allowed using \"+\" continuation lines.\nLeave continuation lines blank when NOT in use.");
Simulator = spicecompat::simSpice;
Lines.append(new qucs::Line(-10,-15,-10, 15,QPen(Qt::darkRed,3))); Lines.append(new qucs::Line(-10,-15,-10, 15,QPen(Qt::darkRed,3)));
Lines.append(new qucs::Line(-30, 0,-20, 0,QPen(Qt::darkBlue,3))); Lines.append(new qucs::Line(-30, 0,-20, 0,QPen(Qt::darkBlue,3)));

View File

@ -27,6 +27,7 @@
NMOS_SPICE::NMOS_SPICE() NMOS_SPICE::NMOS_SPICE()
{ {
Description = QObject::tr("M(NMOS) MOS:\nMultiple line ngspice or Xyce M model specifications allowed using \"+\" continuation lines.\nLeave continuation lines blank when NOT in use."); Description = QObject::tr("M(NMOS) MOS:\nMultiple line ngspice or Xyce M model specifications allowed using \"+\" continuation lines.\nLeave continuation lines blank when NOT in use.");
Simulator = spicecompat::simSpice;
Lines.append(new qucs::Line(-14,-13,-14, 13,QPen(Qt::darkRed,2))); Lines.append(new qucs::Line(-14,-13,-14, 13,QPen(Qt::darkRed,2)));

View File

@ -27,6 +27,7 @@
NPN_SPICE::NPN_SPICE() NPN_SPICE::NPN_SPICE()
{ {
Description = QObject::tr("Q(NPN) BJT:\nMultiple line ngspice or Xyce Q model specifications allowed using \"+\" continuation lines.\nLeave continuation lines blank when NOT in use."); Description = QObject::tr("Q(NPN) BJT:\nMultiple line ngspice or Xyce Q model specifications allowed using \"+\" continuation lines.\nLeave continuation lines blank when NOT in use.");
Simulator = spicecompat::simSpice;
Lines.append(new qucs::Line(-10,-15,-10, 15,QPen(Qt::darkRed,3))); Lines.append(new qucs::Line(-10,-15,-10, 15,QPen(Qt::darkRed,3)));

View File

@ -27,6 +27,8 @@
PJF_SPICE::PJF_SPICE() PJF_SPICE::PJF_SPICE()
{ {
Description = QObject::tr("J(PJF) JFET:\nMultiple line ngspice or Xyce J model specifications allowed using \"+\" continuation lines.\nLeave continuation lines blank when NOT in use."); Description = QObject::tr("J(PJF) JFET:\nMultiple line ngspice or Xyce J model specifications allowed using \"+\" continuation lines.\nLeave continuation lines blank when NOT in use.");
Simulator = spicecompat::simSpice;
Lines.append(new qucs::Line(-10,-15,-10, 15,QPen(Qt::darkRed,3))); Lines.append(new qucs::Line(-10,-15,-10, 15,QPen(Qt::darkRed,3)));
Lines.append(new qucs::Line(-30, 0,-20, 0,QPen(Qt::darkBlue,3))); Lines.append(new qucs::Line(-30, 0,-20, 0,QPen(Qt::darkBlue,3)));

View File

@ -27,6 +27,7 @@
PMF_MESFET_SPICE::PMF_MESFET_SPICE() PMF_MESFET_SPICE::PMF_MESFET_SPICE()
{ {
Description = QObject::tr("Z(PMF) MESFET:\nMultiple line ngspice or Xyce Z model specifications allowed using \"+\" continuation lines.\nLeave continuation lines blank when NOT in use."); Description = QObject::tr("Z(PMF) MESFET:\nMultiple line ngspice or Xyce Z model specifications allowed using \"+\" continuation lines.\nLeave continuation lines blank when NOT in use.");
Simulator = spicecompat::simSpice;
Lines.append(new qucs::Line(-10,-15,-10, 15,QPen(Qt::darkRed,3))); Lines.append(new qucs::Line(-10,-15,-10, 15,QPen(Qt::darkRed,3)));
Lines.append(new qucs::Line(-30, 0,-10, 0,QPen(Qt::darkRed,3))); Lines.append(new qucs::Line(-30, 0,-10, 0,QPen(Qt::darkRed,3)));

View File

@ -27,6 +27,7 @@
PMOS_SPICE::PMOS_SPICE() PMOS_SPICE::PMOS_SPICE()
{ {
Description = QObject::tr("M(PMOS) MOS:\nMultiple line ngspice or Xyce M model specifications allowed using \"+\" continuation lines.\nLeave continuation lines blank when NOT in use."); Description = QObject::tr("M(PMOS) MOS:\nMultiple line ngspice or Xyce M model specifications allowed using \"+\" continuation lines.\nLeave continuation lines blank when NOT in use.");
Simulator = spicecompat::simSpice;
Lines.append(new qucs::Line(-14,-13,-14, 13,QPen(Qt::darkRed,2))); Lines.append(new qucs::Line(-14,-13,-14, 13,QPen(Qt::darkRed,2)));

View File

@ -27,6 +27,7 @@
PNP_SPICE::PNP_SPICE() PNP_SPICE::PNP_SPICE()
{ {
Description = QObject::tr("Q(PNP) BJT:\nMultiple line ngspice or Xyce Q model specifications allowed using \"+\" continuation lines.\nLeave continuation lines blank when NOT in use."); Description = QObject::tr("Q(PNP) BJT:\nMultiple line ngspice or Xyce Q model specifications allowed using \"+\" continuation lines.\nLeave continuation lines blank when NOT in use.");
Simulator = spicecompat::simSpice;
Lines.append(new qucs::Line(-10,-15,-10, 15,QPen(Qt::darkRed,3))); Lines.append(new qucs::Line(-10,-15,-10, 15,QPen(Qt::darkRed,3)));

View File

@ -27,6 +27,7 @@
R_SPICE::R_SPICE() R_SPICE::R_SPICE()
{ {
Description = QObject::tr("SPICE R:\nMultiple line ngspice or Xyce R specifications allowed using \"+\" continuation lines.\nLeave continuation lines blank when NOT in use. "); Description = QObject::tr("SPICE R:\nMultiple line ngspice or Xyce R specifications allowed using \"+\" continuation lines.\nLeave continuation lines blank when NOT in use. ");
Simulator = spicecompat::simSpice;
Lines.append(new qucs::Line(-18, -9, 18, -9,QPen(Qt::darkRed,3))); Lines.append(new qucs::Line(-18, -9, 18, -9,QPen(Qt::darkRed,3)));
Lines.append(new qucs::Line( 18, -9, 18, 9,QPen(Qt::darkRed,3))); Lines.append(new qucs::Line( 18, -9, 18, 9,QPen(Qt::darkRed,3)));

View File

@ -28,6 +28,7 @@
S4Q_I::S4Q_I() S4Q_I::S4Q_I()
{ {
Description = QObject::tr("SPICE I:\nMultiple line ngspice or Xyce I specifications allowed using \"+\" continuation lines.\nLeave continuation lines blank when NOT in use. "); Description = QObject::tr("SPICE I:\nMultiple line ngspice or Xyce I specifications allowed using \"+\" continuation lines.\nLeave continuation lines blank when NOT in use. ");
Simulator = spicecompat::simSpice;
Arcs.append(new qucs::Arc(-14,-14, 28, 28, 0, 16*360,QPen(Qt::darkRed,3))); Arcs.append(new qucs::Arc(-14,-14, 28, 28, 0, 16*360,QPen(Qt::darkRed,3)));

View File

@ -23,7 +23,8 @@
S4Q_Ieqndef::S4Q_Ieqndef() S4Q_Ieqndef::S4Q_Ieqndef()
{ {
Description = QObject::tr("SPICE B (I type):\nMultiple line ngspice or Xyce B specifications allowed using \"+\" continuation lines.\nLeave continuation lines blank when NOT in use. "); Description = QObject::tr("SPICE B (I type):\nMultiple line ngspice or Xyce B specifications allowed using \"+\" continuation lines.\nLeave continuation lines blank when NOT in use. ");
Simulator = spicecompat::simSpice;
Arcs.append(new qucs::Arc(-14,-14, 28, 28, 0, 16*360,QPen(Qt::darkRed,3))); Arcs.append(new qucs::Arc(-14,-14, 28, 28, 0, 16*360,QPen(Qt::darkRed,3)));

View File

@ -27,6 +27,7 @@
S4Q_S::S4Q_S() S4Q_S::S4Q_S()
{ {
Description = QObject::tr("SPICE S:\nMultiple line ngspice or Xyce S specifications allowed using \"+\" continuation lines.\nLeave continuation lines blank when NOT in use. "); Description = QObject::tr("SPICE S:\nMultiple line ngspice or Xyce S specifications allowed using \"+\" continuation lines.\nLeave continuation lines blank when NOT in use. ");
Simulator = spicecompat::simSpice;
Lines.append(new qucs::Line(-15, -15, -15, 15,QPen(Qt::darkRed,3))); Lines.append(new qucs::Line(-15, -15, -15, 15,QPen(Qt::darkRed,3)));
Lines.append(new qucs::Line(-15, 15, 15, 15,QPen(Qt::darkRed,3))); Lines.append(new qucs::Line(-15, 15, 15, 15,QPen(Qt::darkRed,3)));

View File

@ -28,6 +28,7 @@
S4Q_V::S4Q_V() S4Q_V::S4Q_V()
{ {
Description = QObject::tr("SPICE V:\nMultiple line ngspice or Xyce V specifications allowed using \"+\" continuation lines.\nLeave continuation lines blank when NOT in use. "); Description = QObject::tr("SPICE V:\nMultiple line ngspice or Xyce V specifications allowed using \"+\" continuation lines.\nLeave continuation lines blank when NOT in use. ");
Simulator = spicecompat::simSpice;
Arcs.append(new qucs::Arc(-12,-12, 24, 24, 0, 16*360,QPen(Qt::darkRed,3))); Arcs.append(new qucs::Arc(-12,-12, 24, 24, 0, 16*360,QPen(Qt::darkRed,3)));

Some files were not shown because too many files have changed in this diff Show More