Qucs-GUI  0.0.19
/home/travis/build/Qucs/qucs/qucs/qucs/components/vccs.cpp
Go to the documentation of this file.
00001 /***************************************************************************
00002                           vccs.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 "vccs.h"
00019 
00020 
00021 VCCS::VCCS()
00022 {
00023   Description = QObject::tr("voltage controlled current source");
00024 
00025   Arcs.append(new Arc(0,-11, 22, 22,  0, 16*360,QPen(Qt::darkBlue,2)));
00026   Lines.append(new Line( 11, -7, 11,  7,QPen(Qt::darkBlue,3)));
00027   Lines.append(new Line( 11,  6, 15,  1,QPen(Qt::darkBlue,3)));
00028   Lines.append(new Line( 11,  6,  7,  1,QPen(Qt::darkBlue,3)));
00029 
00030   Lines.append(new Line(-30,-30,-12,-30,QPen(Qt::darkBlue,2)));
00031   Lines.append(new Line(-30, 30,-12, 30,QPen(Qt::darkBlue,2)));
00032   Lines.append(new Line( 11,-30, 30,-30,QPen(Qt::darkBlue,2)));
00033   Lines.append(new Line( 11, 30, 30, 30,QPen(Qt::darkBlue,2)));
00034 
00035   Lines.append(new Line(-12,-30,-12,-23,QPen(Qt::darkBlue,2)));
00036   Lines.append(new Line(-12, 30,-12, 23,QPen(Qt::darkBlue,2)));
00037   Lines.append(new Line( 11,-30, 11,-11,QPen(Qt::darkBlue,2)));
00038   Lines.append(new Line( 11, 30, 11, 11,QPen(Qt::darkBlue,2)));
00039 
00040   Lines.append(new Line(-12,-18,-12, 18,QPen(Qt::darkBlue,1)));
00041   Lines.append(new Line(-12, 18,-17,  9,QPen(Qt::darkBlue,1)));
00042   Lines.append(new Line(-12, 18, -7,  9,QPen(Qt::darkBlue,1)));
00043 
00044   Lines.append(new Line(-25,-27, 25,-27,QPen(Qt::darkGray,1)));
00045   Lines.append(new Line( 25,-27, 25, 27,QPen(Qt::darkGray,1)));
00046   Lines.append(new Line( 25, 27,-25, 27,QPen(Qt::darkGray,1)));
00047   Lines.append(new Line(-25, 27,-25,-27,QPen(Qt::darkGray,1)));
00048 
00049   Ports.append(new Port(-30,-30));
00050   Ports.append(new Port( 30,-30));
00051   Ports.append(new Port( 30, 30));
00052   Ports.append(new Port(-30, 30));
00053 
00054   x1 = -30; y1 = -30;
00055   x2 =  30; y2 =  30;
00056 
00057   tx = x1+4;
00058   ty = y2+4;
00059   Model = "VCCS";
00060   Name  = "SRC";
00061 
00062   Props.append(new Property("G", "1 S", true,
00063     QObject::tr("forward transconductance")));
00064   Props.append(new Property("T", "0", false, QObject::tr("delay time")));
00065 }
00066 
00067 VCCS::~VCCS()
00068 {
00069 }
00070 
00071 Component* VCCS::newOne()
00072 {
00073   return new VCCS();
00074 }
00075 
00076 Element* VCCS::info(QString& Name, char* &BitmapFile, bool getNewOne)
00077 {
00078   Name = QObject::tr("Voltage Controlled Current Source");
00079   BitmapFile = (char *) "vccs";
00080 
00081   if(getNewOne)  return new VCCS();
00082   return 0;
00083 }
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines