Qucs-GUI
0.0.19
|
00001 /*************************************************************************** 00002 noise_vv.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_vv.h" 00019 00020 00021 Noise_vv::Noise_vv() 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 00030 Lines.append(new Line(-29, 12,-42, -1,QPen(Qt::darkBlue,2))); 00031 Lines.append(new Line(-24, 10,-40, -6,QPen(Qt::darkBlue,2))); 00032 Lines.append(new Line(-20, 7,-37,-10,QPen(Qt::darkBlue,2))); 00033 Lines.append(new Line(-18, 2,-32,-12,QPen(Qt::darkBlue,2))); 00034 00035 // right noise source 00036 Arcs.append(new Arc( 18,-12, 24, 24, 0, 16*360,QPen(Qt::darkBlue,2))); 00037 Lines.append(new Line( 30, 30, 30, 12,QPen(Qt::darkBlue,2))); 00038 Lines.append(new Line( 30,-30, 30,-12,QPen(Qt::darkBlue,2))); 00039 00040 Lines.append(new Line( 31, 12, 18, -1,QPen(Qt::darkBlue,2))); 00041 Lines.append(new Line( 36, 10, 20, -6,QPen(Qt::darkBlue,2))); 00042 Lines.append(new Line( 40, 7, 23,-10,QPen(Qt::darkBlue,2))); 00043 Lines.append(new Line( 42, 2, 28,-12,QPen(Qt::darkBlue,2))); 00044 00045 Lines.append(new Line(-18, 0, 18, 0,QPen(Qt::darkBlue,3))); 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 = -44; y1 = -30; 00053 x2 = 44; y2 = 30; 00054 00055 tx = x1+4; 00056 ty = y2+4; 00057 Model = "VVnoise"; 00058 Name = "SRC"; 00059 00060 Props.append(new Property("v1", "1e-6", true, 00061 QObject::tr("voltage power spectral density of source 1"))); 00062 Props.append(new Property("v2", "1e-6", true, 00063 QObject::tr("voltage power spectral density of source 2"))); 00064 Props.append(new Property("C", "0.5", true, 00065 QObject::tr("normalized correlation coefficient"))); 00066 Props.append(new Property("e", "0", false, 00067 QObject::tr("frequency exponent"))); 00068 Props.append(new Property("c", "1", false, 00069 QObject::tr("frequency coefficient"))); 00070 Props.append(new Property("a", "0", false, 00071 QObject::tr("additive frequency term"))); 00072 } 00073 00074 Noise_vv::~Noise_vv() 00075 { 00076 } 00077 00078 Component* Noise_vv::newOne() 00079 { 00080 return new Noise_vv(); 00081 } 00082 00083 Element* Noise_vv::info(QString& Name, char* &BitmapFile, bool getNewOne) 00084 { 00085 Name = QObject::tr("Correlated Noise Sources"); 00086 BitmapFile = (char *) "noise_vv"; 00087 00088 if(getNewOne) return new Noise_vv(); 00089 return 0; 00090 }