Qucs-GUI
0.0.19
|
00001 /*************************************************************************** 00002 tline_4port.cpp 00003 ----------------- 00004 begin : Nov 12 2006 00005 copyright : (C) 2006 by Michael Margraf 00006 email : michael.margraf@alumni.tu-berlin.de 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 00018 #include "tline_4port.h" 00019 00020 00021 TLine_4Port::TLine_4Port() 00022 { 00023 Description = QObject::tr("ideal 4-terminal transmission line"); 00024 00025 Arcs.append(new Arc(-28,-40, 18, 38,16*232, 16*33,QPen(Qt::darkBlue,1))); 00026 Arcs.append(new Arc(-28, 2, 18, 38, 16*95, 16*33,QPen(Qt::darkBlue,1))); 00027 00028 Lines.append(new Line(-20,-2, 20,-2,QPen(Qt::darkBlue,2))); 00029 Lines.append(new Line(-20, 2, 20, 2,QPen(Qt::darkBlue,2))); 00030 00031 Arcs.append(new Arc( 10,-40, 18, 38,16*270, 16*40,QPen(Qt::darkBlue,1))); 00032 Arcs.append(new Arc( 10, 2, 18, 38, 16*50, 16*40,QPen(Qt::darkBlue,1))); 00033 00034 Arcs.append(new Arc(-38,-10, 16, 28, 16*45, 16*45,QPen(Qt::darkBlue,1))); 00035 Arcs.append(new Arc(-38,-18, 16, 28,16*270, 16*45,QPen(Qt::darkBlue,1))); 00036 Arcs.append(new Arc( 22,-10, 16, 28, 16*90, 16*45,QPen(Qt::darkBlue,1))); 00037 Arcs.append(new Arc( 22,-18, 16, 28,16*225, 16*45,QPen(Qt::darkBlue,1))); 00038 00039 Ports.append(new Port(-30,-10)); 00040 Ports.append(new Port( 30,-10)); 00041 Ports.append(new Port( 30, 10)); 00042 Ports.append(new Port(-30, 10)); 00043 00044 x1 = -30; y1 =-12; 00045 x2 = 30; y2 = 12; 00046 00047 tx = x1+4; 00048 ty = y2+4; 00049 Model = "TLIN4P"; 00050 Name = "Line"; 00051 00052 Props.append(new Property("Z", "50 Ohm", true, 00053 QObject::tr("characteristic impedance"))); 00054 Props.append(new Property("L", "1 mm", true, 00055 QObject::tr("electrical length of the line"))); 00056 Props.append(new Property("Alpha", "0 dB", false, 00057 QObject::tr("attenuation factor per length in 1/m"))); 00058 Props.append(new Property("Temp", "26.85", false, 00059 QObject::tr("simulation temperature in degree Celsius"))); 00060 } 00061 00062 TLine_4Port::~TLine_4Port() 00063 { 00064 } 00065 00066 Component* TLine_4Port::newOne() 00067 { 00068 return new TLine_4Port(); 00069 } 00070 00071 Element* TLine_4Port::info(QString& Name, char* &BitmapFile, bool getNewOne) 00072 { 00073 Name = QObject::tr("4-Terminal Transmission Line"); 00074 BitmapFile = (char *) "tline_4port"; 00075 00076 if(getNewOne) return new TLine_4Port(); 00077 return 0; 00078 }