Qucs-GUI  0.0.18
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
dcfeed.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  dcfeed.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 "dcfeed.h"
19 
20 
22 {
23  Description = QObject::tr("dc feed");
24 
25  Arcs.append(new Arc(-17, -6, 12, 12, 0, 16*180,QPen(Qt::darkBlue,2)));
26  Arcs.append(new Arc( -6, -6, 12, 12, 0, 16*180,QPen(Qt::darkBlue,2)));
27  Arcs.append(new Arc( 5, -6, 12, 12, 0, 16*180,QPen(Qt::darkBlue,2)));
28  Lines.append(new Line(-30, 0,-17, 0,QPen(Qt::darkBlue,2)));
29  Lines.append(new Line( 17, 0, 30, 0,QPen(Qt::darkBlue,2)));
30 
31  Lines.append(new Line(-23,-13, 23,-13,QPen(Qt::darkBlue,1)));
32  Lines.append(new Line(-23, 13, 23, 13,QPen(Qt::darkBlue,1)));
33  Lines.append(new Line(-23,-13,-23, 13,QPen(Qt::darkBlue,1)));
34  Lines.append(new Line( 23,-13, 23, 13,QPen(Qt::darkBlue,1)));
35 
36  Ports.append(new Port(-30, 0));
37  Ports.append(new Port( 30, 0));
38 
39  x1 = -30; y1 = -15;
40  x2 = 30; y2 = 16;
41 
42  tx = x1+4;
43  ty = y2+4;
44  Model = "DCFeed";
45  Name = "L";
46 
47  Props.append(new Property("L", "1 uH", false,
48  QObject::tr("for transient simulation: inductance in Henry")));
49 }
50 
52 {
53 }
54 
56 {
57  return new dcFeed();
58 }
59 
60 Element* dcFeed::info(QString& Name, char* &BitmapFile, bool getNewOne)
61 {
62  Name = QObject::tr("dc Feed");
63  BitmapFile = (char *) "dcfeed";
64 
65  if(getNewOne) return new dcFeed();
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
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
~dcFeed()
Definition: dcfeed.cpp:51
Q3PtrList< Property > Props
Definition: component.h:72
Component * newOne()
Definition: dcfeed.cpp:55
dcFeed()
Definition: dcfeed.cpp:21
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
QString Description
Definition: component.h:81
static Element * info(QString &, char *&, bool getNewOne=false)
Definition: dcfeed.cpp:60
int x2
Definition: element.h:153