Qucs-GUI
0.0.19
|
00001 /*************************************************************************** 00002 noise_ii.cpp 00003 -------------- 00004 begin : Sat Aug 20 2005 00005 copyright : (C) 2005 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 "noise_ii.h" 00019 00020 00021 Noise_ii::Noise_ii() 00022 { 00023 Description = QObject::tr("correlated current sources"); 00024 00025 // left noise source 00026 Arcs.append(new Arc(-42,-12, 24, 24, 0, 16*360,QPen(Qt::darkBlue,2))); 00027 Lines.append(new Line(-30, 30,-30, 12,QPen(Qt::darkBlue,2))); 00028 Lines.append(new Line(-30,-30,-30,-12,QPen(Qt::darkBlue,2))); 00029 Lines.append(new Line(-30, 7,-30, -7,QPen(Qt::darkBlue,3))); 00030 Lines.append(new Line(-30, -6,-34, 0,QPen(Qt::darkBlue,3))); 00031 Lines.append(new Line(-30, -6,-26, 0,QPen(Qt::darkBlue,3))); 00032 00033 Lines.append(new Line(-29, 12,-42, -1,QPen(Qt::darkBlue,2))); 00034 Lines.append(new Line(-24, 10,-27, 7,QPen(Qt::darkBlue,2))); 00035 Lines.append(new Line(-37, -3,-40, -6,QPen(Qt::darkBlue,2))); 00036 Lines.append(new Line(-20, 7,-25, 2,QPen(Qt::darkBlue,2))); 00037 Lines.append(new Line(-34, -7,-37,-10,QPen(Qt::darkBlue,2))); 00038 Lines.append(new Line(-18, 1,-31,-12,QPen(Qt::darkBlue,2))); 00039 00040 // right noise source 00041 Arcs.append(new Arc( 18,-12, 24, 24, 0, 16*360,QPen(Qt::darkBlue,2))); 00042 Lines.append(new Line( 30, 30, 30, 12,QPen(Qt::darkBlue,2))); 00043 Lines.append(new Line( 30,-30, 30,-12,QPen(Qt::darkBlue,2))); 00044 Lines.append(new Line( 30, 7, 30, -7,QPen(Qt::darkBlue,3))); 00045 Lines.append(new Line( 30, -6, 26, 0,QPen(Qt::darkBlue,3))); 00046 Lines.append(new Line( 30, -6, 34, 0,QPen(Qt::darkBlue,3))); 00047 00048 Lines.append(new Line( 31, 12, 18, -1,QPen(Qt::darkBlue,2))); 00049 Lines.append(new Line( 36, 10, 33, 7,QPen(Qt::darkBlue,2))); 00050 Lines.append(new Line( 23, -3, 20, -6,QPen(Qt::darkBlue,2))); 00051 Lines.append(new Line( 40, 7, 35, 2,QPen(Qt::darkBlue,2))); 00052 Lines.append(new Line( 26, -7, 23,-10,QPen(Qt::darkBlue,2))); 00053 Lines.append(new Line( 42, 1, 29,-12,QPen(Qt::darkBlue,2))); 00054 00055 Lines.append(new Line(-18, 0, 18, 0,QPen(Qt::darkBlue,3))); 00056 00057 Ports.append(new Port(-30,-30)); 00058 Ports.append(new Port( 30,-30)); 00059 Ports.append(new Port( 30, 30)); 00060 Ports.append(new Port(-30, 30)); 00061 00062 x1 = -44; y1 = -30; 00063 x2 = 44; y2 = 30; 00064 00065 tx = x1+4; 00066 ty = y2+4; 00067 Model = "IInoise"; 00068 Name = "SRC"; 00069 00070 Props.append(new Property("i1", "1e-6", true, 00071 QObject::tr("current power spectral density of source 1"))); 00072 Props.append(new Property("i2", "1e-6", true, 00073 QObject::tr("current power spectral density of source 2"))); 00074 Props.append(new Property("C", "0.5", true, 00075 QObject::tr("normalized correlation coefficient"))); 00076 Props.append(new Property("e", "0", false, 00077 QObject::tr("frequency exponent"))); 00078 Props.append(new Property("c", "1", false, 00079 QObject::tr("frequency coefficient"))); 00080 Props.append(new Property("a", "0", false, 00081 QObject::tr("additive frequency term"))); 00082 } 00083 00084 Noise_ii::~Noise_ii() 00085 { 00086 } 00087 00088 Component* Noise_ii::newOne() 00089 { 00090 return new Noise_ii(); 00091 } 00092 00093 Element* Noise_ii::info(QString& Name, char* &BitmapFile, bool getNewOne) 00094 { 00095 Name = QObject::tr("Correlated Noise Sources"); 00096 BitmapFile = (char *) "noise_ii"; 00097 00098 if(getNewOne) return new Noise_ii(); 00099 return 0; 00100 }