My Project  0.0.16
QUCS Mapping
 All Classes Namespaces 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(QPen::darkBlue,2)));
26  Lines.append(new Line(-20, 9, 20, 9,QPen(QPen::darkBlue,2)));
27  Lines.append(new Line(-20,-31,-20, 9,QPen(QPen::darkBlue,2)));
28  Lines.append(new Line( 20,-31, 20, 9,QPen(QPen::darkBlue,2)));
29 
30  Lines.append(new Line(-16,-27, 16,-27,QPen(QPen::darkBlue,2)));
31  Lines.append(new Line(-16, -9, 16, -9,QPen(QPen::darkBlue,2)));
32  Lines.append(new Line(-16,-27,-16, -9,QPen(QPen::darkBlue,2)));
33  Lines.append(new Line( 16,-27, 16, -9,QPen(QPen::darkBlue,2)));
34 
35  Arcs.append(new Arc(-20,-23, 39, 39, 16*50, 16*80,QPen(QPen::darkBlue,2)));
36  Lines.append(new Line(-11,-24, -2, -9,QPen(QPen::darkBlue,2)));
37 
38  Lines.append(new Line(-10, 0,-10, 6,QPen(QPen::red,2)));
39  Lines.append(new Line(-13, 3, -7, 3,QPen(QPen::red,2)));
40  Lines.append(new Line( 7, 3, 13, 3,QPen(QPen::black,2)));
41 
42  Lines.append(new Line(-10, 9,-10, 20,QPen(QPen::darkBlue,2)));
43  Lines.append(new Line( 10, 9, 10, 20,QPen(QPen::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 }