My Project  0.0.16
QUCS Mapping
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
msrstub.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  msrstub.cpp - description
3  -----------------------------
4  begin : Sun Mar 15 2009
5  copyright : (C) 2009 by Stefan Jahn
6  email : stefan@lkcc.org
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 "msrstub.h"
19 
21 {
22  Description = QObject::tr("microstrip radial stub");
23 
24  Arcs.append(new Arc( -26, -26, 52, 52,16*45, 16*90,QPen(QPen::darkBlue,2)));
25 
26  Lines.append(new Line(-5, 0, 5, 0,QPen(QPen::darkBlue,2)));
27  Lines.append(new Line(-5, 0,-18,-18,QPen(QPen::darkBlue,2)));
28  Lines.append(new Line( 5, 0, 18,-18,QPen(QPen::darkBlue,2)));
29  Lines.append(new Line( 0, 0, 0, 10,QPen(QPen::darkBlue,2)));
30 
31  Ports.append(new Port(0, 10));
32 
33  x1 = -22; y1 =-30;
34  x2 = 22; y2 = 10;
35 
36  tx = x1+4;
37  ty = y2+4;
38  Model = "MRSTUB";
39  Name = "MS";
40 
41  Props.append(new Property("Subst", "Subst1", true,
42  QObject::tr("name of substrate definition")));
43  Props.append(new Property("ri", "1 mm", false,
44  QObject::tr("inner radius")));
45  Props.append(new Property("ro", "10 mm", true,
46  QObject::tr("outer radius")));
47  Props.append(new Property("alpha", "90", true,
48  QObject::tr("stub angle")+" ("+QObject::tr ("degrees")+")"));
49 }
50 
52 {
53 }
54 
56 {
57  return new MSrstub();
58 }
59 
60 Element* MSrstub::info(QString& Name, char* &BitmapFile, bool getNewOne)
61 {
62  Name = QObject::tr("Microstrip Radial Stub");
63  BitmapFile = (char *) "msrstub";
64 
65  if(getNewOne) return new MSrstub();
66  return 0;
67 }