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