Qucs-GUI  0.0.19
/home/travis/build/Qucs/qucs/qucs/qucs/components/msrstub.cpp
Go to the documentation of this file.
00001 /***************************************************************************
00002                        msrstub.cpp  -  description
00003                       -----------------------------
00004     begin                : Sun Mar 15 2009
00005     copyright            : (C) 2009 by Stefan Jahn
00006     email                : stefan@lkcc.org
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 "msrstub.h"
00019 
00020 MSrstub::MSrstub()
00021 {
00022   Description = QObject::tr("microstrip radial stub");
00023 
00024   Arcs.append(new Arc( -26, -26, 52, 52,16*45, 16*90,QPen(Qt::darkBlue,2)));
00025 
00026   Lines.append(new Line(-5,   0,  5,  0,QPen(Qt::darkBlue,2)));
00027   Lines.append(new Line(-5,   0,-18,-18,QPen(Qt::darkBlue,2)));
00028   Lines.append(new Line( 5,   0, 18,-18,QPen(Qt::darkBlue,2)));
00029   Lines.append(new Line( 0,   0,  0, 10,QPen(Qt::darkBlue,2)));
00030 
00031   Ports.append(new Port(0, 10));
00032 
00033   x1 = -22; y1 =-30;
00034   x2 =  22; y2 = 10;
00035 
00036   tx = x1+4;
00037   ty = y2+4;
00038   Model = "MRSTUB";
00039   Name  = "MS";
00040 
00041   Props.append(new Property("Subst", "Subst1", true,
00042   QObject::tr("name of substrate definition")));
00043   Props.append(new Property("ri", "1 mm", false,
00044   QObject::tr("inner radius")));
00045   Props.append(new Property("ro", "10 mm", true,
00046   QObject::tr("outer radius")));
00047   Props.append(new Property("alpha", "90", true,
00048   QObject::tr("stub angle")+" ("+QObject::tr ("degrees")+")"));
00049 }
00050 
00051 MSrstub::~MSrstub()
00052 {
00053 }
00054 
00055 Component* MSrstub::newOne()
00056 {
00057   return new MSrstub();
00058 }
00059 
00060 Element* MSrstub::info(QString& Name, char* &BitmapFile, bool getNewOne)
00061 {
00062   Name = QObject::tr("Microstrip Radial Stub");
00063   BitmapFile = (char *) "msrstub";
00064 
00065   if(getNewOne)  return new MSrstub();
00066   return 0;
00067 }
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines