My Project  0.0.16
QUCS Mapping
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ampere_noise.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  ampere_noise.cpp
3  ------------------
4  begin : Sat Aug 23 2003
5  copyright : (C) 2003 by Michael Margraf
6  email : michael.margraf@alumni.tu-berlin.de
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #include "ampere_noise.h"
19 
20 
22 {
23  Description = QObject::tr("noise current source");
24 
25  Arcs.append(new Arc(-12,-12, 24, 24, 0, 16*360,QPen(QPen::darkBlue,2)));
26  Lines.append(new Line(-30, 0,-12, 0,QPen(QPen::darkBlue,2)));
27  Lines.append(new Line( 30, 0, 12, 0,QPen(QPen::darkBlue,2)));
28  Lines.append(new Line( -7, 0, 7, 0,QPen(QPen::darkBlue,3)));
29  Lines.append(new Line( 6, 0, 0, -4,QPen(QPen::darkBlue,3)));
30  Lines.append(new Line( 6, 0, 0, 4,QPen(QPen::darkBlue,3)));
31 
32  Lines.append(new Line(-12, 1, 1,-12,QPen(QPen::darkBlue,2)));
33  Lines.append(new Line(-10, 6, -7, 3,QPen(QPen::darkBlue,2)));
34  Lines.append(new Line( 3, -7, 6,-10,QPen(QPen::darkBlue,2)));
35  Lines.append(new Line( -7, 10, -2, 5,QPen(QPen::darkBlue,2)));
36  Lines.append(new Line( 7, -4, 10, -7,QPen(QPen::darkBlue,2)));
37  Lines.append(new Line( -1, 12, 12, -1,QPen(QPen::darkBlue,2)));
38 
39  Ports.append(new Port( 30, 0));
40  Ports.append(new Port(-30, 0));
41 
42  x1 = -30; y1 = -15;
43  x2 = 30; y2 = 15;
44 
45  tx = x1+4;
46  ty = y2+4;
47  Model = "Inoise";
48  Name = "I";
49 
50  Props.append(new Property("i", "1e-6", true,
51  QObject::tr("current power spectral density in A^2/Hz")));
52  Props.append(new Property("e", "0", false,
53  QObject::tr("frequency exponent")));
54  Props.append(new Property("c", "1", false,
55  QObject::tr("frequency coefficient")));
56  Props.append(new Property("a", "0", false,
57  QObject::tr("additive frequency term")));
58 
59  rotate(); // fix historical flaw
60 }
61 
63 {
64 }
65 
67 {
68  return new Ampere_noise();
69 }
70 
71 Element* Ampere_noise::info(QString& Name, char* &BitmapFile, bool getNewOne)
72 {
73  Name = QObject::tr("Noise Current Source");
74  BitmapFile = (char *) "noise_current";
75 
76  if(getNewOne) return new Ampere_noise();
77  return 0;
78 }