My Project  0.0.16
QUCS Mapping
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
rectline.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  rectline.cpp
3  -----------------
4  copyright : (C) 2008 by ROUCARIES Bastien
5  email : roucaries.bastien@gmail.com
6  ***************************************************************************/
7 
8 /***************************************************************************
9  * *
10  * This program is free software; you can redistribute it and/or modify *
11  * it under the terms of the GNU General Public License as published by *
12  * the Free Software Foundation; either version 2 of the License, or *
13  * (at your option) any later version. *
14  * *
15  ***************************************************************************/
16 
17 #include "rectline.h"
18 
19 
21 {
22  Description = QObject::tr("Rectangular Waveguide");
23 
24  Lines.append(new Line(-30, 0,-17, 0,QPen(QPen::darkBlue,2)));
25  Lines.append(new Line( 18, 0, 30, 0,QPen(QPen::darkBlue,2)));
26 
27  Lines.append(new Line(-14, -7, 18, -7,QPen(QPen::darkBlue,2)));
28  Lines.append(new Line(-14, -7,-14, 11,QPen(QPen::darkBlue,2)));
29  Lines.append(new Line(-14, 11, 18, 11,QPen(QPen::darkBlue,2)));
30  Lines.append(new Line( 18, -7, 18, 11,QPen(QPen::darkBlue,2)));
31  Lines.append(new Line(-20,-13, 12,-13,QPen(QPen::darkBlue,2)));
32  Lines.append(new Line(-20,-13,-20, 5,QPen(QPen::darkBlue,2)));
33 
34  Lines.append(new Line(-20,-13,-14, -7,QPen(QPen::darkBlue,2)));
35  Lines.append(new Line( 12,-13, 18, -7,QPen(QPen::darkBlue,2)));
36  Lines.append(new Line(-20, 5,-14, 11,QPen(QPen::darkBlue,2)));
37 
38  Ports.append(new Port(-30, 0));
39  Ports.append(new Port( 30, 0));
40 
41  x1 = -30; y1 =-16;
42  x2 = 30; y2 = 14;
43 
44  tx = x1+4;
45  ty = y2+4;
46  Model = "RECTLINE";
47  Name = "Line";
48 
49  Props.append(new Property("a", "2.95 mm", true,
50  QObject::tr("widest side")));
51  Props.append(new Property("b", "0.9 mm", true,
52  QObject::tr("shortest side")));
53  Props.append(new Property("L", "1500 mm", true,
54  QObject::tr("mechanical length of the line")));
55  Props.append(new Property("er", "1", false,
56  QObject::tr("relative permittivity of dielectric")));
57  Props.append(new Property("mur", "1", false,
58  QObject::tr("relative permeability of conductor")));
59  Props.append(new Property("tand", "0", false,
60  QObject::tr("loss tangent")));
61  Props.append(new Property("rho", "0.022e-6", false,
62  QObject::tr("specific resistance of conductor")));
63  Props.append(new Property("Temp", "26.85", false,
64  QObject::tr("simulation temperature in degree Celsius")));
65  Props.append(new Property("Material", "unspecified", false,
66  QObject::tr("material parameter for temperature model")+
67  " [unspecified, Copper, StainlessSteel, Gold]"));
68 }
69 
71 {
72 }
73 
75 {
76  return new RectLine();
77 }
78 
79 Element* RectLine::info(QString& Name, char* &BitmapFile, bool getNewOne)
80 {
81  Name = QObject::tr("Rectangular Waveguide");
82  BitmapFile = (char *) "rectline";
83 
84  if(getNewOne) return new RectLine();
85  return 0;
86 }