Qucs-GUI  0.0.18
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
iprobe.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  iprobe.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 "iprobe.h"
19 
20 
22 {
23  Description = QObject::tr("current probe");
24 
25  Lines.append(new Line(-30, 0,-20, 0,QPen(Qt::darkBlue,2)));
26  Lines.append(new Line( 30, 0, 20, 0,QPen(Qt::darkBlue,2)));
27  Lines.append(new Line(-20, 0, 20, 0,QPen(Qt::darkBlue,3)));
28  Lines.append(new Line( 4, 0, -4, -4,QPen(Qt::darkBlue,3)));
29  Lines.append(new Line( 4, 0, -4, 4,QPen(Qt::darkBlue,3)));
30 
31  Lines.append(new Line(-20,-31, 20,-31,QPen(Qt::darkBlue,2)));
32  Lines.append(new Line(-20, 9, 20, 9,QPen(Qt::darkBlue,2)));
33  Lines.append(new Line(-20,-31,-20, 9,QPen(Qt::darkBlue,2)));
34  Lines.append(new Line( 20,-31, 20, 9,QPen(Qt::darkBlue,2)));
35 
36  Lines.append(new Line(-16,-27, 16,-27,QPen(Qt::darkBlue,2)));
37  Lines.append(new Line(-16, -9, 16, -9,QPen(Qt::darkBlue,2)));
38  Lines.append(new Line(-16,-27,-16, -9,QPen(Qt::darkBlue,2)));
39  Lines.append(new Line( 16,-27, 16, -9,QPen(Qt::darkBlue,2)));
40 
41  Arcs.append(new Arc(-20,-23, 39, 39, 16*50, 16*80,QPen(Qt::darkBlue,2)));
42  Lines.append(new Line(-11,-24, -2, -9,QPen(Qt::darkBlue,2)));
43 
44  Ports.append(new Port(-30, 0));
45  Ports.append(new Port( 30, 0));
46 
47  x1 = -30; y1 = -34;
48  x2 = 30; y2 = 12;
49 
50  tx = x1+4;
51  ty = y2+4;
52  Model = "IProbe";
53  Name = "Pr";
54 }
55 
57 {
58 }
59 
61 {
62  return new iProbe();
63 }
64 
65 Element* iProbe::info(QString& Name, char* &BitmapFile, bool getNewOne)
66 {
67  Name = QObject::tr("Current Probe");
68  BitmapFile = (char *) "iprobe";
69 
70  if(getNewOne) return new iProbe();
71  return 0;
72 }
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
static Element * info(QString &, char *&, bool getNewOne=false)
Definition: iprobe.cpp:65
Component * newOne()
Definition: iprobe.cpp:60
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
iProbe()
Definition: iprobe.cpp:21
QString Description
Definition: component.h:81
int x2
Definition: element.h:153
~iProbe()
Definition: iprobe.cpp:56