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