My Project  0.0.16
QUCS Mapping
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
volt_noise.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  volt_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 "volt_noise.h"
19 
20 
22 {
23  Description = QObject::tr("noise voltage 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 
29  Lines.append(new Line(-12, 1, 1,-12,QPen(QPen::darkBlue,2)));
30  Lines.append(new Line(-10, 6, 6,-10,QPen(QPen::darkBlue,2)));
31  Lines.append(new Line( -7, 10, 10, -7,QPen(QPen::darkBlue,2)));
32  Lines.append(new Line( -2, 12, 12, -2,QPen(QPen::darkBlue,2)));
33 
34  Ports.append(new Port( 30, 0));
35  Ports.append(new Port(-30, 0));
36 
37  x1 = -30; y1 = -15;
38  x2 = 30; y2 = 15;
39 
40  tx = x1+4;
41  ty = y2+4;
42  Model = "Vnoise";
43  Name = "V";
44 
45  Props.append(new Property("u", "1e-6", true,
46  QObject::tr("voltage power spectral density in V^2/Hz")));
47  Props.append(new Property("e", "0", false,
48  QObject::tr("frequency exponent")));
49  Props.append(new Property("c", "1", false,
50  QObject::tr("frequency coefficient")));
51  Props.append(new Property("a", "0", false,
52  QObject::tr("additive frequency term")));
53 
54  rotate(); // fix historical flaw
55 }
56 
58 {
59 }
60 
62 {
63  return new Volt_noise();
64 }
65 
66 Element* Volt_noise::info(QString& Name, char* &BitmapFile, bool getNewOne)
67 {
68  Name = QObject::tr("Noise Voltage Source");
69  BitmapFile = (char *) "noise_volt";
70 
71  if(getNewOne) return new Volt_noise();
72  return 0;
73 }