Qucs-GUI  0.0.18
 All Data Structures 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(Qt::darkBlue,2)));
28  Lines.append(new Line(-11, 10, 11, 10,QPen(Qt::darkBlue,3)));
29  Lines.append(new Line( -7, 16, 7, 16,QPen(Qt::darkBlue,3)));
30  Lines.append(new Line( -3, 22, 3, 22,QPen(Qt::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 }
Ground()
Definition: ground.cpp:22
Q3PtrList< Line > Lines
Definition: component.h:67
int Type
Definition: element.h:152
QString netlist()
Definition: ground.cpp:63
int y1
Definition: element.h:153
int tx
Definition: component.h:78
int y2
Definition: element.h:153
Definition: element.h:72
int x1
Definition: element.h:153
int ty
Definition: component.h:78
static Element * info(QString &, char *&, bool getNewOne=false)
Definition: ground.cpp:53
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
#define isComponent
Definition: element.h:110
int x2
Definition: element.h:153
~Ground()
Definition: ground.cpp:43
Component * newOne()
Definition: ground.cpp:47