Qucs-GUI  0.0.18
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
triac.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  triac.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 "triac.h"
19 
20 
22 {
23  Description = QObject::tr("triac (bidirectional thyristor)");
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  Lines.append(new Line(-13, 10, -9, 6,QPen(Qt::darkBlue,2)));
36  Lines.append(new Line(-30, 10,-13, 10,QPen(Qt::darkBlue,2)));
37 
38  Ports.append(new Port( 0,-30));
39  Ports.append(new Port( 0, 30));
40  Ports.append(new Port(-30, 10));
41 
42  x1 = -30; y1 = -30;
43  x2 = 20; y2 = 30;
44 
45  tx = x2+4;
46  ty = y1+4;
47  Model = "Triac";
48  Name = "D";
49 
50  Props.append(new Property("Vbo", "400 V", false,
51  QObject::tr("(bidirectional) breakover voltage")));
52  Props.append(new Property("Igt", "50 uA", true,
53  QObject::tr("(bidirectional) gate trigger current")));
54  Props.append(new Property("Cj0", "10 pF", false,
55  QObject::tr("parasitic capacitance")));
56  Props.append(new Property("Is", "1e-10 A", false,
57  QObject::tr("saturation current")));
58  Props.append(new Property("N", "2", false,
59  QObject::tr("emission coefficient")));
60  Props.append(new Property("Ri", "10 Ohm", false,
61  QObject::tr("intrinsic junction resistance")));
62  Props.append(new Property("Rg", "5 Ohm", false,
63  QObject::tr("gate resistance")));
64  Props.append(new Property("Temp", "26.85", false,
65  QObject::tr("simulation temperature")));
66 }
67 
69 {
70  return new Triac();
71 }
72 
73 Element* Triac::info(QString& Name, char* &BitmapFile, bool getNewOne)
74 {
75  Name = QObject::tr("Triac");
76  BitmapFile = (char *) "triac";
77 
78  if(getNewOne) return new Triac();
79  return 0;
80 }
Q3PtrList< Line > Lines
Definition: component.h:67
static Element * info(QString &, char *&, bool getNewOne=false)
Definition: triac.cpp:73
int y1
Definition: element.h:153
int tx
Definition: component.h:78
int y2
Definition: element.h:153
Definition: element.h:72
int x1
Definition: element.h:153
int ty
Definition: component.h:78
Q3PtrList< Property > Props
Definition: component.h:72
Triac()
Definition: triac.cpp:21
Definition: element.h:48
Superclass of all schematic drawing elements.
Definition: element.h:142
Q3PtrList< Port > Ports
Definition: component.h:70
QString Name
Definition: component.h:80
QString Model
Definition: component.h:80
QString Description
Definition: component.h:81
Component * newOne()
Definition: triac.cpp:68
int x2
Definition: element.h:153