My Project  0.0.16
QUCS Mapping
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
dcblock.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  dcblock.cpp - description
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 "dcblock.h"
19 
21 {
22  Description = QObject::tr("dc block");
23 
24  Lines.append(new Line(- 4,-11, -4, 11,QPen(QPen::darkBlue,4)));
25  Lines.append(new Line( 4,-11, 4, 11,QPen(QPen::darkBlue,4)));
26  Lines.append(new Line(-30, 0, -4, 0,QPen(QPen::darkBlue,2)));
27  Lines.append(new Line( 4, 0, 30, 0,QPen(QPen::darkBlue,2)));
28 
29  Lines.append(new Line(-23,-14, 23,-14,QPen(QPen::darkBlue,1)));
30  Lines.append(new Line(-23, 14, 23, 14,QPen(QPen::darkBlue,1)));
31  Lines.append(new Line(-23,-14,-23, 14,QPen(QPen::darkBlue,1)));
32  Lines.append(new Line( 23,-14, 23, 14,QPen(QPen::darkBlue,1)));
33 
34  Ports.append(new Port(-30, 0));
35  Ports.append(new Port( 30, 0));
36 
37  x1 = -30; y1 = -16;
38  x2 = 30; y2 = 17;
39 
40  tx = x1+4;
41  ty = y2+4;
42  Model = "DCBlock";
43  Name = "C";
44 
45  Props.append(new Property("C", "1 uF", false,
46  QObject::tr("for transient simulation: capacitance in Farad")));
47 }
48 
50 {
51 }
52 
54 {
55  return new dcBlock();
56 }
57 
58 Element* dcBlock::info(QString& Name, char* &BitmapFile, bool getNewOne)
59 {
60  Name = QObject::tr("dc Block");
61  BitmapFile = (char *) "dcblock";
62 
63  if(getNewOne) return new dcBlock();
64  return 0;
65 }