Qucs-GUI  0.0.18
 All Data Structures 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(Qt::darkBlue,2)));
26  Arcs.append(new Arc( -6, -6, 12, 12, 0, 16*180,QPen(Qt::darkBlue,2)));
27  Arcs.append(new Arc( 6, -6, 12, 12, 0, 16*180,QPen(Qt::darkBlue,2)));
28  Lines.append(new Line(-30, 0,-18, 0,QPen(Qt::darkBlue,2)));
29  Lines.append(new Line( 18, 0, 30, 0,QPen(Qt::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 }
Component * newOne()
Definition: inductor.cpp:52
Q3PtrList< Line > Lines
Definition: component.h:67
Definition: element.h:55
int y1
Definition: element.h:153
Q3PtrList< struct Arc > Arcs
Definition: component.h:68
int tx
Definition: component.h:78
int y2
Definition: element.h:153
Definition: element.h:72
int x1
Definition: element.h:153
~Inductor()
Definition: inductor.cpp:48
int ty
Definition: component.h:78
Q3PtrList< Property > Props
Definition: component.h:72
Definition: element.h:48
Superclass of all schematic drawing elements.
Definition: element.h:142
Q3PtrList< Port > Ports
Definition: component.h:70
QString Name
Definition: component.h:80
QString Model
Definition: component.h:80
QString Description
Definition: component.h:81
static Element * info(QString &, char *&, bool getNewOne=false)
Definition: inductor.cpp:57
Inductor()
Definition: inductor.cpp:21
int x2
Definition: element.h:153