Qucs-GUI  0.0.18
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
isolator.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  isolator.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 "isolator.h"
19 
20 
22 {
23  Description = QObject::tr("isolator");
24 
25  Lines.append(new Line( -8, 0, 8, 0,QPen(Qt::darkBlue,3)));
26  Lines.append(new Line( 8, 0, 0, -5,QPen(Qt::darkBlue,3)));
27  Lines.append(new Line( 8, 0, 0, 5,QPen(Qt::darkBlue,3)));
28 
29  Lines.append(new Line(-14,-14, 14,-14,QPen(Qt::darkBlue,2)));
30  Lines.append(new Line(-14, 14, 14, 14,QPen(Qt::darkBlue,2)));
31  Lines.append(new Line(-14,-14,-14, 14,QPen(Qt::darkBlue,2)));
32  Lines.append(new Line( 14,-14, 14, 14,QPen(Qt::darkBlue,2)));
33 
34  Lines.append(new Line(-30, 0,-14, 0,QPen(Qt::darkBlue,2)));
35  Lines.append(new Line( 14, 0, 30, 0,QPen(Qt::darkBlue,2)));
36 
37  Ports.append(new Port(-30, 0));
38  Ports.append(new Port( 30, 0));
39 
40  x1 = -30; y1 = -17;
41  x2 = 30; y2 = 17;
42 
43  tx = x1+4;
44  ty = y2+4;
45  Model = "Isolator";
46  Name = "X";
47 
48  Props.append(new Property("Z1", "50 Ohm", false,
49  QObject::tr("reference impedance of input port")));
50  Props.append(new Property("Z2", "50 Ohm", false,
51  QObject::tr("reference impedance of output port")));
52  Props.append(new Property("Temp", "26.85", false,
53  QObject::tr("simulation temperature in degree Celsius")));
54 }
55 
57 {
58 }
59 
61 {
62  return new Isolator();
63 }
64 
65 Element* Isolator::info(QString& Name, char* &BitmapFile, bool getNewOne)
66 {
67  Name = QObject::tr("Isolator");
68  BitmapFile = (char *) "isolator";
69 
70  if(getNewOne) return new Isolator();
71  return 0;
72 }
Q3PtrList< Line > Lines
Definition: component.h:67
int y1
Definition: element.h:153
int tx
Definition: component.h:78
int y2
Definition: element.h:153
Definition: element.h:72
int x1
Definition: element.h:153
Component * newOne()
Definition: isolator.cpp:60
int ty
Definition: component.h:78
Q3PtrList< Property > Props
Definition: component.h:72
static Element * info(QString &, char *&, bool getNewOne=false)
Definition: isolator.cpp:65
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
~Isolator()
Definition: isolator.cpp:56
int x2
Definition: element.h:153
Isolator()
Definition: isolator.cpp:21