My Project  0.0.16
QUCS Mapping
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ground.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  ground.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 "ground.h"
19 #include "node.h"
20 
21 
23 {
24  Type = isComponent; // both analog and digital
25  Description = QObject::tr("ground (reference potential)");
26 
27  Lines.append(new Line( 0, 0, 0, 10,QPen(QPen::darkBlue,2)));
28  Lines.append(new Line(-11, 10, 11, 10,QPen(QPen::darkBlue,3)));
29  Lines.append(new Line( -7, 16, 7, 16,QPen(QPen::darkBlue,3)));
30  Lines.append(new Line( -3, 22, 3, 22,QPen(QPen::darkBlue,3)));
31 
32  Ports.append(new Port( 0, 0));
33 
34  x1 = -12; y1 = 0;
35  x2 = 12; y2 = 25;
36 
37  tx = 0;
38  ty = 0;
39  Model = "GND";
40  Name = "";
41 }
42 
44 {
45 }
46 
48 {
49  return new Ground();
50 }
51 
52 // -------------------------------------------------------
53 Element* Ground::info(QString& Name, char* &BitmapFile, bool getNewOne)
54 {
55  Name = QObject::tr("Ground");
56  BitmapFile = (char *) "gnd";
57 
58  if(getNewOne) return new Ground();
59  return 0;
60 }
61 
62 // -------------------------------------------------------
63 QString Ground::netlist()
64 {
65  return QString("");
66 }