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