Qucs-GUI  0.0.19
/home/travis/build/Qucs/qucs/qucs/qucs/components/isolator.cpp
Go to the documentation of this file.
00001 /***************************************************************************
00002                           isolator.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 "isolator.h"
00019 
00020 
00021 Isolator::Isolator()
00022 {
00023   Description = QObject::tr("isolator");
00024 
00025   Lines.append(new Line( -8,  0,  8,  0,QPen(Qt::darkBlue,3)));
00026   Lines.append(new Line(  8,  0,  0, -5,QPen(Qt::darkBlue,3)));
00027   Lines.append(new Line(  8,  0,  0,  5,QPen(Qt::darkBlue,3)));
00028 
00029   Lines.append(new Line(-14,-14, 14,-14,QPen(Qt::darkBlue,2)));
00030   Lines.append(new Line(-14, 14, 14, 14,QPen(Qt::darkBlue,2)));
00031   Lines.append(new Line(-14,-14,-14, 14,QPen(Qt::darkBlue,2)));
00032   Lines.append(new Line( 14,-14, 14, 14,QPen(Qt::darkBlue,2)));
00033 
00034   Lines.append(new Line(-30,  0,-14,  0,QPen(Qt::darkBlue,2)));
00035   Lines.append(new Line( 14,  0, 30,  0,QPen(Qt::darkBlue,2)));
00036 
00037   Ports.append(new Port(-30,  0));
00038   Ports.append(new Port( 30,  0));
00039 
00040   x1 = -30; y1 = -17;
00041   x2 =  30; y2 =  17;
00042 
00043   tx = x1+4;
00044   ty = y2+4;
00045   Model = "Isolator";
00046   Name  = "X";
00047 
00048   Props.append(new Property("Z1", "50 Ohm", false,
00049     QObject::tr("reference impedance of input port")));
00050   Props.append(new Property("Z2", "50 Ohm", false,
00051     QObject::tr("reference impedance of output port")));
00052   Props.append(new Property("Temp", "26.85", false,
00053     QObject::tr("simulation temperature in degree Celsius")));
00054 }
00055 
00056 Isolator::~Isolator()
00057 {
00058 }
00059 
00060 Component* Isolator::newOne()
00061 {
00062   return new Isolator();
00063 }
00064 
00065 Element* Isolator::info(QString& Name, char* &BitmapFile, bool getNewOne)
00066 {
00067   Name = QObject::tr("Isolator");
00068   BitmapFile = (char *) "isolator";
00069 
00070   if(getNewOne)  return new Isolator();
00071   return 0;
00072 }
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines