My Project  0.0.16
QUCS Mapping
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
relais.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  relais.cpp
3  ------------
4  begin : Sat Feb 25 2006
5  copyright : (C) 2006 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 "relais.h"
19 
20 
22 {
23  Description = QObject::tr("relay");
24 
25  Lines.append(new Line(-30,-30,-30, -8,QPen(QPen::darkBlue,2)));
26  Lines.append(new Line(-30, 8,-30, 30,QPen(QPen::darkBlue,2)));
27  Lines.append(new Line(-45, -8,-15, -8,QPen(QPen::darkBlue,2)));
28  Lines.append(new Line(-45, 8,-15, 8,QPen(QPen::darkBlue,2)));
29  Lines.append(new Line(-45, -8,-45, 8,QPen(QPen::darkBlue,2)));
30  Lines.append(new Line(-15, -8,-15, 8,QPen(QPen::darkBlue,2)));
31  Lines.append(new Line(-45, 8,-15, -8,QPen(QPen::darkBlue,2)));
32 
33  Lines.append(new Line(-43, -3,-37, -3,QPen(QPen::red,1)));
34  Lines.append(new Line(-40, -6,-40, 0,QPen(QPen::red,1)));
35  Lines.append(new Line(-23, 3,-17, 3,QPen(QPen::black,1)));
36 
37  Lines.append(new Line(-15, 0, 35, 0,QPen(QPen::darkBlue,1,Qt::DotLine)));
38 
39  Lines.append(new Line( 30,-30, 30,-18,QPen(QPen::darkBlue,2)));
40  Lines.append(new Line( 30, 15, 30, 30,QPen(QPen::darkBlue,2)));
41  Lines.append(new Line( 30, 15, 45,-15,QPen(QPen::darkBlue,2)));
42  Arcs.append(new Arc( 27,-18, 5, 5, 0, 16*360,QPen(QPen::darkBlue,2)));
43  Ellips.append(new Area( 27, 12, 6, 6, QPen(QPen::darkBlue,2),
44  QBrush(Qt::darkBlue, Qt::SolidPattern)));
45 
46  Ports.append(new Port(-30,-30));
47  Ports.append(new Port( 30,-30));
48  Ports.append(new Port( 30, 30));
49  Ports.append(new Port(-30, 30));
50 
51  x1 = -48; y1 = -30;
52  x2 = 45; y2 = 30;
53 
54  tx = x2+4;
55  ty = y1+4;
56  Model = "Relais";
57  Name = "S";
58 
59  Props.append(new Property("Vt", "0.5 V", false,
60  QObject::tr("threshold voltage in Volts")));
61  Props.append(new Property("Vh", "0.1 V", false,
62  QObject::tr("hysteresis voltage in Volts")));
63  Props.append(new Property("Ron", "0", false,
64  QObject::tr("resistance of \"on\" state in Ohms")));
65  Props.append(new Property("Roff", "1e12", false,
66  QObject::tr("resistance of \"off\" state in Ohms")));
67  Props.append(new Property("Temp", "26.85", false,
68  QObject::tr("simulation temperature in degree Celsius")));
69 }
70 
72 {
73 }
74 
76 {
77  return new Relais();
78 }
79 
80 Element* Relais::info(QString& Name, char* &BitmapFile, bool getNewOne)
81 {
82  Name = QObject::tr("Relay");
83  BitmapFile = (char *) "relais";
84 
85  if(getNewOne) return new Relais();
86  return 0;
87 }