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