My Project  0.0.16
QUCS Mapping
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
mstee.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  mstee.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 "mstee.h"
19 #include "main.h"
20 
22 {
23  Description = QObject::tr("microstrip tee");
24 
25  x1 = -30; y1 = -11;
26  x2 = 30; y2 = 30;
27 
28  QFontMetrics metrics(QucsSettings.font); // get size of text
29  tx = x1+4;
30  ty = y1 - 5*metrics.lineSpacing() - 4;
31  Model = "MTEE";
32  Name = "MS";
33 
34  Props.append(new Property("Subst", "Subst1", true,
35  QObject::tr("substrate")));
36  Props.append(new Property("W1", "1 mm", true,
37  QObject::tr("width of line 1")));
38  Props.append(new Property("W2", "1 mm", true,
39  QObject::tr("width of line 2")));
40  Props.append(new Property("W3", "2 mm", true,
41  QObject::tr("width of line 3")));
42  Props.append(new Property("MSModel", "Hammerstad", false,
43  QObject::tr("quasi-static microstrip model")+
44  " [Hammerstad, Wheeler, Schneider]"));
45  Props.append(new Property("MSDispModel", "Kirschning", false,
46  QObject::tr("microstrip dispersion model")+" [Kirschning, Kobayashi, "
47  "Yamashita, Hammerstad, Getsinger, Schneider, Pramanick]"));
48  Props.append(new Property("Temp", "26.85", false,
49  QObject::tr("temperature in degree Celsius")));
50  Props.append(new Property("Symbol", "showNumbers", false,
51  QObject::tr("show port numbers in symbol or not")+
52  " [showNumbers, noNumbers]"));
53 
54  createSymbol();
55 }
56 
58 {
59 }
60 
62 {
63  return new MStee();
64 }
65 
66 Element* MStee::info(QString& Name, char* &BitmapFile, bool getNewOne)
67 {
68  Name = QObject::tr("Microstrip Tee");
69  BitmapFile = (char *) "mstee";
70 
71  if(getNewOne) return new MStee();
72  return 0;
73 }
74 
76 {
77  Lines.append(new Line(-30, 0,-18, 0,QPen(QPen::darkBlue,2)));
78  Lines.append(new Line( 18, 0, 30, 0,QPen(QPen::darkBlue,2)));
79  Lines.append(new Line( 0, 18, 0, 30,QPen(QPen::darkBlue,2)));
80  Lines.append(new Line(-18, -8, 18, -8,QPen(QPen::darkBlue,2)));
81  Lines.append(new Line(-18, 8, -8, 8,QPen(QPen::darkBlue,2)));
82  Lines.append(new Line( 8, 8, 18, 8,QPen(QPen::darkBlue,2)));
83  Lines.append(new Line(-18, -8,-18, 8,QPen(QPen::darkBlue,2)));
84  Lines.append(new Line( 18, -8, 18, 8,QPen(QPen::darkBlue,2)));
85  Lines.append(new Line( -8, 8, -8, 18,QPen(QPen::darkBlue,2)));
86  Lines.append(new Line( 8, 8, 8, 18,QPen(QPen::darkBlue,2)));
87  Lines.append(new Line( -8, 18, 8, 18,QPen(QPen::darkBlue,2)));
88 
89  if(Props.getLast()->Value.at(0) != 'n') {
90  Texts.append(new Text(-26, 3, "1"));
91  Texts.append(new Text( 21, 3, "2"));
92  Texts.append(new Text( 4,18, "3"));
93  }
94 
95  Ports.append(new Port(-30, 0));
96  Ports.append(new Port( 30, 0));
97  Ports.append(new Port( 0,30));
98 }