My Project  0.0.16
QUCS Mapping
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
cpwshort.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  cpwshort.cpp
3  ----------------
4  begin : Sun May 01 2005
5  copyright : (C) 2005 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 "cpwshort.h"
19 
20 
22 {
23  Description = QObject::tr("coplanar short");
24 
25  Lines.append(new Line(-30, 0,-18, 0,QPen(QPen::darkBlue,2)));
26  Lines.append(new Line(-13, -8, 3, -8,QPen(QPen::darkBlue,2)));
27  Lines.append(new Line(-23, 8, -7, 8,QPen(QPen::darkBlue,2)));
28  Lines.append(new Line(-13, -8,-23, 8,QPen(QPen::darkBlue,2)));
29 
30  Lines.append(new Line(-25,-13, 6,-13,QPen(QPen::darkBlue,2)));
31  Lines.append(new Line(-25, 13,-10, 13,QPen(QPen::darkBlue,2)));
32  Lines.append(new Line( 6,-13, 3, -8,QPen(QPen::darkBlue,2)));
33  Lines.append(new Line( -7, 8,-10, 13,QPen(QPen::darkBlue,2)));
34 
35  Lines.append(new Line(-24,-21,-16,-13,QPen(QPen::darkBlue,2)));
36  Lines.append(new Line(-16,-21, -8,-13,QPen(QPen::darkBlue,2)));
37  Lines.append(new Line( -8,-21, 0,-13,QPen(QPen::darkBlue,2)));
38  Lines.append(new Line( 0,-21, 12, -9,QPen(QPen::darkBlue,2)));
39  Lines.append(new Line( 8,-21, 12,-17,QPen(QPen::darkBlue,2)));
40 
41  Lines.append(new Line( 4, -9, 12, -1,QPen(QPen::darkBlue,2)));
42  Lines.append(new Line( 1, -4, 12, 7,QPen(QPen::darkBlue,2)));
43  Lines.append(new Line( -2, 1, 12, 15,QPen(QPen::darkBlue,2)));
44 
45  Lines.append(new Line(-25, 18,-22, 21,QPen(QPen::darkBlue,2)));
46  Lines.append(new Line(-22, 13,-14, 21,QPen(QPen::darkBlue,2)));
47  Lines.append(new Line(-14, 13, -6, 21,QPen(QPen::darkBlue,2)));
48  Lines.append(new Line( -8, 11, 2, 21,QPen(QPen::darkBlue,2)));
49  Lines.append(new Line( -5, 6, 10, 21,QPen(QPen::darkBlue,2)));
50 
51  Ports.append(new Port(-30, 0));
52 
53  x1 = -30; y1 =-24;
54  x2 = 14; y2 = 24;
55 
56  tx = x1+4;
57  ty = y2+4;
58  Model = "CSHORT";
59  Name = "CL";
60 
61  Props.append(new Property("Subst", "Subst1", true,
62  QObject::tr("name of substrate definition")));
63  Props.append(new Property("W", "1 mm", true,
64  QObject::tr("width of the line")));
65  Props.append(new Property("S", "1 mm", true,
66  QObject::tr("width of a gap")));
67  Props.append(new Property("Backside", "Air", false,
68  QObject::tr("material at the backside of the substrate")+
69  " [Metal, Air]"));
70 }
71 
73 {
74 }
75 
77 {
78  return new CPWshort();
79 }
80 
81 Element* CPWshort::info(QString& Name, char* &BitmapFile, bool getNewOne)
82 {
83  Name = QObject::tr("Coplanar Short");
84  BitmapFile = (char *) "cpwshort";
85 
86  if(getNewOne) return new CPWshort();
87  return 0;
88 }