Qucs-GUI  0.0.19
/home/travis/build/Qucs/qucs/qucs/qucs/components/ampere_noise.cpp
Go to the documentation of this file.
00001 /***************************************************************************
00002                               ampere_noise.cpp
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 "ampere_noise.h"
00019 
00020 
00021 Ampere_noise::Ampere_noise()
00022 {
00023   Description = QObject::tr("noise current source");
00024 
00025   Arcs.append(new Arc(-12,-12, 24, 24,  0, 16*360,QPen(Qt::darkBlue,2)));
00026   Lines.append(new Line(-30,  0,-12,  0,QPen(Qt::darkBlue,2)));
00027   Lines.append(new Line( 30,  0, 12,  0,QPen(Qt::darkBlue,2)));
00028   Lines.append(new Line( -7,  0,  7,  0,QPen(Qt::darkBlue,3)));
00029   Lines.append(new Line(  6,  0,  0, -4,QPen(Qt::darkBlue,3)));
00030   Lines.append(new Line(  6,  0,  0,  4,QPen(Qt::darkBlue,3)));
00031 
00032   Lines.append(new Line(-12,  1,  1,-12,QPen(Qt::darkBlue,2)));
00033   Lines.append(new Line(-10,  6, -7,  3,QPen(Qt::darkBlue,2)));
00034   Lines.append(new Line(  3, -7,  6,-10,QPen(Qt::darkBlue,2)));
00035   Lines.append(new Line( -7, 10, -2,  5,QPen(Qt::darkBlue,2)));
00036   Lines.append(new Line(  7, -4, 10, -7,QPen(Qt::darkBlue,2)));
00037   Lines.append(new Line( -1, 12, 12, -1,QPen(Qt::darkBlue,2)));
00038 
00039   Ports.append(new Port( 30,  0));
00040   Ports.append(new Port(-30,  0));
00041 
00042   x1 = -30; y1 = -15;
00043   x2 =  30; y2 =  15;
00044 
00045   tx = x1+4;
00046   ty = y2+4;
00047   Model = "Inoise";
00048   Name  = "I";
00049 
00050   Props.append(new Property("i", "1e-6", true,
00051     QObject::tr("current power spectral density in A^2/Hz")));
00052   Props.append(new Property("e", "0", false,
00053     QObject::tr("frequency exponent")));
00054   Props.append(new Property("c", "1", false,
00055     QObject::tr("frequency coefficient")));
00056   Props.append(new Property("a", "0", false,
00057     QObject::tr("additive frequency term")));
00058 
00059   rotate();  // fix historical flaw
00060 }
00061 
00062 Ampere_noise::~Ampere_noise()
00063 {
00064 }
00065 
00066 Component* Ampere_noise::newOne()
00067 {
00068   return new Ampere_noise();
00069 }
00070 
00071 Element* Ampere_noise::info(QString& Name, char* &BitmapFile, bool getNewOne)
00072 {
00073   Name = QObject::tr("Noise Current Source");
00074   BitmapFile = (char *) "noise_current";
00075 
00076   if(getNewOne)  return new Ampere_noise();
00077   return 0;
00078 }
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines