Qucs-GUI  0.0.18
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ctline.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  copyright : (C) 2010 by Michael Margraf
3  email : michael.margraf@alumni.tu-berlin.de
4  ***************************************************************************/
5 
6 /***************************************************************************
7  * *
8  * This program is free software; you can redistribute it and/or modify *
9  * it under the terms of the GNU General Public License as published by *
10  * the Free Software Foundation; either version 2 of the License, or *
11  * (at your option) any later version. *
12  * *
13  ***************************************************************************/
14 
15 #include "ctline.h"
16 
18 {
19  Description = QObject::tr("coupled transmission lines");
20 
21  Arcs.append(new Arc(-28,-40, 18, 38,16*232, 16*33,QPen(Qt::darkBlue,2)));
22  Arcs.append(new Arc(-28, 2, 18, 38, 16*95, 16*33,QPen(Qt::darkBlue,2)));
23 
24  Lines.append(new Line(-20,-2,-16,-2,QPen(Qt::darkBlue,2)));
25  Lines.append(new Line(-20, 2,-16, 2,QPen(Qt::darkBlue,2)));
26 
27  Arcs.append(new Arc( 10,-40, 18, 38,16*270, 16*40,QPen(Qt::darkBlue,2)));
28  Arcs.append(new Arc( 10, 2, 18, 38, 16*50, 16*40,QPen(Qt::darkBlue,2)));
29 
30  Arcs.append(new Arc(-38,-10, 16, 28, 16*45, 16*45,QPen(Qt::darkBlue,2)));
31  Arcs.append(new Arc(-38,-18, 16, 28,16*270, 16*45,QPen(Qt::darkBlue,2)));
32  Arcs.append(new Arc( 22,-10, 16, 28, 16*90, 16*45,QPen(Qt::darkBlue,2)));
33  Arcs.append(new Arc( 22,-18, 16, 28,16*225, 16*45,QPen(Qt::darkBlue,2)));
34 
35  // shield
36  Arcs.append(new Arc(-20, -9, 8, 18, 0, 16*360,QPen(Qt::darkBlue,2)));
37  Arcs.append(new Arc( 11, -9, 8, 18,16*270, 16*180,QPen(Qt::darkBlue,2)));
38  Lines.append(new Line(-16, -9, 16, -9,QPen(Qt::darkBlue,2)));
39  Lines.append(new Line(-16, 9, 16, 9,QPen(Qt::darkBlue,2)));
40 
41  Ports.append(new Port(-30,-10));
42  Ports.append(new Port( 30,-10));
43  Ports.append(new Port( 30, 10));
44  Ports.append(new Port(-30, 10));
45 
46  x1 = -30; y1 =-12;
47  x2 = 30; y2 = 12;
48 
49  tx = x1+4;
50  ty = y2+4;
51  Model = "CTLIN";
52  Name = "Line";
53 
54  Props.append(new Property("Ze", "50 Ohm", true,
55  QObject::tr("characteristic impedance of even mode")));
56  Props.append(new Property("Zo", "50 Ohm", true,
57  QObject::tr("characteristic impedance of odd mode")));
58  Props.append(new Property("L", "1 mm", true,
59  QObject::tr("electrical length of the line")));
60  Props.append(new Property("Ere", "1", false,
61  QObject::tr("relative dielectric constant of even mode")));
62  Props.append(new Property("Ero", "1", false,
63  QObject::tr("relative dielectric constant of odd mode")));
64  Props.append(new Property("Ae", "0 dB", false,
65  QObject::tr("attenuation factor per length of even mode")));
66  Props.append(new Property("Ao", "0 dB", false,
67  QObject::tr("attenuation factor per length of odd mode")));
68  Props.append(new Property("Temp", "26.85", false,
69  QObject::tr("simulation temperature in degree Celsius")));
70 }
71 
72 
73 // -------------------------------------------------------------------
75 {
76  return new CoupledTLine();
77 }
78 
79 Element* CoupledTLine::info(QString& Name, char* &BitmapFile, bool getNewOne)
80 {
81  Name = QObject::tr("Coupled Transmission Line");
82  BitmapFile = (char *) "ctline";
83 
84  if(getNewOne) return new CoupledTLine();
85  return 0;
86 }
Q3PtrList< Line > Lines
Definition: component.h:67
Component * newOne()
Definition: ctline.cpp:74
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
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
static Element * info(QString &, char *&, bool getNewOne=false)
Definition: ctline.cpp:79
CoupledTLine()
Definition: ctline.cpp:17
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
int x2
Definition: element.h:153