Qucs-GUI  0.0.19
/home/travis/build/Qucs/qucs/qucs/qucs/components/mscorner.cpp
Go to the documentation of this file.
00001 /***************************************************************************
00002                           mscorner.cpp  -  description
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 "mscorner.h"
00019 
00020 
00021 MScorner::MScorner()
00022 {
00023   Description = QObject::tr("microstrip corner");
00024 
00025   Lines.append(new Line(-30,  0,-18,  0,QPen(Qt::darkBlue,2)));
00026   Lines.append(new Line(  0, 18,  0, 30,QPen(Qt::darkBlue,2)));
00027   Lines.append(new Line(-18, -8,  8, -8,QPen(Qt::darkBlue,2)));
00028   Lines.append(new Line(-18,  8, -8,  8,QPen(Qt::darkBlue,2)));
00029   Lines.append(new Line(-18, -8,-18,  8,QPen(Qt::darkBlue,2)));
00030   Lines.append(new Line( -8,  8, -8, 18,QPen(Qt::darkBlue,2)));
00031   Lines.append(new Line(  8, -8,  8, 18,QPen(Qt::darkBlue,2)));
00032   Lines.append(new Line( -8, 18,  8, 18,QPen(Qt::darkBlue,2)));
00033 
00034   Ports.append(new Port(-30, 0));
00035   Ports.append(new Port(  0,30));
00036 
00037   x1 = -30; y1 =-11;
00038   x2 =  11; y2 = 30;
00039 
00040   tx = x2+4;
00041   ty = y1+4;
00042   Model = "MCORN";
00043   Name  = "MS";
00044 
00045   Props.append(new Property("Subst", "Subst1", true,
00046     QObject::tr("substrate")));
00047   Props.append(new Property("W", "1 mm", true,
00048     QObject::tr("width of line")));
00049 }
00050 
00051 MScorner::~MScorner()
00052 {
00053 }
00054 
00055 Component* MScorner::newOne()
00056 {
00057   return new MScorner();
00058 }
00059 
00060 Element* MScorner::info(QString& Name, char* &BitmapFile, bool getNewOne)
00061 {
00062   Name = QObject::tr("Microstrip Corner");
00063   BitmapFile = (char *) "mscorner";
00064 
00065   if(getNewOne)  return new MScorner();
00066   return 0;
00067 }
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines