Qucs-GUI  0.0.18
 All Data Structures 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 #include <QtGui>
22 #include "element.h"
23 #include "viewpainter.h"
24 
25 #include <QPainter>
26 
27 class Diagram;
28 class Graph;
29 
30 
31 class Marker : public Element {
32 public:
33  Marker(Diagram *Diag_, Graph *pg_=0, int _nn=0, int cx_=0, int cy_=0);
34  ~Marker();
35 
36  void initText(int);
37  void createText();
38  void makeInvalid();
39  bool moveLeftRight(bool);
40  bool moveUpDown(bool);
41  void paint(ViewPainter*, int, int);
42  void paintScheme(QPainter*);
43  void setCenter(int, int, bool);
44  void Bounding(int& _x1, int& _y1, int& _x2, int& _y2);
45  QString save();
46  bool load(const QString& Line);
47  bool getSelected(int, int);
49  void getTextSize(const QFont&);
50 
51  Diagram *Diag; // the corresponding diagram
52  Graph *pGraph; // the corresponding graph
53 
54  int nVarPos; // number of values in "VarPos"
55  double *VarPos; // values the marker is pointing to
56  float fCX, fCY; // coordinates for the line from graph to marker body
57 
58  QString Text; // the string to be displayed in the marker text
59  bool transparent; // background shines through marker body
60 
61  int Precision; // number of digits to show
62  int numMode; // real/imag or polar (deg/rad)
63  double Z0; //Only used in smith chart marker, to convert S to Z
64 };
65 
66 #endif
Defines drawing elements for schematics.
double * VarPos
Definition: marker.h:55
QString save()
Definition: marker.cpp:495
bool moveUpDown(bool)
Definition: marker.cpp:331
float fCX
Definition: marker.h:56
void setCenter(int, int, bool)
Definition: marker.cpp:467
void makeInvalid()
Definition: marker.cpp:277
Definition: graph.h:57
void paint(ViewPainter *, int, int)
Definition: marker.cpp:389
QString Text
Definition: marker.h:58
Definition: marker.h:31
void Bounding(int &_x1, int &_y1, int &_x2, int &_y2)
Definition: marker.cpp:478
void getTextSize(const QFont &)
Definition: marker.cpp:293
void initText(int)
Definition: marker.cpp:67
Marker * sameNewOne(Graph *)
Definition: marker.cpp:578
~Marker()
Definition: marker.cpp:61
void paintScheme(QPainter *)
Definition: marker.cpp:445
double Z0
Definition: marker.h:63
Definition: element.h:48
Superclass of all schematic drawing elements.
Definition: element.h:142
int nVarPos
Definition: marker.h:54
bool moveLeftRight(bool)
Definition: marker.cpp:302
Marker(Diagram *Diag_, Graph *pg_=0, int _nn=0, int cx_=0, int cy_=0)
Definition: marker.cpp:38
int numMode
Definition: marker.h:62
int Precision
Definition: marker.h:61
void createText()
Definition: marker.cpp:186
bool transparent
Definition: marker.h:59
float fCY
Definition: marker.h:56
bool getSelected(int, int)
Definition: marker.cpp:569
Diagram * Diag
Definition: marker.h:51
Graph * pGraph
Definition: marker.h:52
bool load(const QString &Line)
Definition: marker.cpp:514