My Project  0.0.16
QUCS Mapping
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
diac.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  diac.cpp
3  ----------
4  begin : Sun Dec 23 2007
5  copyright : (C) 2007 by Michael Margraf
6  email : michael.margraf@alumni.tu-berlin.de
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #include "diac.h"
19 
20 
22 {
23  Description = QObject::tr("diac (bidirectional trigger diode)");
24 
25  Lines.append(new Line( 0,-30, 0, -6,QPen(Qt::darkBlue,2)));
26  Lines.append(new Line( 0, 30, 0, 6,QPen(Qt::darkBlue,2)));
27 
28  Lines.append(new Line(-18, 6, 18, 6,QPen(Qt::darkBlue,2)));
29  Lines.append(new Line(-18, -6, 18, -6,QPen(Qt::darkBlue,2)));
30  Lines.append(new Line( -9, 6,-18, -6,QPen(Qt::darkBlue,2)));
31  Lines.append(new Line( -9, 6, 0, -6,QPen(Qt::darkBlue,2)));
32  Lines.append(new Line( 9, -6, 0, 6,QPen(Qt::darkBlue,2)));
33  Lines.append(new Line( 9, -6, 18, 6,QPen(Qt::darkBlue,2)));
34 
35  Ports.append(new Port( 0,-30));
36  Ports.append(new Port( 0, 30));
37 
38  x1 = -20; y1 = -30;
39  x2 = 20; y2 = 30;
40 
41  tx = x2+4;
42  ty = y1+4;
43  Model = "Diac";
44  Name = "D";
45 
46  Props.append(new Property("Vbo", "30 V", true,
47  QObject::tr("(bidirectional) breakover voltage")));
48  Props.append(new Property("Ibo", "50 uA", false,
49  QObject::tr("(bidirectional) breakover current")));
50  Props.append(new Property("Cj0", "10 pF", false,
51  QObject::tr("parasitic capacitance")));
52  Props.append(new Property("Is", "1e-10 A", false,
53  QObject::tr("saturation current")));
54  Props.append(new Property("N", "2", false,
55  QObject::tr("emission coefficient")));
56  Props.append(new Property("Ri", "10 Ohm", false,
57  QObject::tr("intrinsic junction resistance")));
58  Props.append(new Property("Temp", "26.85", false,
59  QObject::tr("simulation temperature")));
60 }
61 
63 {
64  return new Diac();
65 }
66 
67 Element* Diac::info(QString& Name, char* &BitmapFile, bool getNewOne)
68 {
69  Name = QObject::tr("Diac");
70  BitmapFile = (char *) "diac";
71 
72  if(getNewOne) return new Diac();
73  return 0;
74 }