Qucs-GUI  0.0.19
/home/travis/build/Qucs/qucs/qucs/qucs/components/ground.cpp
Go to the documentation of this file.
00001 /***************************************************************************
00002                                 ground.cpp
00003                                ------------
00004     begin                : Sat Aug 23 2003
00005     copyright            : (C) 2003 by Michael Margraf
00006     email                : michael.margraf@alumni.tu-berlin.de
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #include "ground.h"
00019 #include "node.h"
00020 
00021 
00022 Ground::Ground()
00023 {
00024   Type = isComponent;   // both analog and digital
00025   Description = QObject::tr("ground (reference potential)");
00026 
00027   Lines.append(new Line(  0,  0,  0, 10,QPen(Qt::darkBlue,2)));
00028   Lines.append(new Line(-11, 10, 11, 10,QPen(Qt::darkBlue,3)));
00029   Lines.append(new Line( -7, 16,  7, 16,QPen(Qt::darkBlue,3)));
00030   Lines.append(new Line( -3, 22,  3, 22,QPen(Qt::darkBlue,3)));
00031 
00032   Ports.append(new Port(  0,  0));
00033 
00034   x1 = -12; y1 =  0;
00035   x2 =  12; y2 = 25;
00036 
00037   tx = 0;
00038   ty = 0;
00039   Model = "GND";
00040   Name  = "";
00041 }
00042 
00043 Ground::~Ground()
00044 {
00045 }
00046 
00047 Component* Ground::newOne()
00048 {
00049   return new Ground();
00050 }
00051 
00052 // -------------------------------------------------------
00053 Element* Ground::info(QString& Name, char* &BitmapFile, bool getNewOne)
00054 {
00055   Name = QObject::tr("Ground");
00056   BitmapFile = (char *) "gnd";
00057 
00058   if(getNewOne)  return new Ground();
00059   return 0;
00060 }
00061 
00062 // -------------------------------------------------------
00063 QString Ground::netlist()
00064 {
00065   return QString("");
00066 }
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines