My Project  0.0.16
QUCS Mapping
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
arrow.h
Go to the documentation of this file.
1 /***************************************************************************
2  arrow.h
3  ---------
4  begin : Sun Nov 23 2003
5  copyright : (C) 2003 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 #ifndef ARROW_H
19 #define ARROW_H
20 
21 #include "painting.h"
22 
23 #include <qpen.h>
24 
25 
26 class Arrow : public Painting {
27 public:
28  Arrow();
29  ~Arrow();
30 
31  void paint(ViewPainter*);
32  void paintScheme(QPainter*);
33  void getCenter(int&, int&);
34  void setCenter(int, int, bool relative=false);
35 
36  Painting* newOne();
37  static Element* info(QString&, char* &, bool getNewOne=false);
38  bool load(const QString&);
39  QString save();
40  QString saveCpp();
41  void MouseMoving(QPainter*, int, int, int, int, QPainter*, int, int, bool);
42  bool MousePressing();
43  bool getSelected(float, float, float);
44  void Bounding(int&, int&, int&, int&);
45  bool resizeTouched(float, float, float);
46  void MouseResizeMoving(int, int, QPainter*);
47 
48  void rotate();
49  void mirrorX();
50  void mirrorY();
51  bool Dialog();
52 
53  void calcArrowHead();
54 
55  QPen Pen;
56  int Style;
57  double Height, Width; // size of the arrow head
58  double Length, beta;
59  int xp1, yp1, xp2, yp2; // coordinates to paint the arrow head
60 };
61 
62 #endif