Qucs-GUI  0.0.18
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
mutual2.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  mutual2.cpp
3  --------------
4  begin : Sat Aug 20 2005
5  copyright : (C) 2005 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 "mutual2.h"
19 
20 
22 {
23  Description = QObject::tr("three mutual inductors");
24 
25  Arcs.append(new Arc(-16,-58,12,12, 16*270,16*180, QPen(Qt::darkBlue,2)));
26  Arcs.append(new Arc(-16,-46,12,12, 16*270,16*180, QPen(Qt::darkBlue,2)));
27  Arcs.append(new Arc(-16,-34,12,12, 16*270,16*180, QPen(Qt::darkBlue,2)));
28  Arcs.append(new Arc(-16, 46,12,12, 16*270,16*180, QPen(Qt::darkBlue,2)));
29  Arcs.append(new Arc(-16, 34,12,12, 16*270,16*180, QPen(Qt::darkBlue,2)));
30  Arcs.append(new Arc(-16, 22,12,12, 16*270,16*180, QPen(Qt::darkBlue,2)));
31  Arcs.append(new Arc( 4,-18,12,12, 16*90,16*180, QPen(Qt::darkBlue,2)));
32  Arcs.append(new Arc( 4, -6,12,12, 16*90,16*180, QPen(Qt::darkBlue,2)));
33  Arcs.append(new Arc( 4, 6,12,12, 16*90,16*180, QPen(Qt::darkBlue,2)));
34  Lines.append(new Line(-10,-58,-10,-70,QPen(Qt::darkBlue,2)));
35  Lines.append(new Line(-10,-70,-30,-70,QPen(Qt::darkBlue,2)));
36  Lines.append(new Line( 10,-18, 10,-30,QPen(Qt::darkBlue,2)));
37  Lines.append(new Line( 10,-30, 30,-30,QPen(Qt::darkBlue,2)));
38  Lines.append(new Line(-10, 58,-10, 70,QPen(Qt::darkBlue,2)));
39  Lines.append(new Line(-10, 70,-30, 70,QPen(Qt::darkBlue,2)));
40  Lines.append(new Line( 10, 18, 10, 30,QPen(Qt::darkBlue,2)));
41  Lines.append(new Line( 10, 30, 30, 30,QPen(Qt::darkBlue,2)));
42  Lines.append(new Line(-10,-10,-30,-10,QPen(Qt::darkBlue,2)));
43  Lines.append(new Line(-10,-22,-10,-10,QPen(Qt::darkBlue,2)));
44  Lines.append(new Line(-10, 10,-30, 10,QPen(Qt::darkBlue,2)));
45  Lines.append(new Line(-10, 10,-10, 22,QPen(Qt::darkBlue,2)));
46 
47  Texts.append(new Text(-20,-61,"1"));
48  Texts.append(new Text(-20, 18,"2"));
49  Texts.append(new Text( 15,-22,"3"));
50 
51  Lines.append(new Line( 0,-57, 0, 57,QPen(Qt::darkBlue,1,Qt::DashLine)));
52 
53  Ports.append(new Port(-30,-70));
54  Ports.append(new Port( 30,-30));
55  Ports.append(new Port( 30, 30));
56  Ports.append(new Port(-30, 70));
57  Ports.append(new Port(-30, 10));
58  Ports.append(new Port(-30,-10));
59 
60  x1 = -33; y1 = -74;
61  x2 = 33; y2 = 74;
62 
63  tx = x1+4;
64  ty = y2+4;
65  Model = "MUT2";
66  Name = "Tr";
67 
68  Props.append(new Property("L1", "1 mH", false,
69  QObject::tr("inductance of coil 1")));
70  Props.append(new Property("L2", "1 mH", false,
71  QObject::tr("inductance of coil 2")));
72  Props.append(new Property("L3", "1 mH", false,
73  QObject::tr("inductance of coil 3")));
74  Props.append(new Property("k12", "0.9", false,
75  QObject::tr("coupling factor between coil 1 and 2")));
76  Props.append(new Property("k13", "0.9", false,
77  QObject::tr("coupling factor between coil 1 and 3")));
78  Props.append(new Property("k23", "0.9", false,
79  QObject::tr("coupling factor between coil 2 and 3")));
80 }
81 
83 {
84 }
85 
87 {
88  return new Mutual2();
89 }
90 
91 Element* Mutual2::info(QString& Name, char* &BitmapFile, bool getNewOne)
92 {
93  Name = QObject::tr("3 Mutual Inductors");
94  BitmapFile = (char *) "mutual2";
95 
96  if(getNewOne) return new Mutual2();
97  return 0;
98 }
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
int ty
Definition: component.h:78
Component * newOne()
Definition: mutual2.cpp:86
Q3PtrList< Property > Props
Definition: component.h:72
static Element * info(QString &, char *&, bool getNewOne=false)
Definition: mutual2.cpp:91
Definition: element.h:82
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
Q3PtrList< Text > Texts
Definition: component.h:71
QString Model
Definition: component.h:80
QString Description
Definition: component.h:81
~Mutual2()
Definition: mutual2.cpp:82
int x2
Definition: element.h:153
Mutual2()
Definition: mutual2.cpp:21