Qucs-GUI  0.0.18
 All Data Structures 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(Qt::darkBlue,2)));
26  Lines.append(new Line(-30, 8,-30, 30,QPen(Qt::darkBlue,2)));
27  Lines.append(new Line(-45, -8,-15, -8,QPen(Qt::darkBlue,2)));
28  Lines.append(new Line(-45, 8,-15, 8,QPen(Qt::darkBlue,2)));
29  Lines.append(new Line(-45, -8,-45, 8,QPen(Qt::darkBlue,2)));
30  Lines.append(new Line(-15, -8,-15, 8,QPen(Qt::darkBlue,2)));
31  Lines.append(new Line(-45, 8,-15, -8,QPen(Qt::darkBlue,2)));
32 
33  Lines.append(new Line(-43, -3,-37, -3,QPen(Qt::red,1)));
34  Lines.append(new Line(-40, -6,-40, 0,QPen(Qt::red,1)));
35  Lines.append(new Line(-23, 3,-17, 3,QPen(Qt::black,1)));
36 
37  Lines.append(new Line(-15, 0, 35, 0,QPen(Qt::darkBlue,1,Qt::DotLine)));
38 
39  Lines.append(new Line( 30,-30, 30,-18,QPen(Qt::darkBlue,2)));
40  Lines.append(new Line( 30, 15, 30, 30,QPen(Qt::darkBlue,2)));
41  Lines.append(new Line( 30, 15, 45,-15,QPen(Qt::darkBlue,2)));
42  Arcs.append(new Arc( 27,-18, 5, 5, 0, 16*360,QPen(Qt::darkBlue,2)));
43  Ellips.append(new Area( 27, 12, 6, 6, QPen(Qt::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 }
Q3PtrList< Line > Lines
Definition: component.h:67
Definition: element.h:55
int y1
Definition: element.h:153
Q3PtrList< struct Arc > Arcs
Definition: component.h:68
int tx
Definition: component.h:78
int y2
Definition: element.h:153
Definition: element.h:72
int x1
Definition: element.h:153
Component * newOne()
Definition: relais.cpp:75
~Relais()
Definition: relais.cpp:71
int ty
Definition: component.h:78
static Element * info(QString &, char *&, bool getNewOne=false)
Definition: relais.cpp:80
Q3PtrList< Property > Props
Definition: component.h:72
Relais()
Definition: relais.cpp:21
Definition: element.h:63
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
Q3PtrList< Area > Ellips
Definition: component.h:69
int x2
Definition: element.h:153