|
Qucs-GUI
0.0.19
|
The Diagram class is a superclass for diagrams. More...
#include <diagram.h>


Public Member Functions | |
| Diagram (int _cx=0, int _cy=0) | |
| virtual | ~Diagram () |
| virtual Diagram * | newOne () |
| virtual int | calcDiagram () |
| virtual void | calcCoordinate (const double *, const double *, const double *, float *, float *, Axis const *) const |
| void | calcCoordinateP (const double *x, const double *y, const double *z, Graph::iterator &p, Axis const *A) const |
| virtual void | finishMarkerCoordinates (float &, float &) const |
| virtual void | calcLimits () |
| virtual QString | extraMarkerText (Marker const *) const |
| virtual void | paint (ViewPainter *) |
| Paint function for most diagrams (cartesian, smith, polar, ...) | |
| void | setCenter (int, int, bool relative=false) |
| void | getCenter (int &, int &) |
| void | paintScheme (Schematic *) |
| void | Bounding (int &, int &, int &, int &) |
| bool | getSelected (int, int) |
| bool | resizeTouched (float, float, float) |
| Checks if the resize area was clicked. | |
| QString | save () |
| bool | load (const QString &, QTextStream *) |
| void | getAxisLimits (Graph *) |
| void | updateGraphData () |
| void | loadGraphData (const QString &) |
| void | recalcGraphData () |
| Calculate diagram again without reading dataset from file. | |
| bool | sameDependencies (Graph const *, Graph const *) const |
| Checks if the two graphs have the same independent variables. | |
| int | checkColumnWidth (const QString &, const QFontMetrics &, int, int, int) |
| virtual bool | insideDiagram (float, float) const |
| bool | insideDiagramP (Graph::iterator const &) const |
| Marker * | setMarker (int x, int y) |
| (try to) set a Marker to a diagram | |
Data Fields | |
| QString | Name |
| QPen | GridPen |
| QList< Graph * > | Graphs |
| QList< Arc * > | Arcs |
| QList< Line * > | Lines |
| QList< Text * > | Texts |
| int | x3 |
| int | y3 |
| Axis | xAxis |
| Axis | yAxis |
| Axis | zAxis |
| int | State |
| bool | hideLines |
| int | rotX |
| int | rotY |
| int | rotZ |
Protected Member Functions | |
| void | calcSmithAxisScale (Axis *, int &, int &) |
| void | createSmithChart (Axis *, int Mode=7) |
| void | calcPolarAxisScale (Axis *, double &, double &, double &) |
| void | createPolarDiagram (Axis *, int Mode=3) |
| bool | calcAxisScale (Axis *, double &, double &, double &, double &, double) |
| Calculations for Cartesian diagrams (RectDiagram and Rect3DDiagram). | |
| bool | calcAxisLogScale (Axis *, int &, double &, double &, double &, int) |
| Calculations for logarithmical Cartesian diagrams (RectDiagram and Rect3DDiagram). | |
| bool | calcYAxis (Axis *, int) |
| virtual void | createAxisLabels () |
| Put axis labels into the text list. | |
| int | regionCode (float, float) const |
| virtual void | clip (Graph::iterator &) const |
| Clipping for round diagrams (smith, polar, ...) | |
| void | rectClip (Graph::iterator &) const |
| Cohen-Sutherland clipping algorithm. | |
| virtual void | calcData (Graph *) |
Private Attributes | |
| int | Bounding_x1 |
| int | Bounding_x2 |
| int | Bounding_y1 |
| int | Bounding_y2 |
The Diagram class is a superclass for diagrams.
| Diagram::Diagram | ( | int | _cx = 0, |
| int | _cy = 0 |
||
| ) |
| Diagram::~Diagram | ( | ) | [virtual] |
Definition at line 85 of file diagram.cpp.
| void Diagram::Bounding | ( | int & | _x1, |
| int & | _y1, | ||
| int & | _x2, | ||
| int & | _y2 | ||
| ) |
| bool Diagram::calcAxisLogScale | ( | Axis * | Axis, |
| int & | z, | ||
| double & | zD, | ||
| double & | zDstep, | ||
| double & | corr, | ||
| int | len | ||
| ) | [protected] |
Calculations for logarithmical Cartesian diagrams (RectDiagram and Rect3DDiagram).
| Axis | - pointer to the axis to scale |
| len | - length of axis in pixel on the screen |
| [out] | z | - screen coordinate where the first grid is placed |
| [out] | zD | - number where the first grid is placed |
| [out] | zDstep | - number increment from one grid to the next |
| [out] | coor | - scale factor for calculate screen coordinate |
Definition at line 1774 of file diagram.cpp.

| bool Diagram::calcAxisScale | ( | Axis * | Axis, |
| double & | GridNum, | ||
| double & | zD, | ||
| double & | zDstep, | ||
| double & | GridStep, | ||
| double | Dist | ||
| ) | [protected] |
Calculations for Cartesian diagrams (RectDiagram and Rect3DDiagram).
| Axis | - pointer to the axis to scale |
| Dist | - length of axis in pixel on the screen |
| [out] | GridNum | - number where the first numbered grid is placed |
| [out] | GridStep | - distance from one grid to the next |
| [out] | zD | - screen coordinate where the first grid is placed |
| [out] | zDstep | - distance on screen from one grid to the next |
Definition at line 1652 of file diagram.cpp.

| virtual void Diagram::calcCoordinate | ( | const double * | , |
| const double * | , | ||
| const double * | , | ||
| float * | , | ||
| float * | , | ||
| Axis const * | |||
| ) | const [inline, virtual] |
Reimplemented in Rect3DDiagram, PSDiagram, SmithDiagram, CurveDiagram, PolarDiagram, and RectDiagram.
Definition at line 67 of file diagram.h.

| void Diagram::calcCoordinateP | ( | const double * | x, |
| const double * | y, | ||
| const double * | z, | ||
| Graph::iterator & | p, | ||
| Axis const * | A | ||
| ) | const |
Definition at line 1954 of file diagram.cpp.


| void Diagram::calcData | ( | Graph * | g | ) | [protected, virtual] |
Reimplemented in Rect3DDiagram, and TabDiagram.
Definition at line 482 of file diagram.cpp.


| virtual int Diagram::calcDiagram | ( | ) | [inline, virtual] |
Reimplemented in Rect3DDiagram, PSDiagram, SmithDiagram, CurveDiagram, PolarDiagram, RectDiagram, TabDiagram, TimingDiagram, and TruthDiagram.
Definition at line 65 of file diagram.h.

| virtual void Diagram::calcLimits | ( | ) | [inline, virtual] |
Reimplemented in Rect3DDiagram, PSDiagram, SmithDiagram, CurveDiagram, PolarDiagram, and RectDiagram.
Definition at line 70 of file diagram.h.

| void Diagram::calcPolarAxisScale | ( | Axis * | Axis, |
| double & | numGrids, | ||
| double & | GridStep, | ||
| double & | zD | ||
| ) | [protected] |
| void Diagram::calcSmithAxisScale | ( | Axis * | Axis, |
| int & | GridX, | ||
| int & | GridY | ||
| ) | [protected] |
| bool Diagram::calcYAxis | ( | Axis * | Axis, |
| int | x0 | ||
| ) | [protected] |
Definition at line 1865 of file diagram.cpp.


| int Diagram::checkColumnWidth | ( | const QString & | Str, |
| const QFontMetrics & | metrics, | ||
| int | colWidth, | ||
| int | x, | ||
| int | y | ||
| ) |
| void Diagram::clip | ( | Graph::iterator & | p | ) | const [protected, virtual] |
Clipping for round diagrams (smith, polar, ...)
Reimplemented in CurveDiagram, and RectDiagram.
Definition at line 418 of file diagram.cpp.

| void Diagram::createAxisLabels | ( | ) | [protected, virtual] |
Put axis labels into the text list.
Reimplemented in Rect3DDiagram, and TabDiagram.
Definition at line 162 of file diagram.cpp.


| void Diagram::createPolarDiagram | ( | Axis * | Axis, |
| int | Mode = 3 |
||
| ) | [protected] |
Definition at line 1574 of file diagram.cpp.


| void Diagram::createSmithChart | ( | Axis * | Axis, |
| int | Mode = 7 |
||
| ) | [protected] |
Definition at line 1400 of file diagram.cpp.


| virtual QString Diagram::extraMarkerText | ( | Marker const * | ) | const [inline, virtual] |
Reimplemented in SmithDiagram.
Definition at line 71 of file diagram.h.

| void Diagram::finishMarkerCoordinates | ( | float & | fCX, |
| float & | fCY | ||
| ) | const [virtual] |
Reimplemented in Rect3DDiagram, CurveDiagram, and RectDiagram.
Definition at line 1172 of file diagram.cpp.


| void Diagram::getAxisLimits | ( | Graph * | pg | ) |
Definition at line 612 of file diagram.cpp.


| void Diagram::getCenter | ( | int & | x, |
| int & | y | ||
| ) | [virtual] |
Reimplemented from Element.
Definition at line 1159 of file diagram.cpp.
| bool Diagram::getSelected | ( | int | x_, |
| int | y_ | ||
| ) |
| bool Diagram::insideDiagram | ( | float | x, |
| float | y | ||
| ) | const [virtual] |
Reimplemented in Rect3DDiagram, CurveDiagram, and RectDiagram.
Definition at line 310 of file diagram.cpp.

| bool Diagram::insideDiagramP | ( | Graph::iterator const & | p | ) | const |
Definition at line 1948 of file diagram.cpp.


| bool Diagram::load | ( | const QString & | Line, |
| QTextStream * | stream | ||
| ) |
Definition at line 1227 of file diagram.cpp.


| void Diagram::loadGraphData | ( | const QString & | defaultDataSet | ) |
Definition at line 677 of file diagram.cpp.


| Diagram * Diagram::newOne | ( | ) | [virtual] |
Reimplemented in Rect3DDiagram, PSDiagram, CurveDiagram, PolarDiagram, RectDiagram, SmithDiagram, TabDiagram, TimingDiagram, and TruthDiagram.
Definition at line 1166 of file diagram.cpp.


| void Diagram::paint | ( | ViewPainter * | p | ) | [virtual] |
Paint function for most diagrams (cartesian, smith, polar, ...)
Reimplemented in TabDiagram, and TimingDiagram.
Definition at line 92 of file diagram.cpp.

| void Diagram::paintScheme | ( | Schematic * | p | ) | [virtual] |
Reimplemented from Element.
Definition at line 154 of file diagram.cpp.


| void Diagram::recalcGraphData | ( | ) |
Calculate diagram again without reading dataset from file.
Definition at line 722 of file diagram.cpp.


| void Diagram::rectClip | ( | Graph::iterator & | p | ) | const [protected] |
Cohen-Sutherland clipping algorithm.
Definition at line 341 of file diagram.cpp.


| int Diagram::regionCode | ( | float | x, |
| float | y | ||
| ) | const [protected] |
| bool Diagram::resizeTouched | ( | float | fX, |
| float | fY, | ||
| float | len | ||
| ) |
Checks if the resize area was clicked.
If so return "true" and sets x1/y1 and x2/y2 to the border coordinates to draw a rectangle.
Definition at line 593 of file diagram.cpp.
| bool Diagram::sameDependencies | ( | Graph const * | g1, |
| Graph const * | g2 | ||
| ) | const |
Checks if the two graphs have the same independent variables.
Definition at line 1114 of file diagram.cpp.


| QString Diagram::save | ( | ) |
Definition at line 1181 of file diagram.cpp.


| void Diagram::setCenter | ( | int | x, |
| int | y, | ||
| bool | relative = false |
||
| ) | [virtual] |
Reimplemented from Element.
Definition at line 1148 of file diagram.cpp.
| Marker * Diagram::setMarker | ( | int | x, |
| int | y | ||
| ) |
(try to) set a Marker to a diagram
Definition at line 321 of file diagram.cpp.

| void Diagram::updateGraphData | ( | ) |
Definition at line 753 of file diagram.cpp.


| QList<Arc *> Diagram::Arcs |
int Diagram::Bounding_x1 [private] |
int Diagram::Bounding_x2 [private] |
int Diagram::Bounding_y1 [private] |
int Diagram::Bounding_y2 [private] |
| QList<Graph *> Diagram::Graphs |
| QPen Diagram::GridPen |
| bool Diagram::hideLines |
| QList<Line *> Diagram::Lines |
| QString Diagram::Name |
| int Diagram::rotX |
| int Diagram::rotY |
| int Diagram::rotZ |
| int Diagram::State |
| QList<Text *> Diagram::Texts |
| int Diagram::x3 |
| int Diagram::y3 |
1.7.6.1