Qucs-GUI  0.0.19
/home/travis/build/Qucs/qucs/qucs/qucs/components/cpwshort.cpp
Go to the documentation of this file.
00001 /***************************************************************************
00002                                cpwshort.cpp
00003                              ----------------
00004     begin                : Sun May 01 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 "cpwshort.h"
00019 
00020 
00021 CPWshort::CPWshort()
00022 {
00023   Description = QObject::tr("coplanar short");
00024 
00025   Lines.append(new Line(-30,  0,-18,  0,QPen(Qt::darkBlue,2)));
00026   Lines.append(new Line(-13, -8,  3, -8,QPen(Qt::darkBlue,2)));
00027   Lines.append(new Line(-23,  8, -7,  8,QPen(Qt::darkBlue,2)));
00028   Lines.append(new Line(-13, -8,-23,  8,QPen(Qt::darkBlue,2)));
00029 
00030   Lines.append(new Line(-25,-13,  6,-13,QPen(Qt::darkBlue,2)));
00031   Lines.append(new Line(-25, 13,-10, 13,QPen(Qt::darkBlue,2)));
00032   Lines.append(new Line(  6,-13,  3, -8,QPen(Qt::darkBlue,2)));
00033   Lines.append(new Line( -7,  8,-10, 13,QPen(Qt::darkBlue,2)));
00034 
00035   Lines.append(new Line(-24,-21,-16,-13,QPen(Qt::darkBlue,2)));
00036   Lines.append(new Line(-16,-21, -8,-13,QPen(Qt::darkBlue,2)));
00037   Lines.append(new Line( -8,-21,  0,-13,QPen(Qt::darkBlue,2)));
00038   Lines.append(new Line(  0,-21, 12, -9,QPen(Qt::darkBlue,2)));
00039   Lines.append(new Line(  8,-21, 12,-17,QPen(Qt::darkBlue,2)));
00040   
00041   Lines.append(new Line(  4, -9, 12, -1,QPen(Qt::darkBlue,2)));
00042   Lines.append(new Line(  1, -4, 12,  7,QPen(Qt::darkBlue,2)));
00043   Lines.append(new Line( -2,  1, 12, 15,QPen(Qt::darkBlue,2)));
00044 
00045   Lines.append(new Line(-25, 18,-22, 21,QPen(Qt::darkBlue,2)));
00046   Lines.append(new Line(-22, 13,-14, 21,QPen(Qt::darkBlue,2)));
00047   Lines.append(new Line(-14, 13, -6, 21,QPen(Qt::darkBlue,2)));
00048   Lines.append(new Line( -8, 11,  2, 21,QPen(Qt::darkBlue,2)));
00049   Lines.append(new Line( -5,  6, 10, 21,QPen(Qt::darkBlue,2)));
00050 
00051   Ports.append(new Port(-30, 0));
00052 
00053   x1 = -30; y1 =-24;
00054   x2 =  14; y2 = 24;
00055 
00056   tx = x1+4;
00057   ty = y2+4;
00058   Model = "CSHORT";
00059   Name  = "CL";
00060 
00061   Props.append(new Property("Subst", "Subst1", true,
00062     QObject::tr("name of substrate definition")));
00063   Props.append(new Property("W", "1 mm", true,
00064     QObject::tr("width of the line")));
00065   Props.append(new Property("S", "1 mm", true,
00066     QObject::tr("width of a gap")));
00067   Props.append(new Property("Backside", "Air", false,
00068     QObject::tr("material at the backside of the substrate")+
00069     " [Metal, Air]"));
00070 }
00071 
00072 CPWshort::~CPWshort()
00073 {
00074 }
00075 
00076 Component* CPWshort::newOne()
00077 {
00078   return new CPWshort();
00079 }
00080 
00081 Element* CPWshort::info(QString& Name, char* &BitmapFile, bool getNewOne)
00082 {
00083   Name = QObject::tr("Coplanar Short");
00084   BitmapFile = (char *) "cpwshort";
00085 
00086   if(getNewOne)  return new CPWshort();
00087   return 0;
00088 }
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines