Qucs-GUI  0.0.18
 All Data Structures 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(Qt::darkBlue,2)));
25 
26  Lines.append(new Line(-5, 0, 5, 0,QPen(Qt::darkBlue,2)));
27  Lines.append(new Line(-5, 0,-18,-18,QPen(Qt::darkBlue,2)));
28  Lines.append(new Line( 5, 0, 18,-18,QPen(Qt::darkBlue,2)));
29  Lines.append(new Line( 0, 0, 0, 10,QPen(Qt::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 }
Q3PtrList< Line > Lines
Definition: component.h:67
Definition: element.h:55
int y1
Definition: element.h:153
Q3PtrList< struct Arc > Arcs
Definition: component.h:68
static Element * info(QString &, char *&, bool getNewOne=false)
Definition: msrstub.cpp:60
int tx
Definition: component.h:78
int y2
Definition: element.h:153
Definition: element.h:72
int x1
Definition: element.h:153
int ty
Definition: component.h:78
Q3PtrList< Property > Props
Definition: component.h:72
Component * newOne()
Definition: msrstub.cpp:55
Definition: element.h:48
Superclass of all schematic drawing elements.
Definition: element.h:142
Q3PtrList< Port > Ports
Definition: component.h:70
~MSrstub()
Definition: msrstub.cpp:51
QString Name
Definition: component.h:80
QString Model
Definition: component.h:80
QString Description
Definition: component.h:81
MSrstub()
Definition: msrstub.cpp:20
int x2
Definition: element.h:153