Qucs-GUI  0.0.18
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
substrate.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  substrate.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 "substrate.h"
19 
20 
22 {
23  Description = QObject::tr("substrate definition");
24 
25  Lines.append(new Line(-30,-16, 30,-16,QPen(Qt::darkBlue,2)));
26  Lines.append(new Line(-30,-12, 30,-12,QPen(Qt::darkBlue,2)));
27  Lines.append(new Line(-30, 16, 30, 16,QPen(Qt::darkBlue,2)));
28  Lines.append(new Line(-30, 12, 30, 12,QPen(Qt::darkBlue,2)));
29  Lines.append(new Line(-30,-16,-30, 16,QPen(Qt::darkBlue,2)));
30  Lines.append(new Line( 30,-16, 30, 16,QPen(Qt::darkBlue,2)));
31 
32  Lines.append(new Line(-30,-16, 16,-40,QPen(Qt::darkBlue,2)));
33  Lines.append(new Line( 30,-16, 80,-40,QPen(Qt::darkBlue,2)));
34  Lines.append(new Line( 30,-12, 80,-36,QPen(Qt::darkBlue,2)));
35  Lines.append(new Line( 30, 12, 80,-16,QPen(Qt::darkBlue,2)));
36  Lines.append(new Line( 30, 16, 80,-12,QPen(Qt::darkBlue,2)));
37  Lines.append(new Line( 16,-40, 80,-40,QPen(Qt::darkBlue,2)));
38  Lines.append(new Line( 80,-40, 80,-12,QPen(Qt::darkBlue,2)));
39 
40  Lines.append(new Line(-30, 0,-18,-12,QPen(Qt::darkBlue,1)));
41  Lines.append(new Line(-22, 12, 2,-12,QPen(Qt::darkBlue,1)));
42  Lines.append(new Line( -2, 12, 22,-12,QPen(Qt::darkBlue,1)));
43  Lines.append(new Line( 18, 12, 30, 0,QPen(Qt::darkBlue,1)));
44 
45  Lines.append(new Line( 30, 1, 37, 8,QPen(Qt::darkBlue,1)));
46  Lines.append(new Line( 37,-15, 52, 0,QPen(Qt::darkBlue,1)));
47  Lines.append(new Line( 52,-22, 66, -8,QPen(Qt::darkBlue,1)));
48  Lines.append(new Line( 66,-30, 80,-16,QPen(Qt::darkBlue,1)));
49 
50  x1 = -34; y1 =-44;
51  x2 = 84; y2 = 20;
52 
53  tx = x1+4;
54  ty = y2+4;
55  Model = "SUBST";
56  Name = "Subst";
57 
58  Props.append(new Property("er", "9.8", true,
59  QObject::tr("relative permittivity")));
60  Props.append(new Property("h", "1 mm", true,
61  QObject::tr("thickness in meters")));
62  Props.append(new Property("t", "35 um", true,
63  QObject::tr("thickness of metalization")));
64  Props.append(new Property("tand", "2e-4", true,
65  QObject::tr("loss tangent")));
66  Props.append(new Property("rho", "0.022e-6", true,
67  QObject::tr("specific resistance of metal")));
68  Props.append(new Property("D", "0.15e-6", true,
69  QObject::tr("rms substrate roughness")));
70 }
71 
73 {
74 }
75 
77 {
78  return new Substrate();
79 }
80 
81 Element* Substrate::info(QString& Name, char* &BitmapFile, bool getNewOne)
82 {
83  Name = QObject::tr("Substrate");
84  BitmapFile = (char *) "substrate";
85 
86  if(getNewOne) return new Substrate();
87  return 0;
88 }
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
int x1
Definition: element.h:153
int ty
Definition: component.h:78
Q3PtrList< Property > Props
Definition: component.h:72
Component * newOne()
Definition: substrate.cpp:76
Definition: element.h:48
Superclass of all schematic drawing elements.
Definition: element.h:142
QString Name
Definition: component.h:80
QString Model
Definition: component.h:80
QString Description
Definition: component.h:81
static Element * info(QString &, char *&, bool getNewOne=false)
Definition: substrate.cpp:81
int x2
Definition: element.h:153