My Project  0.0.16
QUCS Mapping
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
circulator.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  circulator.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 "circulator.h"
19 #include "main.h"
20 
21 
23 {
24  Description = QObject::tr("circulator");
25 
26  Arcs.append(new Arc(-14,-14, 28, 28, 0,16*360,QPen(QPen::darkBlue,2)));
27  Lines.append(new Line(-30, 0,-14, 0,QPen(QPen::darkBlue,2)));
28  Lines.append(new Line( 30, 0, 14, 0,QPen(QPen::darkBlue,2)));
29  Lines.append(new Line( 0, 14, 0, 30,QPen(QPen::darkBlue,2)));
30 
31  Arcs.append(new Arc( -8, -6, 16, 16,16*20,16*150,QPen(QPen::darkBlue,2)));
32  Lines.append(new Line( 8, 0, 9, -7,QPen(QPen::darkBlue,2)));
33  Lines.append(new Line( 8, 0, 2, -1,QPen(QPen::darkBlue,2)));
34 
35  Lines.append(new Line(-22, -4,-26, 4,QPen(QPen::darkBlue,2))); // marks port 1
36 
37  Ports.append(new Port(-30, 0));
38  Ports.append(new Port( 30, 0));
39  Ports.append(new Port( 0, 30));
40 
41  x1 = -30; y1 = -16;
42  x2 = 30; y2 = 30;
43 
44  tx = x1+4;
45  ty = y1-QucsSettings.font.pointSize()-4;
46  Model = "Circulator";
47  Name = "X";
48 
49  Props.append(new Property("Z1", "50 Ohm", false,
50  QObject::tr("reference impedance of port 1")));
51  Props.append(new Property("Z2", "50 Ohm", false,
52  QObject::tr("reference impedance of port 2")));
53  Props.append(new Property("Z3", "50 Ohm", false,
54  QObject::tr("reference impedance of port 3")));
55 }
56 
58 {
59 }
60 
62 {
63  return new Circulator();
64 }
65 
66 Element* Circulator::info(QString& Name, char* &BitmapFile, bool getNewOne)
67 {
68  Name = QObject::tr("Circulator");
69  BitmapFile = (char *) "circulator";
70 
71  if(getNewOne) return new Circulator();
72  return 0;
73 }