Qucs-GUI  0.0.18
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
mscorner.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  mscorner.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 "mscorner.h"
19 
20 
22 {
23  Description = QObject::tr("microstrip corner");
24 
25  Lines.append(new Line(-30, 0,-18, 0,QPen(Qt::darkBlue,2)));
26  Lines.append(new Line( 0, 18, 0, 30,QPen(Qt::darkBlue,2)));
27  Lines.append(new Line(-18, -8, 8, -8,QPen(Qt::darkBlue,2)));
28  Lines.append(new Line(-18, 8, -8, 8,QPen(Qt::darkBlue,2)));
29  Lines.append(new Line(-18, -8,-18, 8,QPen(Qt::darkBlue,2)));
30  Lines.append(new Line( -8, 8, -8, 18,QPen(Qt::darkBlue,2)));
31  Lines.append(new Line( 8, -8, 8, 18,QPen(Qt::darkBlue,2)));
32  Lines.append(new Line( -8, 18, 8, 18,QPen(Qt::darkBlue,2)));
33 
34  Ports.append(new Port(-30, 0));
35  Ports.append(new Port( 0,30));
36 
37  x1 = -30; y1 =-11;
38  x2 = 11; y2 = 30;
39 
40  tx = x2+4;
41  ty = y1+4;
42  Model = "MCORN";
43  Name = "MS";
44 
45  Props.append(new Property("Subst", "Subst1", true,
46  QObject::tr("substrate")));
47  Props.append(new Property("W", "1 mm", true,
48  QObject::tr("width of line")));
49 }
50 
52 {
53 }
54 
56 {
57  return new MScorner();
58 }
59 
60 Element* MScorner::info(QString& Name, char* &BitmapFile, bool getNewOne)
61 {
62  Name = QObject::tr("Microstrip Corner");
63  BitmapFile = (char *) "mscorner";
64 
65  if(getNewOne) return new MScorner();
66  return 0;
67 }
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
Definition: element.h:72
int x1
Definition: element.h:153
~MScorner()
Definition: mscorner.cpp:51
int ty
Definition: component.h:78
MScorner()
Definition: mscorner.cpp:21
Q3PtrList< Property > Props
Definition: component.h:72
Definition: element.h:48
Superclass of all schematic drawing elements.
Definition: element.h:142
Q3PtrList< Port > Ports
Definition: component.h:70
QString Name
Definition: component.h:80
QString Model
Definition: component.h:80
Component * newOne()
Definition: mscorner.cpp:55
QString Description
Definition: component.h:81
int x2
Definition: element.h:153
static Element * info(QString &, char *&, bool getNewOne=false)
Definition: mscorner.cpp:60