Qucs-GUI  0.0.19
/home/travis/build/Qucs/qucs/qucs/qucs/components/amplifier.cpp
Go to the documentation of this file.
00001 /***************************************************************************
00002                         amplifier.cpp  -  description
00003                              -------------------
00004     begin                : Sat Oct 30 2004
00005     copyright            : (C) 2004 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 "amplifier.h"
00019 
00020 
00021 Amplifier::Amplifier()
00022 {
00023   Description = QObject::tr("ideal amplifier");
00024 
00025   Lines.append(new Line(-16,-20,-16, 20,QPen(Qt::darkBlue,2)));
00026   Lines.append(new Line(-16,-20, 16,  0,QPen(Qt::darkBlue,2)));
00027   Lines.append(new Line(-16, 20, 16,  0,QPen(Qt::darkBlue,2)));
00028 
00029   Lines.append(new Line(-30,  0,-16,  0,QPen(Qt::darkBlue,2)));
00030   Lines.append(new Line( 16,  0, 30,  0,QPen(Qt::darkBlue,2)));
00031 
00032   Ports.append(new Port(-30,  0));
00033   Ports.append(new Port( 30,  0));
00034 
00035   x1 = -30; y1 = -23;
00036   x2 =  30; y2 =  23;
00037 
00038   tx = x1+4;
00039   ty = y2+4;
00040   Model = "Amp";
00041   Name  = "X";
00042 
00043   Props.append(new Property("G", "10", true,
00044     QObject::tr("voltage gain")));
00045   Props.append(new Property("Z1", "50 Ohm", false,
00046     QObject::tr("reference impedance of input port")));
00047   Props.append(new Property("Z2", "50 Ohm", false,
00048     QObject::tr("reference impedance of output port")));
00049   Props.append(new Property("NF", "0 dB", false,
00050     QObject::tr("noise figure")));
00051 }
00052 
00053 Amplifier::~Amplifier()
00054 {
00055 }
00056 
00057 Component* Amplifier::newOne()
00058 {
00059   return new Amplifier();
00060 }
00061 
00062 Element* Amplifier::info(QString& Name, char* &BitmapFile, bool getNewOne)
00063 {
00064   Name = QObject::tr("Amplifier");
00065   BitmapFile = (char *) "amplifier";
00066 
00067   if(getNewOne)  return new Amplifier();
00068   return 0;
00069 }
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines