Qucs-GUI
0.0.19
|
00001 /*************************************************************************** 00002 cccs.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 "cccs.h" 00019 00020 00021 CCCS::CCCS() 00022 { 00023 Description = QObject::tr("current 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, 30,QPen(Qt::darkBlue,2))); 00036 Lines.append(new Line( 11,-30, 11,-11,QPen(Qt::darkBlue,2))); 00037 Lines.append(new Line( 11, 30, 11, 11,QPen(Qt::darkBlue,2))); 00038 00039 Lines.append(new Line(-12, 20,-17, 11,QPen(Qt::darkBlue,2))); 00040 Lines.append(new Line(-12, 20, -8, 11,QPen(Qt::darkBlue,2))); 00041 00042 Lines.append(new Line(-25,-27, 25,-27,QPen(Qt::darkGray,1))); 00043 Lines.append(new Line( 25,-27, 25, 27,QPen(Qt::darkGray,1))); 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 00047 Ports.append(new Port(-30,-30)); 00048 Ports.append(new Port( 30,-30)); 00049 Ports.append(new Port( 30, 30)); 00050 Ports.append(new Port(-30, 30)); 00051 00052 x1 = -30; y1 = -30; 00053 x2 = 30; y2 = 30; 00054 00055 tx = x1+4; 00056 ty = y2+4; 00057 Model = "CCCS"; 00058 Name = "SRC"; 00059 00060 Props.append(new Property("G", "1", true, 00061 QObject::tr("forward transfer factor"))); 00062 Props.append(new Property("T", "0", false, QObject::tr("delay time"))); 00063 } 00064 00065 CCCS::~CCCS() 00066 { 00067 } 00068 00069 Component* CCCS::newOne() 00070 { 00071 return new CCCS(); 00072 } 00073 00074 Element* CCCS::info(QString& Name, char* &BitmapFile, bool getNewOne) 00075 { 00076 Name = QObject::tr("Current Controlled Current Source"); 00077 BitmapFile = (char *) "cccs"; 00078 00079 if(getNewOne) return new CCCS(); 00080 return 0; 00081 }