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