Qucs-GUI  0.0.18
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
twistedpair.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  twistedpair.cpp
3  -----------------
4  begin : Dec 19 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 "twistedpair.h"
19 
20 
22 {
23  Description = QObject::tr("twisted pair transmission line");
24 
25  Arcs.append(new Arc(-25,-36, 18, 38,16*230, 16*68,QPen(Qt::darkBlue,1)));
26  Arcs.append(new Arc(-25, -2, 18, 38, 16*62, 16*68,QPen(Qt::darkBlue,1)));
27 
28  Arcs.append(new Arc(-17,-36, 18, 38,16*242, 16*56,QPen(Qt::darkBlue,1)));
29  Arcs.append(new Arc(-17, -2, 18, 38, 16*62, 16*56,QPen(Qt::darkBlue,1)));
30 
31  Arcs.append(new Arc( -9,-36, 18, 38,16*242, 16*56,QPen(Qt::darkBlue,1)));
32  Arcs.append(new Arc( -9, -2, 18, 38, 16*62, 16*56,QPen(Qt::darkBlue,1)));
33 
34  Arcs.append(new Arc( -1,-36, 18, 38,16*242, 16*56,QPen(Qt::darkBlue,1)));
35  Arcs.append(new Arc( -1, -2, 18, 38, 16*62, 16*56,QPen(Qt::darkBlue,1)));
36 
37  Arcs.append(new Arc( 7,-36, 18, 38,16*242, 16*68,QPen(Qt::darkBlue,1)));
38  Arcs.append(new Arc( 7, -2, 18, 38, 16*50, 16*68,QPen(Qt::darkBlue,1)));
39 
40  Arcs.append(new Arc(-40,-10, 20, 33, 16*32, 16*58,QPen(Qt::darkBlue,2)));
41  Arcs.append(new Arc(-40,-23, 20, 33,16*270, 16*58,QPen(Qt::darkBlue,2)));
42  Arcs.append(new Arc( 20,-10, 20, 33, 16*90, 16*58,QPen(Qt::darkBlue,2)));
43  Arcs.append(new Arc( 20,-23, 20, 33,16*212, 16*58,QPen(Qt::darkBlue,2)));
44 
45  Ports.append(new Port(-30,-10));
46  Ports.append(new Port( 30,-10));
47  Ports.append(new Port( 30, 10));
48  Ports.append(new Port(-30, 10));
49 
50  x1 = -30; y1 =-12;
51  x2 = 30; y2 = 12;
52 
53  tx = x1+4;
54  ty = y2+4;
55  Model = "TWIST";
56  Name = "Line";
57 
58  Props.append(new Property("d", "0.5 mm", true,
59  QObject::tr("diameter of conductor")));
60  Props.append(new Property("D", "0.8 mm", true,
61  QObject::tr("diameter of wire (conductor and insulator)")));
62  Props.append(new Property("L", "1.5", true,
63  QObject::tr("physical length of the line")));
64  Props.append(new Property("T", "100", false,
65  QObject::tr("twists per length in 1/m")));
66  Props.append(new Property("er", "4", false,
67  QObject::tr("dielectric constant of insulator")));
68  Props.append(new Property("mur", "1", false,
69  QObject::tr("relative permeability of conductor")));
70  Props.append(new Property("rho", "0.022e-6", false,
71  QObject::tr("specific resistance of conductor")));
72  Props.append(new Property("tand", "4e-4", false,
73  QObject::tr("loss tangent")));
74  Props.append(new Property("Temp", "26.85", false,
75  QObject::tr("simulation temperature in degree Celsius")));
76 }
77 
79 {
80 }
81 
83 {
84  return new TwistedPair();
85 }
86 
87 Element* TwistedPair::info(QString& Name, char* &BitmapFile, bool getNewOne)
88 {
89  Name = QObject::tr("Twisted-Pair");
90  BitmapFile = (char *) "twistedpair";
91 
92  if(getNewOne) return new TwistedPair();
93  return 0;
94 }
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
static Element * info(QString &, char *&, bool getNewOne=false)
Definition: twistedpair.cpp:87
int ty
Definition: component.h:78
Q3PtrList< Property > Props
Definition: component.h:72
Component * newOne()
Definition: twistedpair.cpp:82
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
int x2
Definition: element.h:153