My Project  0.0.16
QUCS Mapping
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
marker.h
Go to the documentation of this file.
1 /***************************************************************************
2  marker.h
3  ----------
4  begin : Sat Apr 10 2004
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 MARKER_H
19 #define MARKER_H
20 
21 
22 #include "element.h"
23 #include "viewpainter.h"
24 
25 #include <qpainter.h>
26 #include <qvaluelist.h>
27 
28 class Diagram;
29 class Graph;
30 
31 
32 class Marker : public Element {
33 public:
34  Marker(Diagram *Diag_, Graph *pg_=0, int _nn=0, int cx_=0, int cy_=0);
35  ~Marker();
36 
37  void initText(int);
38  void createText();
39  void makeInvalid();
40  bool moveLeftRight(bool);
41  bool moveUpDown(bool);
42  void paint(ViewPainter*, int, int);
43  void paintScheme(QPainter*);
44  void setCenter(int, int, bool);
45  void Bounding(int& _x1, int& _y1, int& _x2, int& _y2);
46  QString save();
47  bool load(const QString& Line);
48  bool getSelected(int, int);
50  void getTextSize(const QFont&);
51 
52  Diagram *Diag; // the corresponding diagram
53  Graph *pGraph; // the corresponding graph
54 
55  int nVarPos; // number of values in "VarPos"
56  double *VarPos; // values the marker is pointing to
57  float fCX, fCY; // coordinates for the line from graph to marker body
58 
59  QString Text; // the string to be displayed in the marker text
60  bool transparent; // background shines through marker body
61 
62  int Precision; // number of digits to show
63  int numMode; // real/imag or polar (deg/rad)
64 };
65 
66 #endif