Qucs-GUI
0.0.19
|
00001 /*************************************************************************** 00002 tline.cpp 00003 ----------- 00004 begin : Sat Aug 23 2003 00005 copyright : (C) 2003 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.h" 00019 00020 00021 TLine::TLine() 00022 { 00023 Description = QObject::tr("ideal transmission line"); 00024 00025 Lines.append(new Line(-30, 0, 30, 0,QPen(Qt::darkBlue,2))); 00026 Lines.append(new Line(-28, 7, 28, 7,QPen(Qt::darkBlue,2))); 00027 00028 Lines.append(new Line(-28, 14,-21, 7,QPen(Qt::darkBlue,2))); 00029 Lines.append(new Line(-21, 14,-14, 7,QPen(Qt::darkBlue,2))); 00030 Lines.append(new Line(-14, 14, -7, 7,QPen(Qt::darkBlue,2))); 00031 Lines.append(new Line( -7, 14, 0, 7,QPen(Qt::darkBlue,2))); 00032 Lines.append(new Line( 0, 14, 7, 7,QPen(Qt::darkBlue,2))); 00033 Lines.append(new Line( 7, 14, 14, 7,QPen(Qt::darkBlue,2))); 00034 Lines.append(new Line( 14, 14, 21, 7,QPen(Qt::darkBlue,2))); 00035 Lines.append(new Line( 21, 14, 28, 7,QPen(Qt::darkBlue,2))); 00036 00037 Ports.append(new Port(-30, 0)); 00038 Ports.append(new Port( 30, 0)); 00039 00040 x1 = -30; y1 = -4; 00041 x2 = 30; y2 = 16; 00042 00043 tx = x1+4; 00044 ty = y2+4; 00045 Model = "TLIN"; 00046 Name = "Line"; 00047 00048 Props.append(new Property("Z", "50 Ohm", true, 00049 QObject::tr("characteristic impedance"))); 00050 Props.append(new Property("L", "1 mm", true, 00051 QObject::tr("electrical length of the line"))); 00052 Props.append(new Property("Alpha", "0 dB", false, 00053 QObject::tr("attenuation factor per length in 1/m"))); 00054 Props.append(new Property("Temp", "26.85", false, 00055 QObject::tr("simulation temperature in degree Celsius"))); 00056 } 00057 00058 TLine::~TLine() 00059 { 00060 } 00061 00062 Component* TLine::newOne() 00063 { 00064 return new TLine(); 00065 } 00066 00067 Element* TLine::info(QString& Name, char* &BitmapFile, bool getNewOne) 00068 { 00069 Name = QObject::tr("Transmission Line"); 00070 BitmapFile = (char *) "tline"; 00071 00072 if(getNewOne) return new TLine(); 00073 return 0; 00074 }