Qucs-GUI  0.0.19
/home/travis/build/Qucs/qucs/qucs/qucs/components/phaseshifter.cpp
Go to the documentation of this file.
00001 /***************************************************************************
00002                           phaseshifter.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 "phaseshifter.h"
00019 
00020 
00021 Phaseshifter::Phaseshifter()
00022 {
00023   Description = QObject::tr("phase shifter");
00024 
00025   Lines.append(new Line(-14,-14, 14,-14,QPen(Qt::darkBlue,2)));
00026   Lines.append(new Line(-14, 14, 14, 14,QPen(Qt::darkBlue,2)));
00027   Lines.append(new Line(-14,-14,-14, 14,QPen(Qt::darkBlue,2)));
00028   Lines.append(new Line( 14,-14, 14, 14,QPen(Qt::darkBlue,2)));
00029   Arcs.append(new Arc( -9, -9, 17, 17, 0, 16*360,QPen(Qt::darkBlue,2)));
00030   Lines.append(new Line(-10, 10, 10,-10,QPen(Qt::darkBlue,2)));
00031 
00032   Lines.append(new Line(-30,  0,-14,  0,QPen(Qt::darkBlue,2)));
00033   Lines.append(new Line( 14,  0, 30,  0,QPen(Qt::darkBlue,2)));
00034 
00035   Ports.append(new Port(-30,  0));
00036   Ports.append(new Port( 30,  0));
00037 
00038   x1 = -30; y1 = -17;
00039   x2 =  30; y2 =  17;
00040 
00041   tx = x1+4;
00042   ty = y2+4;
00043   Model = "PShift";
00044   Name  = "X";
00045 
00046   Props.append(new Property("phi", "90", true,
00047     QObject::tr("phase shift in degree")));
00048   Props.append(new Property("Zref", "50 Ohm", false,
00049     QObject::tr("reference impedance")));
00050 }
00051 
00052 Phaseshifter::~Phaseshifter()
00053 {
00054 }
00055 
00056 Component* Phaseshifter::newOne()
00057 {
00058   return new Phaseshifter();
00059 }
00060 
00061 Element* Phaseshifter::info(QString& Name, char* &BitmapFile, bool getNewOne)
00062 {
00063   Name = QObject::tr("Phase Shifter");
00064   BitmapFile = (char *) "pshifter";
00065 
00066   if(getNewOne)  return new Phaseshifter();
00067   return 0;
00068 }
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines