Qucs-GUI  0.0.18
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
noise_iv.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  noise_iv.cpp
3  --------------
4  begin : Sat Aug 20 2005
5  copyright : (C) 2005 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 "noise_iv.h"
19 
20 
22 {
23  Description = QObject::tr("correlated current sources");
24 
25  // left noise source
26  Arcs.append(new Arc(-42,-12, 24, 24, 0, 16*360,QPen(Qt::darkBlue,2)));
27  Lines.append(new Line(-30, 30,-30, 12,QPen(Qt::darkBlue,2)));
28  Lines.append(new Line(-30,-30,-30,-12,QPen(Qt::darkBlue,2)));
29  Lines.append(new Line(-30, 7,-30, -7,QPen(Qt::darkBlue,3)));
30  Lines.append(new Line(-30, -6,-34, 0,QPen(Qt::darkBlue,3)));
31  Lines.append(new Line(-30, -6,-26, 0,QPen(Qt::darkBlue,3)));
32 
33  Lines.append(new Line(-29, 12,-42, -1,QPen(Qt::darkBlue,2)));
34  Lines.append(new Line(-24, 10,-27, 7,QPen(Qt::darkBlue,2)));
35  Lines.append(new Line(-37, -3,-40, -6,QPen(Qt::darkBlue,2)));
36  Lines.append(new Line(-20, 7,-25, 2,QPen(Qt::darkBlue,2)));
37  Lines.append(new Line(-34, -7,-37,-10,QPen(Qt::darkBlue,2)));
38  Lines.append(new Line(-18, 1,-31,-12,QPen(Qt::darkBlue,2)));
39 
40  // right noise source
41  Arcs.append(new Arc( 18,-12, 24, 24, 0, 16*360,QPen(Qt::darkBlue,2)));
42  Lines.append(new Line( 30, 30, 30, 12,QPen(Qt::darkBlue,2)));
43  Lines.append(new Line( 30,-30, 30,-12,QPen(Qt::darkBlue,2)));
44 
45  Lines.append(new Line( 31, 12, 18, -1,QPen(Qt::darkBlue,2)));
46  Lines.append(new Line( 36, 10, 20, -6,QPen(Qt::darkBlue,2)));
47  Lines.append(new Line( 40, 7, 23,-10,QPen(Qt::darkBlue,2)));
48  Lines.append(new Line( 42, 2, 28,-12,QPen(Qt::darkBlue,2)));
49 
50  Lines.append(new Line(-18, 0, 18, 0,QPen(Qt::darkBlue,3)));
51 
52  Ports.append(new Port(-30,-30));
53  Ports.append(new Port( 30,-30));
54  Ports.append(new Port( 30, 30));
55  Ports.append(new Port(-30, 30));
56 
57  x1 = -44; y1 = -30;
58  x2 = 44; y2 = 30;
59 
60  tx = x1+4;
61  ty = y2+4;
62  Model = "IVnoise";
63  Name = "SRC";
64 
65  Props.append(new Property("i1", "1e-6", true,
66  QObject::tr("current power spectral density of source 1")));
67  Props.append(new Property("v2", "1e-6", true,
68  QObject::tr("voltage power spectral density of source 2")));
69  Props.append(new Property("C", "0.5", true,
70  QObject::tr("normalized correlation coefficient")));
71  Props.append(new Property("e", "0", false,
72  QObject::tr("frequency exponent")));
73  Props.append(new Property("c", "1", false,
74  QObject::tr("frequency coefficient")));
75  Props.append(new Property("a", "0", false,
76  QObject::tr("additive frequency term")));
77 }
78 
80 {
81 }
82 
84 {
85  return new Noise_iv();
86 }
87 
88 Element* Noise_iv::info(QString& Name, char* &BitmapFile, bool getNewOne)
89 {
90  Name = QObject::tr("Correlated Noise Sources");
91  BitmapFile = (char *) "noise_iv";
92 
93  if(getNewOne) return new Noise_iv();
94  return 0;
95 }
Q3PtrList< Line > Lines
Definition: component.h:67
Definition: element.h:55
int y1
Definition: element.h:153
Q3PtrList< struct Arc > Arcs
Definition: component.h:68
int tx
Definition: component.h:78
int y2
Definition: element.h:153
Definition: element.h:72
int x1
Definition: element.h:153
static Element * info(QString &, char *&, bool getNewOne=false)
Definition: noise_iv.cpp:88
int ty
Definition: component.h:78
Q3PtrList< Property > Props
Definition: component.h:72
Noise_iv()
Definition: noise_iv.cpp:21
Definition: element.h:48
Superclass of all schematic drawing elements.
Definition: element.h:142
Q3PtrList< Port > Ports
Definition: component.h:70
QString Name
Definition: component.h:80
QString Model
Definition: component.h:80
Component * newOne()
Definition: noise_iv.cpp:83
QString Description
Definition: component.h:81
~Noise_iv()
Definition: noise_iv.cpp:79
int x2
Definition: element.h:153