Qucs-GUI  0.0.19
/home/travis/build/Qucs/qucs/qucs/qucs/paintings/arrow.h
Go to the documentation of this file.
00001 /***************************************************************************
00002                                 arrow.h
00003                                ---------
00004     begin                : Sun Nov 23 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 ARROW_H
00019 #define ARROW_H
00020 
00021 #include "painting.h"
00022 
00023 #include <QPen>
00024 
00025 
00026 class Arrow : public Painting  {
00027 public:
00028   Arrow();
00029  ~Arrow();
00030 
00031   void paint(ViewPainter*);
00032   void paintScheme(Schematic*);
00033   void getCenter(int&, int&);
00034   void setCenter(int, int, bool relative=false);
00035 
00036   Painting* newOne();
00037   static Element* info(QString&, char* &, bool getNewOne=false);
00038   bool load(const QString&);
00039   QString save();
00040   QString saveCpp();
00041   QString saveJSON();
00042   void MouseMoving(Schematic*, int, int, int, int, Schematic*, int, int, bool);
00043   bool MousePressing();
00044   bool getSelected(float, float, float);
00045   void Bounding(int&, int&, int&, int&);
00046   bool resizeTouched(float, float, float);
00047   void MouseResizeMoving(int, int, Schematic*);
00048 
00049   void rotate();
00050   void mirrorX();
00051   void mirrorY();
00052   bool Dialog();
00053 
00054   void calcArrowHead();
00055 
00056   QPen   Pen;
00057   int    Style;
00058   double Height, Width;  // size of the arrow head
00059   double Length, beta;
00060   int    xp1, yp1, xp2, yp2;   // coordinates to paint the arrow head
00061 };
00062 
00063 #endif
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines