Qucs-GUI
0.0.19
|
00001 /*************************************************************************** 00002 coplanar.cpp 00003 -------------- 00004 begin : Thu May 05 2005 00005 copyright : (C) 2005 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 "cpwgap.h" 00019 00020 00021 CPWgap::CPWgap() 00022 { 00023 Description = QObject::tr("coplanar gap"); 00024 00025 Lines.append(new Line(-30, 0,-18, 0,QPen(Qt::darkBlue,2))); 00026 Lines.append(new Line( 18, 0, 30, 0,QPen(Qt::darkBlue,2))); 00027 Lines.append(new Line(-13, -8, 2, -8,QPen(Qt::darkBlue,2))); 00028 Lines.append(new Line( 8, -8, 23, -8,QPen(Qt::darkBlue,2))); 00029 Lines.append(new Line(-23, 8, -8, 8,QPen(Qt::darkBlue,2))); 00030 Lines.append(new Line( -2, 8, 13, 8,QPen(Qt::darkBlue,2))); 00031 Lines.append(new Line(-13, -8,-23, 8,QPen(Qt::darkBlue,2))); 00032 Lines.append(new Line( 2, -8, -8, 8,QPen(Qt::darkBlue,2))); 00033 Lines.append(new Line( 8, -8, -2, 8,QPen(Qt::darkBlue,2))); 00034 Lines.append(new Line( 23, -8, 13, 8,QPen(Qt::darkBlue,2))); 00035 00036 Lines.append(new Line(-25,-13, 25,-13,QPen(Qt::darkBlue,2))); 00037 Lines.append(new Line( 16,-21, 24,-13,QPen(Qt::darkBlue,2))); 00038 Lines.append(new Line( 8,-21, 16,-13,QPen(Qt::darkBlue,2))); 00039 Lines.append(new Line( 0,-21, 8,-13,QPen(Qt::darkBlue,2))); 00040 Lines.append(new Line( -8,-21, 0,-13,QPen(Qt::darkBlue,2))); 00041 Lines.append(new Line(-16,-21, -8,-13,QPen(Qt::darkBlue,2))); 00042 Lines.append(new Line(-24,-21,-16,-13,QPen(Qt::darkBlue,2))); 00043 00044 Lines.append(new Line(-25, 13, 25, 13,QPen(Qt::darkBlue,2))); 00045 Lines.append(new Line(-24, 13,-16, 21,QPen(Qt::darkBlue,2))); 00046 Lines.append(new Line(-16, 13, -8, 21,QPen(Qt::darkBlue,2))); 00047 Lines.append(new Line( -8, 13, 0, 21,QPen(Qt::darkBlue,2))); 00048 Lines.append(new Line( 0, 13, 8, 21,QPen(Qt::darkBlue,2))); 00049 Lines.append(new Line( 8, 13, 16, 21,QPen(Qt::darkBlue,2))); 00050 Lines.append(new Line( 16, 13, 24, 21,QPen(Qt::darkBlue,2))); 00051 00052 Ports.append(new Port(-30, 0)); 00053 Ports.append(new Port( 30, 0)); 00054 00055 x1 = -30; y1 =-24; 00056 x2 = 30; y2 = 24; 00057 00058 tx = x1+4; 00059 ty = y2+4; 00060 Model = "CGAP"; 00061 Name = "CL"; 00062 00063 Props.append(new Property("Subst", "Subst1", true, 00064 QObject::tr("name of substrate definition"))); 00065 Props.append(new Property("W", "1 mm", true, 00066 QObject::tr("width of the line"))); 00067 Props.append(new Property("S", "1 mm", true, 00068 QObject::tr("width of a gap"))); 00069 Props.append(new Property("G", "0.5 mm", true, 00070 QObject::tr("width of gap between the two lines"))); 00071 } 00072 00073 CPWgap::~CPWgap() 00074 { 00075 } 00076 00077 Component* CPWgap::newOne() 00078 { 00079 return new CPWgap(); 00080 } 00081 00082 Element* CPWgap::info(QString& Name, char* &BitmapFile, bool getNewOne) 00083 { 00084 Name = QObject::tr("Coplanar Gap"); 00085 BitmapFile = (char *) "cpwgap"; 00086 00087 if(getNewOne) return new CPWgap(); 00088 return 0; 00089 }