My Project  0.0.16
QUCS Mapping
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
msmbend.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  msmbend.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 "msmbend.h"
19 
20 
22 {
23  Description = QObject::tr("microstrip mitered bend");
24 
25  Lines.append(new Line(-30, 0,-18, 0,QPen(QPen::darkBlue,2)));
26  Lines.append(new Line( 0, 18, 0, 30,QPen(QPen::darkBlue,2)));
27  Lines.append(new Line(-18, -8, -8, -8,QPen(QPen::darkBlue,2)));
28  Lines.append(new Line( -8, -8, 8, 8,QPen(QPen::darkBlue,2)));
29  Lines.append(new Line(-18, 8, -8, 8,QPen(QPen::darkBlue,2)));
30  Lines.append(new Line(-18, -8,-18, 8,QPen(QPen::darkBlue,2)));
31  Lines.append(new Line( -8, 8, -8, 18,QPen(QPen::darkBlue,2)));
32  Lines.append(new Line( 8, 8, 8, 18,QPen(QPen::darkBlue,2)));
33  Lines.append(new Line( -8, 18, 8, 18,QPen(QPen::darkBlue,2)));
34 
35  Ports.append(new Port(-30, 0));
36  Ports.append(new Port( 0,30));
37 
38  x1 = -30; y1 =-11;
39  x2 = 11; y2 = 30;
40 
41  tx = x2+4;
42  ty = y1+4;
43  Model = "MMBEND";
44  Name = "MS";
45 
46  Props.append(new Property("Subst", "Subst1", true,
47  QObject::tr("substrate")));
48  Props.append(new Property("W", "1 mm", true,
49  QObject::tr("width of line")));
50 }
51 
53 {
54 }
55 
57 {
58  return new MSmbend();
59 }
60 
61 Element* MSmbend::info(QString& Name, char* &BitmapFile, bool getNewOne)
62 {
63  Name = QObject::tr("Microstrip Mitered Bend");
64  BitmapFile = (char *) "msmbend";
65 
66  if(getNewOne) return new MSmbend();
67  return 0;
68 }