Qucs-GUI  0.0.19
/home/travis/build/Qucs/qucs/qucs/qucs/wire.h
Go to the documentation of this file.
00001 /***************************************************************************
00002                                   wire.h
00003                                  --------
00004     begin                : Wed Sep 3 2003
00005     copyright            : (C) 2003 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 #ifndef WIRE_H
00019 #define WIRE_H
00020 
00021 #include "viewpainter.h"
00022 #include "element.h"
00023 #include "components/component.h"    // because of struct Port
00024 #include "wirelabel.h"
00025 
00026 class QPainter;
00027 class QString;
00028 
00029 
00030 class Wire : public Conductor {
00031 public:
00032   Wire(int _x1=0, int _y1=0, int _x2=0, int _y2=0, Node *n1=0, Node *n2=0);
00033  ~Wire();
00034 
00035   void paint(ViewPainter*);
00036   void paintScheme(QPainter*);
00037   void setCenter(int, int, bool relative=false);
00038   void getCenter(int&, int&);
00039   bool getSelected(int, int);
00040   void setName(const QString&, const QString&, int delta_=0, int x_=0, int y_=0);
00041 
00042   Node      *Port1, *Port2;
00043 
00044   void    rotate();
00045   QString save();
00046   bool    load(const QString&);
00047   bool    isHorizontal();
00048 };
00049 
00050 #endif
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines