My Project  0.0.16
QUCS Mapping
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
inductor.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  inductor.cpp - description
3  -------------------
4  begin : Sat Aug 23 2003
5  copyright : (C) 2003 by Michael Margraf
6  email : michael.margraf@alumni.tu-berlin.de
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #include "inductor.h"
19 
20 
22 {
23  Description = QObject::tr("inductor");
24 
25  Arcs.append(new Arc(-18, -6, 12, 12, 0, 16*180,QPen(QPen::darkBlue,2)));
26  Arcs.append(new Arc( -6, -6, 12, 12, 0, 16*180,QPen(QPen::darkBlue,2)));
27  Arcs.append(new Arc( 6, -6, 12, 12, 0, 16*180,QPen(QPen::darkBlue,2)));
28  Lines.append(new Line(-30, 0,-18, 0,QPen(QPen::darkBlue,2)));
29  Lines.append(new Line( 18, 0, 30, 0,QPen(QPen::darkBlue,2)));
30 
31  Ports.append(new Port(-30, 0));
32  Ports.append(new Port( 30, 0));
33 
34  x1 = -30; y1 = -10;
35  x2 = 30; y2 = 6;
36 
37  tx = x1+4;
38  ty = y2+4;
39  Model = "L";
40  Name = "L";
41 
42  Props.append(new Property("L", "1 nH", true,
43  QObject::tr("inductance in Henry")));
44  Props.append(new Property("I", "", false,
45  QObject::tr("initial current for transient simulation")));
46 }
47 
49 {
50 }
51 
53 {
54  return new Inductor();
55 }
56 
57 Element* Inductor::info(QString& Name, char* &BitmapFile, bool getNewOne)
58 {
59  Name = QObject::tr("Inductor");
60  BitmapFile = (char *) "inductor"; // bitmap file name without suffix
61 
62  if(getNewOne) return new Inductor();
63  return 0;
64 }