My Project  0.0.16
QUCS Mapping
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
isolator.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  isolator.cpp - description
3  -------------------
4  begin : Sat Aug 23 2003
5  copyright : (C) 2003 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 "isolator.h"
19 
20 
22 {
23  Description = QObject::tr("isolator");
24 
25  Lines.append(new Line( -8, 0, 8, 0,QPen(QPen::darkBlue,3)));
26  Lines.append(new Line( 8, 0, 0, -5,QPen(QPen::darkBlue,3)));
27  Lines.append(new Line( 8, 0, 0, 5,QPen(QPen::darkBlue,3)));
28 
29  Lines.append(new Line(-14,-14, 14,-14,QPen(QPen::darkBlue,2)));
30  Lines.append(new Line(-14, 14, 14, 14,QPen(QPen::darkBlue,2)));
31  Lines.append(new Line(-14,-14,-14, 14,QPen(QPen::darkBlue,2)));
32  Lines.append(new Line( 14,-14, 14, 14,QPen(QPen::darkBlue,2)));
33 
34  Lines.append(new Line(-30, 0,-14, 0,QPen(QPen::darkBlue,2)));
35  Lines.append(new Line( 14, 0, 30, 0,QPen(QPen::darkBlue,2)));
36 
37  Ports.append(new Port(-30, 0));
38  Ports.append(new Port( 30, 0));
39 
40  x1 = -30; y1 = -17;
41  x2 = 30; y2 = 17;
42 
43  tx = x1+4;
44  ty = y2+4;
45  Model = "Isolator";
46  Name = "X";
47 
48  Props.append(new Property("Z1", "50 Ohm", false,
49  QObject::tr("reference impedance of input port")));
50  Props.append(new Property("Z2", "50 Ohm", false,
51  QObject::tr("reference impedance of output port")));
52  Props.append(new Property("Temp", "26.85", false,
53  QObject::tr("simulation temperature in degree Celsius")));
54 }
55 
57 {
58 }
59 
61 {
62  return new Isolator();
63 }
64 
65 Element* Isolator::info(QString& Name, char* &BitmapFile, bool getNewOne)
66 {
67  Name = QObject::tr("Isolator");
68  BitmapFile = (char *) "isolator";
69 
70  if(getNewOne) return new Isolator();
71  return 0;
72 }