Qucs-GUI  0.0.18
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
phaseshifter.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  phaseshifter.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 "phaseshifter.h"
19 
20 
22 {
23  Description = QObject::tr("phase shifter");
24 
25  Lines.append(new Line(-14,-14, 14,-14,QPen(Qt::darkBlue,2)));
26  Lines.append(new Line(-14, 14, 14, 14,QPen(Qt::darkBlue,2)));
27  Lines.append(new Line(-14,-14,-14, 14,QPen(Qt::darkBlue,2)));
28  Lines.append(new Line( 14,-14, 14, 14,QPen(Qt::darkBlue,2)));
29  Arcs.append(new Arc( -9, -9, 17, 17, 0, 16*360,QPen(Qt::darkBlue,2)));
30  Lines.append(new Line(-10, 10, 10,-10,QPen(Qt::darkBlue,2)));
31 
32  Lines.append(new Line(-30, 0,-14, 0,QPen(Qt::darkBlue,2)));
33  Lines.append(new Line( 14, 0, 30, 0,QPen(Qt::darkBlue,2)));
34 
35  Ports.append(new Port(-30, 0));
36  Ports.append(new Port( 30, 0));
37 
38  x1 = -30; y1 = -17;
39  x2 = 30; y2 = 17;
40 
41  tx = x1+4;
42  ty = y2+4;
43  Model = "PShift";
44  Name = "X";
45 
46  Props.append(new Property("phi", "90", true,
47  QObject::tr("phase shift in degree")));
48  Props.append(new Property("Zref", "50 Ohm", false,
49  QObject::tr("reference impedance")));
50 }
51 
53 {
54 }
55 
57 {
58  return new Phaseshifter();
59 }
60 
61 Element* Phaseshifter::info(QString& Name, char* &BitmapFile, bool getNewOne)
62 {
63  Name = QObject::tr("Phase Shifter");
64  BitmapFile = (char *) "pshifter";
65 
66  if(getNewOne) return new Phaseshifter();
67  return 0;
68 }
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
Q3PtrList< Property > Props
Definition: component.h:72
Component * newOne()
Definition: element.h:48
Superclass of all schematic drawing elements.
Definition: element.h:142
static Element * info(QString &, char *&, bool getNewOne=false)
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
int x2
Definition: element.h:153