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