Qucs-GUI  0.0.19
/home/travis/build/Qucs/qucs/qucs/qucs/wirelabel.h
Go to the documentation of this file.
00001 /***************************************************************************
00002                                 wirelabel.h
00003                                -------------
00004     begin                : Sun Feb 29 2004
00005     copyright            : (C) 2004 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 WIRELABEL_H
00019 #define WIRELABEL_H
00020 
00021 #include "element.h"
00022 #include "viewpainter.h"
00023 
00024 #include <QString>
00025 
00026 class QPainter;
00027 class Wire;
00028 class Node;
00029 
00030 
00031 class WireLabel : public Element {
00032 public:
00033   WireLabel(const QString& _Name=0, int _cx=0, int _cy=0,
00034             int _x1=0, int _y1=0, int _Type=isNodeLabel);
00035   ~WireLabel();
00036 
00037   void paintScheme(QPainter *p);
00038   void setCenter(int x, int y, bool relative=false);
00039   bool getSelected(int, int);
00040   void setName(const QString& Name_);
00041   void setHighlighted (bool newval) { isHighlighted = newval; };
00042 
00043 
00044   Conductor *pOwner;  // Wire or Node where label belongs to
00045   QString Name, initValue;
00046 
00047   void    paint(ViewPainter*);
00048   void    rotate();
00049   QString save();
00050   bool    load(const QString& s);
00051   bool    isHorizontal();
00052 
00053 private:
00054   bool isHighlighted;
00055 
00056 };
00057 
00058 #endif
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines