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