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