Qucs-GUI  0.0.18
 All Data Structures 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(Qt::darkBlue,2)));
26  Lines.append(new Line(-28, 7, 28, 7,QPen(Qt::darkBlue,2)));
27 
28  Lines.append(new Line(-28, 14,-21, 7,QPen(Qt::darkBlue,2)));
29  Lines.append(new Line(-21, 14,-14, 7,QPen(Qt::darkBlue,2)));
30  Lines.append(new Line(-14, 14, -7, 7,QPen(Qt::darkBlue,2)));
31  Lines.append(new Line( -7, 14, 0, 7,QPen(Qt::darkBlue,2)));
32  Lines.append(new Line( 0, 14, 7, 7,QPen(Qt::darkBlue,2)));
33  Lines.append(new Line( 7, 14, 14, 7,QPen(Qt::darkBlue,2)));
34  Lines.append(new Line( 14, 14, 21, 7,QPen(Qt::darkBlue,2)));
35  Lines.append(new Line( 21, 14, 28, 7,QPen(Qt::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 }
Q3PtrList< Line > Lines
Definition: component.h:67
int y1
Definition: element.h:153
int tx
Definition: component.h:78
int y2
Definition: element.h:153
Definition: element.h:72
int x1
Definition: element.h:153
int ty
Definition: component.h:78
Q3PtrList< Property > Props
Definition: component.h:72
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
static Element * info(QString &, char *&, bool getNewOne=false)
Definition: tline.cpp:67
Component * newOne()
Definition: tline.cpp:62
int x2
Definition: element.h:153
~TLine()
Definition: tline.cpp:58
TLine()
Definition: tline.cpp:21