Qucs-GUI  0.0.19
/home/travis/build/Qucs/qucs/qucs/qucs/components/rectline.cpp
Go to the documentation of this file.
00001 /***************************************************************************
00002                               rectline.cpp
00003                              -----------------
00004     copyright            : (C) 2008 by ROUCARIES Bastien
00005     email                : roucaries.bastien@gmail.com
00006  ***************************************************************************/
00007 
00008 /***************************************************************************
00009  *                                                                         *
00010  *   This program is free software; you can redistribute it and/or modify  *
00011  *   it under the terms of the GNU General Public License as published by  *
00012  *   the Free Software Foundation; either version 2 of the License, or     *
00013  *   (at your option) any later version.                                   *
00014  *                                                                         *
00015  ***************************************************************************/
00016 
00017 #include "rectline.h"
00018 
00019 
00020 RectLine::RectLine()
00021 {
00022   Description = QObject::tr("Rectangular Waveguide");
00023 
00024   Lines.append(new Line(-30,  0,-17,  0,QPen(Qt::darkBlue,2)));
00025   Lines.append(new Line( 18,  0, 30,  0,QPen(Qt::darkBlue,2)));
00026 
00027   Lines.append(new Line(-14, -7, 18, -7,QPen(Qt::darkBlue,2)));
00028   Lines.append(new Line(-14, -7,-14, 11,QPen(Qt::darkBlue,2)));
00029   Lines.append(new Line(-14, 11, 18, 11,QPen(Qt::darkBlue,2)));
00030   Lines.append(new Line( 18, -7, 18, 11,QPen(Qt::darkBlue,2)));
00031   Lines.append(new Line(-20,-13, 12,-13,QPen(Qt::darkBlue,2)));
00032   Lines.append(new Line(-20,-13,-20,  5,QPen(Qt::darkBlue,2)));
00033 
00034   Lines.append(new Line(-20,-13,-14, -7,QPen(Qt::darkBlue,2)));
00035   Lines.append(new Line( 12,-13, 18, -7,QPen(Qt::darkBlue,2)));
00036   Lines.append(new Line(-20,  5,-14, 11,QPen(Qt::darkBlue,2)));
00037 
00038   Ports.append(new Port(-30, 0));
00039   Ports.append(new Port( 30, 0));
00040 
00041   x1 = -30; y1 =-16;
00042   x2 =  30; y2 = 14;
00043 
00044   tx = x1+4;
00045   ty = y2+4;
00046   Model = "RECTLINE";
00047   Name  = "Line";
00048 
00049   Props.append(new Property("a", "2.95 mm", true,
00050     QObject::tr("widest side")));
00051   Props.append(new Property("b", "0.9 mm", true,
00052     QObject::tr("shortest side")));
00053   Props.append(new Property("L", "1500 mm", true,
00054     QObject::tr("mechanical length of the line")));
00055   Props.append(new Property("er", "1", false,
00056     QObject::tr("relative permittivity of dielectric")));
00057   Props.append(new Property("mur", "1", false,
00058     QObject::tr("relative permeability of conductor")));
00059   Props.append(new Property("tand", "0", false,
00060     QObject::tr("loss tangent")));
00061   Props.append(new Property("rho", "0.022e-6", false,
00062     QObject::tr("specific resistance of conductor")));
00063   Props.append(new Property("Temp", "26.85", false,
00064     QObject::tr("simulation temperature in degree Celsius")));
00065   Props.append(new Property("Material", "unspecified", false,
00066     QObject::tr("material parameter for temperature model")+
00067           " [unspecified, Copper, StainlessSteel, Gold]"));
00068 }
00069 
00070 RectLine::~RectLine()
00071 {
00072 }
00073 
00074 Component* RectLine::newOne()
00075 {
00076   return new RectLine();
00077 }
00078 
00079 Element* RectLine::info(QString& Name, char* &BitmapFile, bool getNewOne)
00080 {
00081   Name = QObject::tr("Rectangular Waveguide");
00082   BitmapFile = (char *) "rectline";
00083 
00084   if(getNewOne)  return new RectLine();
00085   return 0;
00086 }
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines