Qucs-GUI
0.0.19
|
00001 /*************************************************************************** 00002 diac.cpp 00003 ---------- 00004 begin : Sun Dec 23 2007 00005 copyright : (C) 2007 by Michael Margraf 00006 email : michael.margraf@alumni.tu-berlin.de 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 00018 #include "diac.h" 00019 00020 00021 Diac::Diac() 00022 { 00023 Description = QObject::tr("diac (bidirectional trigger diode)"); 00024 00025 Lines.append(new Line( 0,-30, 0, -6,QPen(Qt::darkBlue,2))); 00026 Lines.append(new Line( 0, 30, 0, 6,QPen(Qt::darkBlue,2))); 00027 00028 Lines.append(new Line(-18, 6, 18, 6,QPen(Qt::darkBlue,2))); 00029 Lines.append(new Line(-18, -6, 18, -6,QPen(Qt::darkBlue,2))); 00030 Lines.append(new Line( -9, 6,-18, -6,QPen(Qt::darkBlue,2))); 00031 Lines.append(new Line( -9, 6, 0, -6,QPen(Qt::darkBlue,2))); 00032 Lines.append(new Line( 9, -6, 0, 6,QPen(Qt::darkBlue,2))); 00033 Lines.append(new Line( 9, -6, 18, 6,QPen(Qt::darkBlue,2))); 00034 00035 Ports.append(new Port( 0,-30)); 00036 Ports.append(new Port( 0, 30)); 00037 00038 x1 = -20; y1 = -30; 00039 x2 = 20; y2 = 30; 00040 00041 tx = x2+4; 00042 ty = y1+4; 00043 Model = "Diac"; 00044 Name = "D"; 00045 00046 Props.append(new Property("Vbo", "30 V", true, 00047 QObject::tr("(bidirectional) breakover voltage"))); 00048 Props.append(new Property("Ibo", "50 uA", false, 00049 QObject::tr("(bidirectional) breakover current"))); 00050 Props.append(new Property("Cj0", "10 pF", false, 00051 QObject::tr("parasitic capacitance"))); 00052 Props.append(new Property("Is", "1e-10 A", false, 00053 QObject::tr("saturation current"))); 00054 Props.append(new Property("N", "2", false, 00055 QObject::tr("emission coefficient"))); 00056 Props.append(new Property("Ri", "10 Ohm", false, 00057 QObject::tr("intrinsic junction resistance"))); 00058 Props.append(new Property("Temp", "26.85", false, 00059 QObject::tr("simulation temperature"))); 00060 } 00061 00062 Component* Diac::newOne() 00063 { 00064 return new Diac(); 00065 } 00066 00067 Element* Diac::info(QString& Name, char* &BitmapFile, bool getNewOne) 00068 { 00069 Name = QObject::tr("Diac"); 00070 BitmapFile = (char *) "diac"; 00071 00072 if(getNewOne) return new Diac(); 00073 return 0; 00074 }