Qucs-GUI  0.0.19
/home/travis/build/Qucs/qucs/qucs/qucs/components/dcfeed.cpp
Go to the documentation of this file.
00001 /***************************************************************************
00002                           dcfeed.cpp  -  description
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 "dcfeed.h"
00019 
00020 
00021 dcFeed::dcFeed()
00022 {
00023   Description = QObject::tr("dc feed");
00024 
00025   Arcs.append(new Arc(-17, -6, 12, 12,  0, 16*180,QPen(Qt::darkBlue,2)));
00026   Arcs.append(new Arc( -6, -6, 12, 12,  0, 16*180,QPen(Qt::darkBlue,2)));
00027   Arcs.append(new Arc(  5, -6, 12, 12,  0, 16*180,QPen(Qt::darkBlue,2)));
00028   Lines.append(new Line(-30,  0,-17,  0,QPen(Qt::darkBlue,2)));
00029   Lines.append(new Line( 17,  0, 30,  0,QPen(Qt::darkBlue,2)));
00030 
00031   Lines.append(new Line(-23,-13, 23,-13,QPen(Qt::darkBlue,1)));
00032   Lines.append(new Line(-23, 13, 23, 13,QPen(Qt::darkBlue,1)));
00033   Lines.append(new Line(-23,-13,-23, 13,QPen(Qt::darkBlue,1)));
00034   Lines.append(new Line( 23,-13, 23, 13,QPen(Qt::darkBlue,1)));
00035 
00036   Ports.append(new Port(-30,  0));
00037   Ports.append(new Port( 30,  0));
00038 
00039   x1 = -30; y1 = -15;
00040   x2 =  30; y2 =  16;
00041 
00042   tx = x1+4;
00043   ty = y2+4;
00044   Model = "DCFeed";
00045   Name  = "L";
00046 
00047   Props.append(new Property("L", "1 uH", false,
00048   QObject::tr("for transient simulation: inductance in Henry")));
00049 }
00050 
00051 dcFeed::~dcFeed()
00052 {
00053 }
00054 
00055 Component* dcFeed::newOne()
00056 {
00057   return new dcFeed();
00058 }
00059 
00060 Element* dcFeed::info(QString& Name, char* &BitmapFile, bool getNewOne)
00061 {
00062   Name = QObject::tr("dc Feed");
00063   BitmapFile = (char *) "dcfeed";
00064 
00065   if(getNewOne)  return new dcFeed();
00066   return 0;
00067 }
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines