Qucs-GUI
0.0.19
|
The Marker class implements the marker object used for all the diagram. More...
#include <marker.h>
Public Member Functions | |
Marker (Graph *pg_=0, int _nn=0, int cx_=0, int cy_=0) | |
create a marker based on click position and the branch number. | |
~Marker () | |
void | createText () |
(should) create marker label Text the screen position cx and cy from VarPos. | |
void | makeInvalid () |
bool | moveLeftRight (bool) |
bool | moveUpDown (bool) |
void | paint (ViewPainter *, int, int) |
void | paintScheme (QPainter *) |
void | setCenter (int, int, bool) |
void | Bounding (int &_x1, int &_y1, int &_x2, int &_y2) |
QString | save () |
bool | load (const QString &Line) |
bool | getSelected (int, int) |
Marker * | sameNewOne (Graph *) |
void | getTextSize () |
Graph const * | graph () const |
int | precision () const |
std::vector< double > const & | varPos () const |
const Diagram * | diag () const |
double | powFreq () const |
double | powReal () const |
double | powImag () const |
Data Fields | |
Graph const * | pGraph |
QString | Text |
bool | transparent |
int | Precision |
int | numMode |
double | Z0 |
Private Member Functions | |
void | initText (int) |
compute VarPos from branch number n and click position (cx, cy) this is done by recreating branch samples and comparing against click | |
Private Attributes | |
std::vector< double > | VarPos |
double | VarDep [2] |
float | fCX |
float | fCY |
The Marker class implements the marker object used for all the diagram.
Marker::Marker | ( | Graph * | pg_ = 0 , |
int | branchNo = 0 , |
||
int | cx_ = 0 , |
||
int | cy_ = 0 |
||
) |
create a marker based on click position and the branch number.
the click position is used to compute the marker position. currently, the marker position is the sampling point closest to the click.
Definition at line 49 of file marker.cpp.
Marker::~Marker | ( | ) |
Definition at line 75 of file marker.cpp.
void Marker::Bounding | ( | int & | _x1, |
int & | _y1, | ||
int & | _x2, | ||
int & | _y2 | ||
) |
Definition at line 440 of file marker.cpp.
void Marker::createText | ( | ) |
(should) create marker label Text the screen position cx and cy from VarPos.
does a lot of fancy stuff to be sorted out.
Definition at line 169 of file marker.cpp.
const Diagram * Marker::diag | ( | ) | const |
Definition at line 541 of file marker.cpp.
bool Marker::getSelected | ( | int | x_, |
int | y_ | ||
) |
void Marker::getTextSize | ( | ) |
Graph const* Marker::graph | ( | ) | const [inline] |
void Marker::initText | ( | int | n | ) | [private] |
compute VarPos from branch number n and click position (cx, cy) this is done by recreating branch samples and comparing against click
FIXME: should use ScrPoints instead. do not call calcCoordinate from here!
Definition at line 86 of file marker.cpp.
bool Marker::load | ( | const QString & | Line | ) |
Definition at line 477 of file marker.cpp.
void Marker::makeInvalid | ( | ) |
Definition at line 244 of file marker.cpp.
bool Marker::moveLeftRight | ( | bool | left | ) |
Definition at line 267 of file marker.cpp.
bool Marker::moveUpDown | ( | bool | up | ) |
Definition at line 296 of file marker.cpp.
void Marker::paint | ( | ViewPainter * | p, |
int | x0, | ||
int | y0 | ||
) |
Definition at line 350 of file marker.cpp.
void Marker::paintScheme | ( | QPainter * | p | ) | [virtual] |
Reimplemented from Element.
Definition at line 406 of file marker.cpp.
double Marker::powFreq | ( | ) | const [inline] |
double Marker::powImag | ( | ) | const [inline] |
double Marker::powReal | ( | ) | const [inline] |
int Marker::precision | ( | ) | const [inline] |
Marker * Marker::sameNewOne | ( | Graph * | pGraph_ | ) |
Definition at line 548 of file marker.cpp.
QString Marker::save | ( | ) |
void Marker::setCenter | ( | int | x, |
int | y, | ||
bool | relative | ||
) | [virtual] |
Reimplemented from Element.
Definition at line 429 of file marker.cpp.
std::vector<double> const& Marker::varPos | ( | ) | const [inline] |
float Marker::fCX [private] |
float Marker::fCY [private] |
int Marker::numMode |
Graph const* Marker::pGraph |
QString Marker::Text |
bool Marker::transparent |
double Marker::VarDep[2] [private] |
std::vector<double> Marker::VarPos [private] |
double Marker::Z0 |