Qucs-GUI  0.0.19
/home/travis/build/Qucs/qucs/qucs/qucs/components/vprobe.cpp
Go to the documentation of this file.
00001 /***************************************************************************
00002                                 vprobe.cpp
00003                                ------------
00004     begin                : Sat Feb 18 2006
00005     copyright            : (C) 2006 by Michael Margraf
00006     email                : michael.margraf@alumni.tu-berlin.de
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #include "vprobe.h"
00019 
00020 
00021 vProbe::vProbe()
00022 {
00023   Description = QObject::tr("voltage probe");
00024 
00025   Lines.append(new Line(-20,-31, 20,-31,QPen(Qt::darkBlue,2)));
00026   Lines.append(new Line(-20,  9, 20,  9,QPen(Qt::darkBlue,2)));
00027   Lines.append(new Line(-20,-31,-20,  9,QPen(Qt::darkBlue,2)));
00028   Lines.append(new Line( 20,-31, 20,  9,QPen(Qt::darkBlue,2)));
00029 
00030   Lines.append(new Line(-16,-27, 16,-27,QPen(Qt::darkBlue,2)));
00031   Lines.append(new Line(-16, -9, 16, -9,QPen(Qt::darkBlue,2)));
00032   Lines.append(new Line(-16,-27,-16, -9,QPen(Qt::darkBlue,2)));
00033   Lines.append(new Line( 16,-27, 16, -9,QPen(Qt::darkBlue,2)));
00034 
00035   Arcs.append(new Arc(-20,-23, 39, 39, 16*50, 16*80,QPen(Qt::darkBlue,2)));
00036   Lines.append(new Line(-11,-24, -2, -9,QPen(Qt::darkBlue,2)));
00037 
00038   Lines.append(new Line(-10,  0,-10,  6,QPen(Qt::red,2)));
00039   Lines.append(new Line(-13,  3, -7,  3,QPen(Qt::red,2)));
00040   Lines.append(new Line(  7,  3, 13,  3,QPen(Qt::black,2)));
00041   
00042   Lines.append(new Line(-10,  9,-10, 20,QPen(Qt::darkBlue,2)));
00043   Lines.append(new Line( 10,  9, 10, 20,QPen(Qt::darkBlue,2)));
00044   Ports.append(new Port(-10, 20));
00045   Ports.append(new Port( 10, 20));
00046 
00047   x1 = -24; y1 = -35;
00048   x2 =  24; y2 =  20;
00049 
00050   tx = x2+4;
00051   ty = y1+4;
00052   Model = "VProbe";
00053   Name  = "Pr";
00054 }
00055 
00056 vProbe::~vProbe()
00057 {
00058 }
00059 
00060 Component* vProbe::newOne()
00061 {
00062   return new vProbe();
00063 }
00064 
00065 Element* vProbe::info(QString& Name, char* &BitmapFile, bool getNewOne)
00066 {
00067   Name = QObject::tr("Voltage Probe");
00068   BitmapFile = (char *) "vprobe";
00069 
00070   if(getNewOne)  return new vProbe();
00071   return 0;
00072 }
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines