Qucs-GUI  0.0.18
 All Data Structures 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>
24 
25 
26 class Arrow : public Painting {
27 public:
28  Arrow();
29  ~Arrow();
30 
31  void paint(ViewPainter*);
32  void paintScheme(Schematic*);
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  QString saveJSON();
42  void MouseMoving(Schematic*, int, int, int, int, Schematic*, int, int, bool);
43  bool MousePressing();
44  bool getSelected(float, float, float);
45  void Bounding(int&, int&, int&, int&);
46  bool resizeTouched(float, float, float);
47  void MouseResizeMoving(int, int, Schematic*);
48 
49  void rotate();
50  void mirrorX();
51  void mirrorY();
52  bool Dialog();
53 
54  void calcArrowHead();
55 
56  QPen Pen;
57  int Style;
58  double Height, Width; // size of the arrow head
59  double Length, beta;
60  int xp1, yp1, xp2, yp2; // coordinates to paint the arrow head
61 };
62 
63 #endif
~Arrow()
Definition: arrow.cpp:46
double Width
Definition: arrow.h:58
void mirrorX()
Definition: arrow.cpp:458
bool load(const QString &)
Definition: arrow.cpp:145
double Height
Definition: arrow.h:58
void MouseResizeMoving(int, int, Schematic *)
Definition: arrow.cpp:258
void paint(ViewPainter *)
Definition: arrow.cpp:51
QString saveCpp()
Definition: arrow.cpp:212
void paintScheme(Schematic *)
Definition: arrow.cpp:106
QString save()
Definition: arrow.cpp:201
Arrow()
Definition: arrow.cpp:30
void Bounding(int &, int &, int &, int &)
Definition: arrow.cpp:427
int yp1
Definition: arrow.h:60
Painting * newOne()
Definition: arrow.cpp:129
bool MousePressing()
Definition: arrow.cpp:317
void setCenter(int, int, bool relative=false)
Definition: arrow.cpp:122
QString saveJSON()
Definition: arrow.cpp:223
void MouseMoving(Schematic *, int, int, int, int, Schematic *, int, int, bool)
Definition: arrow.cpp:285
Superclass of all schematic drawing elements.
Definition: element.h:142
double Length
Definition: arrow.h:59
int yp2
Definition: arrow.h:60
void getCenter(int &, int &)
Definition: arrow.cpp:114
void mirrorY()
Definition: arrow.cpp:468
bool getSelected(float, float, float)
Definition: arrow.cpp:333
double beta
Definition: arrow.h:59
QPen Pen
Definition: arrow.h:56
void rotate()
Definition: arrow.cpp:438
int xp1
Definition: arrow.h:60
static Element * info(QString &, char *&, bool getNewOne=false)
Definition: arrow.cpp:135
int xp2
Definition: arrow.h:60
bool resizeTouched(float, float, float)
Definition: arrow.cpp:237
void calcArrowHead()
Definition: arrow.cpp:269
int Style
Definition: arrow.h:57
bool Dialog()
Definition: arrow.cpp:479
Definition: arrow.h:26