My Project  0.0.16
QUCS Mapping
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
tline_4port.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  tline_4port.cpp
3  -----------------
4  begin : Nov 12 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 "tline_4port.h"
19 
20 
22 {
23  Description = QObject::tr("ideal 4-terminal transmission line");
24 
25  Arcs.append(new Arc(-28,-40, 18, 38,16*232, 16*33,QPen(QPen::darkBlue,1)));
26  Arcs.append(new Arc(-28, 2, 18, 38, 16*95, 16*33,QPen(QPen::darkBlue,1)));
27 
28  Lines.append(new Line(-20,-2, 20,-2,QPen(QPen::darkBlue,2)));
29  Lines.append(new Line(-20, 2, 20, 2,QPen(QPen::darkBlue,2)));
30 
31  Arcs.append(new Arc( 10,-40, 18, 38,16*270, 16*40,QPen(QPen::darkBlue,1)));
32  Arcs.append(new Arc( 10, 2, 18, 38, 16*50, 16*40,QPen(QPen::darkBlue,1)));
33 
34  Arcs.append(new Arc(-38,-10, 16, 28, 16*45, 16*45,QPen(QPen::darkBlue,1)));
35  Arcs.append(new Arc(-38,-18, 16, 28,16*270, 16*45,QPen(QPen::darkBlue,1)));
36  Arcs.append(new Arc( 22,-10, 16, 28, 16*90, 16*45,QPen(QPen::darkBlue,1)));
37  Arcs.append(new Arc( 22,-18, 16, 28,16*225, 16*45,QPen(QPen::darkBlue,1)));
38 
39  Ports.append(new Port(-30,-10));
40  Ports.append(new Port( 30,-10));
41  Ports.append(new Port( 30, 10));
42  Ports.append(new Port(-30, 10));
43 
44  x1 = -30; y1 =-12;
45  x2 = 30; y2 = 12;
46 
47  tx = x1+4;
48  ty = y2+4;
49  Model = "TLIN4P";
50  Name = "Line";
51 
52  Props.append(new Property("Z", "50 Ohm", true,
53  QObject::tr("characteristic impedance")));
54  Props.append(new Property("L", "1 mm", true,
55  QObject::tr("electrical length of the line")));
56  Props.append(new Property("Alpha", "0 dB", false,
57  QObject::tr("attenuation factor per length in 1/m")));
58  Props.append(new Property("Temp", "26.85", false,
59  QObject::tr("simulation temperature in degree Celsius")));
60 }
61 
63 {
64 }
65 
67 {
68  return new TLine_4Port();
69 }
70 
71 Element* TLine_4Port::info(QString& Name, char* &BitmapFile, bool getNewOne)
72 {
73  Name = QObject::tr("4-Terminal Transmission Line");
74  BitmapFile = (char *) "tline_4port";
75 
76  if(getNewOne) return new TLine_4Port();
77  return 0;
78 }