improved contour plots + added example for contour plots

split contour plot into two variant, one for C-array-data and one for image column data
improved doxygen annotation
This commit is contained in:
jkriege2 2019-05-18 22:41:38 +02:00
parent 028f192e7b
commit 5a4a778faf
53 changed files with 2147 additions and 2235 deletions

View File

@ -78,6 +78,7 @@ addSimpleTest(boxplot)
addSimpleTest(advancedlineandfillstyling)
addSimpleTest(imageplot_nodatastore)
addSimpleTest(datastore)
addSimpleTest(contourplot)
#addSimpleTest(rgbimageplot_opencv)
#addSimpleTest(imageplot_opencv)

View File

@ -113,6 +113,9 @@ All test-projects are Qt-projects that use qmake to build. You can load them int
<tr><td> \image html jkqtplotter_simpletest_rgbimageplot_opencv_small.png
<td> \subpage JKQTPlotterImagePlotRGBOpenCV
<td> `JKQTPColumnRGBMathImage` <br> image data copied from OpenCV cv::Mat-structure into three columns of the internal datastore <br> inverted coordinate axes
<tr><td> \image html jkqtplotter_simpletest_contourplot_small.png
<td> \subpage JKQTPlotterContourPlot
<td> `JKQTPColumnContourPlot` <br> image data edited inside JKQTPDatastore
</table>

View File

@ -353,10 +353,10 @@ Examples:
<td> JKQTPOverlayImageEnhanced, JKQTPColumnOverlayImageEnhanced
<tr>
<td>\image html JKQTPContour_small.png
<td> JKQTPContour
<td> JKQTPContourPlot, JKQTPColumnContourPlot
</table>
\defgroup jkqtplotter_imagelots_elements Matrix/Image Graphs
\defgroup jkqtplotter_imagelots_elements Image Graphs
\ingroup jkqtplotter_imagelots
@ -393,7 +393,7 @@ Examples:
\defgroup jkqtplotter_imagelots_tools Tool Functions & Classes for Image Drawing
\ingroup jkqtplotter_imagelots
\defgroup jkqtplotter_imagelots_contour Contour Graphs
\defgroup jkqtplotter_imagelots_contour Contour Graphs (based on Image Data)
\ingroup jkqtplotter_imagelots
<table>
@ -402,7 +402,7 @@ Examples:
<th> Classes
<tr>
<td>\image html JKQTPContour_small.png
<td> JKQTPContour
<td> JKQTPContourPlot, JKQTPColumnContourPlot
</table>
\defgroup jkqtplotter_overlays Overlay Elements

View File

@ -50,6 +50,7 @@ Changes, compared to \ref page_whatsnew_V2018_08 "v2018.08" include:
<li> removed: Removed datarange-feature </li>
<li> update: \ref JKQTPLOTTER_USERINTERACTION "reworked user interactions API" </li>
<li> update: \ref jkqtplotter_basegraphserrors "reworked error indicator base classes" </li>
<li> update: improvements to contour plots (e.g. highlighting single contour levels, split into a class for simple C-arrays [JKQTPContourPlot] and one for image data in a JKQTPDatastore column [JKQTPColumnContourPlot]) + added example, see JKQTPColumnContourPlot and \ref JKQTPlotterContourPlot </li>
<li> fixed: colorbars at top were positioned over the plot label </li>
<li> fixed: RGB-image plots now work properly with inverted axes (image is inverted, befor image was not shown at all) </li>
</ul></li>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 26 KiB

View File

@ -35,7 +35,6 @@ All test-projects are Qt-projects that use qmake to build. You can load them int
| [![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/test_styledboxplot_small.png)](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/test_styledboxplot) | [Styling of Boxplots](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/test_styledboxplot) | Modifying different Aspects of the Styling of boxplots |
| [![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/test_styling_small.png)](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/test_styling) | [Styling of JKQTPlotter](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/test_styling) | Modifying different Aspects of the Styling of JKQTPlotter |
## Image data Plots
| Screenshot | Description | Notes |
@ -47,6 +46,7 @@ All test-projects are Qt-projects that use qmake to build. You can load them int
| [![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_rgbimageplot_small.png)](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/jkqtplotter_simpletest_rgbimageplot) | [Simple 3-channel Math RGB/CMY Image Plot](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/jkqtplotter_simpletest_rgbimageplot) | `JKQTPColumnRGBMathImage` <br> image data in a C-style row-major array, not using internal datastore <br> RGB/CMY color compositing |
| [![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_imageplot_opencv_small.png)](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest_imageplot_opencv) | [1-channel OpenCV cv::Mat Image Plot](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest_imageplot_opencv) | `JKQTPColumnMathImage` <br> image data copied from OpenCV cv::Mat-structure into a single column of the internal datastore |
| [![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_rgbimageplot_opencv_small.png)](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest_rgbimageplot_opencv) | [RGB OpenCV cv::Mat Image Plot](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest_rgbimageplot_opencv) | `JKQTPColumnRGBMathImage` <br> image data copied from OpenCV cv::Mat-structure into three columns <br> inverted coordinate axesof the internal datastore |
| [![](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_contourplot_small.png)](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest_contourplot) | [Contour Plots](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest_contourplot) | `JKQTPColumnContourPlot` <br> image data edited inside JKQTPDatastore |

View File

@ -90,10 +90,10 @@ TestWidgetContourPlots::TestWidgetContourPlots(QWidget *parent) :
plotContour->setGrid(false);
plotDensity->zoom(-0.1,1.1,-0.1,1.1);
QList<double> levels;
QVector<double> levels;
// levels<<5<<10<<25; // levels<<5.1<<10.1;
levels<<4<<5<<9<<14;
JKQTPContour* cp=new JKQTPContour(plotContour->getPlotter());
JKQTPColumnContourPlot* cp=new JKQTPColumnContourPlot(plotContour->getPlotter());
cp->setX(-0.1);
cp->setY(-0.1);
cp->setWidth(1.1);

View File

@ -0,0 +1,131 @@
# Example (JKQTPlotter): Contour Plots {#JKQTPlotterContourPlot}
This project (see `./examples/simpletest_contourplot/`) shows how to draw contour plots with JKQTPlotter.
[TOC]
# Drawing a Contour Plot
The source code of the main application is (see [`jkqtplotter_simpletest_contourplot.cpp`](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest_contourplot/jkqtplotter_simpletest_contourplot.cpp) ).
First the electric potential from a quadrupole is calculated and stored in an image column inside the JKQTPDatastore:
```.cpp
JKQTPDatastore* ds=plot.getDatastore();
const int NX=500; // image dimension in x-direction [pixels]
const int NY=500; // image dimension in y-direction [pixels]
const double w=2.7e-6;
const double dx=w/static_cast<double>(NX);
const double h=NY*dx;
size_t cPotential=ds->addImageColumn(NX, NY, "imagedata");
double x;
double y=-h/2.0;
const double eps0=8.854187e-12;
const double Q1=1.6e-19; // charge of charged particle 1
const double Q1_x0=-0.5e-6; // x-position of charged particle 1
const double Q1_y0=-0.5e-6; // y-position of charged particle 1
const double Q2=1.6e-19; // charge of charged particle 2
const double Q2_x0=0.5e-6; // x-position of charged particle 2
const double Q2_y0=0.5e-6; // y-position of charged particle 2
const double Q3=-1.6e-19; // charge of charged particle 3
const double Q3_x0=-0.5e-6; // x-position of charged particle 3
const double Q3_y0=0.5e-6; // y-position of charged particle 3
const double Q4=-1.6e-19; // charge of charged particle 4
const double Q4_x0=0.5e-6; // x-position of charged particle 4
const double Q4_y0=-0.5e-6; // y-position of charged particle 4
for (size_t iy=0; iy<NY; iy++ ) {
x=-w/2.0;
for (size_t ix=0; ix<NX; ix++ ) {
const double r1=sqrt((x-Q1_x0)*(x-Q1_x0)+(y-Q1_y0)*(y-Q1_y0));
const double r2=sqrt((x-Q2_x0)*(x-Q2_x0)+(y-Q2_y0)*(y-Q2_y0));
const double r3=sqrt((x-Q3_x0)*(x-Q3_x0)+(y-Q3_y0)*(y-Q3_y0));
const double r4=sqrt((x-Q4_x0)*(x-Q4_x0)+(y-Q4_y0)*(y-Q4_y0));
ds->setPixel(cPotential, ix, iy, Q1/(4.0*M_PI*eps0)/r1+Q2/(4.0*M_PI*eps0)/r2+Q3/(4.0*M_PI*eps0)/r3+Q4/(4.0*M_PI*eps0)/r4);
x+=dx;
}
y+=dx;
}
```
Then this image column can be drawn with a `JKQTPColumnContourPlot`:
```.cpp
JKQTPColumnContourPlot* graph=new JKQTPColumnContourPlot(&plot);
graph->setTitle("");
// image column with the data
graph->setImageColumn(cPotential);
// where does the image start in the plot, given in plot-axis-coordinates (bottom-left corner)
graph->setX(-w/2.0);
graph->setY(-h/2.0);
// width and height of the image in plot-axis-coordinates
graph->setWidth(w);
graph->setHeight(h);
// color-map is "BlueGreenRed"
graph->setPalette(JKQTPMathImageBlueGreenRed);
// get coordinate axis of color-bar and set its label
graph->getColorBarRightAxis()->setAxisLabel("electric potential [V]");
// add some levels for the contours. These are chosen to be at the actual potential values
// at several specified relative distance from Q1, i.e. at phi(Q1_x0*reldist) (phi: potential of Q1)
QVector<double> reldists; reldists<<0.1<<0.25<<0.5<<1<<1.5<<2<<2.5<<3;
// finally contour levels with +1 and -1 sign are added to show the positive and negative potential:
for (auto reldist: reldists) {
const double level=fabs(Q1/(4.0*M_PI*eps0)/(Q1_x0*reldist));
graph->addContourLevel(-level);
graph->addContourLevel(level);
}
qDebug()<<graph->getContourLevels();
graph->setAutoImageRange(false);
graph->setImageMin(graph->getContourLevels().first());
graph->setImageMax(graph->getContourLevels().last());
```
Note that we created the list of contour levels to draw explicitly here using `JKQTPColumnContourPlot::addContourLevel()`. There are also methods `JKQTPColumnContourPlot::createContourLevels()` and `JKQTPColumnContourPlot::createContourLevelsLog()` to auto-generate these from the data-range with linear or logarithmic spacing, but both options do not yield good results here. The code above generates these contour levels:
```
-0.0287602, -0.0115041, -0.00575203, -0.00287602, -0.00191734, -0.00143801, -0.00115041, -0.000958672, 0.000958672, 0.00115041, 0.00143801, 0.00191734, 0.00287602, 0.00575203, 0.0115041, 0.0287602
```
The result looks like this:
![jkqtplotter_simpletest_contourplot](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_contourplot.png)
# Styling a Contour Plot
You can change the way that the colors for the contours are chosen by calling `JKQTPColumnContourPlot::setContourColoringMode()` with another mode:
- `JKQTPColumnContourPlot::SingleColorContours` uses the same color (set by `JKQTPColumnContourPlot::setLineColor()`) for all contours.<br>
![jkqtplotter_simpletest_contourplot](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_contourplot_SingleColorContours.png)
- `JKQTPColumnContourPlot::ColorContoursFromPaletteByValue` is the mode used for the example above, which chooses the color from the current color-palette based on the current image data range and the actual level of the contour line. <br>
![jkqtplotter_simpletest_contourplot](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_contourplot_ColorContoursFromPaletteByValue.png)
- `JKQTPColumnContourPlot::ColorContoursFromPalette` chooses the color by evenly spacing the contour lines over the full color palette. the line-color will then have no connection to the actual value of the level.<br>
![jkqtplotter_simpletest_contourplot](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_contourplot_ColorContoursFromPalette.png)
In all modes you can override the coloring of single levels by calling `JKQTPColumnContourPlot::setOverrideColor(level, color)`. In the example above this looks like this:
```.cpp
for (auto reldist: reldists) {
const double level=fabs(Q1/(4.0*M_PI*eps0)/(Q1_x0*reldist));
graph->addContourLevel(-level);
graph->addContourLevel(level);
// set a special color for some lines:
if (reldist==1) {
graph->setOverrideColor(-level, QColor("yellow"));
graph->setOverrideColor(level, QColor("yellow"));
}
}
```
This code results (in the default coloring mode `JKQTPColumnContourPlot::ColorContoursFromPaletteByValue`) in:
![jkqtplotter_simpletest_contourplot](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_contourplot_overridecolors.png)
# Gimmick: Animating a Contour Plot
In order to demonstrate the caching implemented in the contour plot, there is optional animation code inside this example, in the form of the class `ContourPlotAnimator` (see (see [`ContourPlotAnimator.cpp`](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest_contourplot/ContourPlotAnimator.cpp) ).
The code therein results in an animation like this:
![jkqtplotter_simpletest_contourplot](https://raw.githubusercontent.com/jkriege2/JKQtPlotter/master/screenshots/jkqtplotter_simpletest_contourplot_animated.gif)
Note that zooming can still be perfomred without the need to recalculate the contour lines.

View File

@ -0,0 +1,51 @@
#include "contourplotanimator.h"
ContourPlotAnimator::ContourPlotAnimator(JKQTPDatastore *ds_, JKQTPlotter *pplot_, int NX_, int NY_, double w_, double h_, double dx_, size_t cPotential_):
QObject(pplot_), angle(0), ds(ds_), pplot(pplot_), NX(NX_), NY(NY_), w(w_), h(h_), dx(dx_), cPotential(cPotential_)
{
}
void ContourPlotAnimator::start(int delayMS) {
timerFR.start();
QTimer::singleShot(delayMS, this,&ContourPlotAnimator::step);
}
void ContourPlotAnimator::step() {
double x;
double y=-h/2.0;
const double eps0=8.854187e-12;
double r=1e-6*(5.0+cos(angle/4.0))/6.0;
double r2=1e-6*(5.0+sin(angle/4.0))/6.0;
const double Q1=1.6e-19; // charge of charged particle 1
const double Q1_x0=-r*cos(angle); // x-position of charged particle 1
const double Q1_y0=-r*sin(angle); // y-position of charged particle 1
const double Q2=1.6e-19; // charge of charged particle 2
const double Q2_x0=r*cos(angle); // x-position of charged particle 2
const double Q2_y0=r*sin(angle); // y-position of charged particle 2
const double Q3=-1.6e-19; // charge of charged particle 3
const double Q3_x0=-r2*cos(angle); // x-position of charged particle 3
const double Q3_y0=r2*sin(angle); // y-position of charged particle 3
const double Q4=-1.6e-19; // charge of charged particle 4
const double Q4_x0=r2*cos(angle); // x-position of charged particle 4
const double Q4_y0=-r2*sin(angle); // y-position of charged particle 4
for (size_t iy=0; iy<NY; iy++ ) {
x=-w/2.0;
for (size_t ix=0; ix<NX; ix++ ) {
const double r1=sqrt((x-Q1_x0)*(x-Q1_x0)+(y-Q1_y0)*(y-Q1_y0));
const double r2=sqrt((x-Q2_x0)*(x-Q2_x0)+(y-Q2_y0)*(y-Q2_y0));
const double r3=sqrt((x-Q3_x0)*(x-Q3_x0)+(y-Q3_y0)*(y-Q3_y0));
const double r4=sqrt((x-Q4_x0)*(x-Q4_x0)+(y-Q4_y0)*(y-Q4_y0));
ds->setPixel(cPotential, ix, iy, Q1/(4.0*M_PI*eps0)/r1+Q2/(4.0*M_PI*eps0)/r2+Q3/(4.0*M_PI*eps0)/r3+Q4/(4.0*M_PI*eps0)/r4);
x+=dx;
}
y+=dx;
}
pplot->redrawPlot();
qDebug()<<"animation step: angle="<<angle<<", framerate="<<1.0/(timerFR.elapsed()/1000.0)<<"fps <==> "<<timerFR.elapsed()<<"ms/frame";
pplot->setWindowTitle("JKQTPColumnContourPlot ["+QString::number(1.0/(timerFR.elapsed()/1000.0))+"fps]");
angle+=(2.0/180.0*M_PI);
timerFR.start();
QTimer::singleShot(1, this,SLOT(step()));
}

View File

@ -0,0 +1,35 @@
#ifndef CONTOURPLOTANIMATOR_H
#define CONTOURPLOTANIMATOR_H
#include <QObject>
#include <QTimer>
#include <QElapsedTimer>
#include <cmath>
#include "jkqtplotter/jkqtplotter.h"
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
class ContourPlotAnimator: public QObject {
Q_OBJECT
public:
ContourPlotAnimator(JKQTPDatastore* ds_, JKQTPlotter* pplot_, int NX_, int NY_,double w_, double h_, double dx_, size_t cPotential_);
void start(int delayMS);
protected slots:
void step();
protected:
double angle;
JKQTPDatastore* ds;
JKQTPlotter* pplot;
int NX;
int NY;
double w;
double h;
double dx;
size_t cPotential;
QElapsedTimer timerFR;
};
#endif // CONTOURPLOTANIMATOR_H

View File

@ -0,0 +1,155 @@
/** \example jkqtplotter_simpletest_contourplot.cpp
* Shows how to plot a contour plot with JKQTPlotter
*
* \ref JKQTPlotterContourPlot
*/
#include <QApplication>
#include <cmath>
#include "jkqtplotter/jkqtplotter.h"
#include "jkqtplotter/jkqtpgraphscontour.h"
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
// if defined, an animation is shown
//#define ANIMATE
#ifdef ANIMATE
#include "contourplotanimator.h"
#endif
int main(int argc, char* argv[])
{
QApplication app(argc, argv);
// 1. create a plotter window and get a pointer to the internal datastore (for convenience)
JKQTPlotter plot;
plot.getPlotter()->setUseAntiAliasingForGraphs(true); // nicer (but slower) plotting
plot.getPlotter()->setUseAntiAliasingForSystem(true); // nicer (but slower) plotting
plot.getPlotter()->setUseAntiAliasingForText(true); // nicer (but slower) text rendering
// 2. calculate image of the electric field of a quadrupolpol
JKQTPDatastore* ds=plot.getDatastore();
#ifdef ANIMATE
const int NX=200; // image dimension in x-direction [pixels]
const int NY=200; // image dimension in x-direction [pixels]
#else
const int NX=500; // image dimension in x-direction [pixels]
const int NY=500; // image dimension in x-direction [pixels]
#endif
const double w=2.7e-6;
const double dx=w/static_cast<double>(NX);
const double h=NY*dx;
size_t cPotential=ds->addImageColumn(NX, NY, "imagedata");
double x;
double y=-h/2.0;
const double eps0=8.854187e-12;
const double Q1=1.6e-19; // charge of charged particle 1
const double Q1_x0=-0.5e-6; // x-position of charged particle 1
const double Q1_y0=-0.5e-6; // y-position of charged particle 1
const double Q2=1.6e-19; // charge of charged particle 2
const double Q2_x0=0.5e-6; // x-position of charged particle 2
const double Q2_y0=0.5e-6; // y-position of charged particle 2
const double Q3=-1.6e-19; // charge of charged particle 3
const double Q3_x0=-0.5e-6; // x-position of charged particle 3
const double Q3_y0=0.5e-6; // y-position of charged particle 3
const double Q4=-1.6e-19; // charge of charged particle 4
const double Q4_x0=0.5e-6; // x-position of charged particle 4
const double Q4_y0=-0.5e-6; // y-position of charged particle 4
for (size_t iy=0; iy<NY; iy++ ) {
x=-w/2.0;
for (size_t ix=0; ix<NX; ix++ ) {
const double r1=sqrt((x-Q1_x0)*(x-Q1_x0)+(y-Q1_y0)*(y-Q1_y0));
const double r2=sqrt((x-Q2_x0)*(x-Q2_x0)+(y-Q2_y0)*(y-Q2_y0));
const double r3=sqrt((x-Q3_x0)*(x-Q3_x0)+(y-Q3_y0)*(y-Q3_y0));
const double r4=sqrt((x-Q4_x0)*(x-Q4_x0)+(y-Q4_y0)*(y-Q4_y0));
ds->setPixel(cPotential, ix, iy, Q1/(4.0*M_PI*eps0)/r1+Q2/(4.0*M_PI*eps0)/r2+Q3/(4.0*M_PI*eps0)/r3+Q4/(4.0*M_PI*eps0)/r4);
x+=dx;
}
y+=dx;
}
// the following code will plot a dipole potential instead of the quadrupole after 5s
// this tests the recognition of altered data
#ifdef ANIMATE
JKQTPlotter* pplot=&plot;
ContourPlotAnimator animation(ds,pplot,NX,NY,w,h,dx,cPotential);
animation.start(3000);
#endif
// 3. create a graph (JKQTPColumnContourPlot) with the column created above as data
JKQTPColumnContourPlot* graph=new JKQTPColumnContourPlot(&plot);
graph->setTitle("");
// image column with the data
graph->setImageColumn(cPotential);
// where does the image start in the plot, given in plot-axis-coordinates (bottom-left corner)
graph->setX(-w/2.0);
graph->setY(-h/2.0);
// width and height of the image in plot-axis-coordinates
graph->setWidth(w);
graph->setHeight(h);
// color-map is "BlueGreenRed"
graph->setPalette(JKQTPMathImageBlueGreenRed);
// get coordinate axis of color-bar and set its label
graph->getColorBarRightAxis()->setAxisLabel("electric potential [V]");
// add some levels for the contours. These are chosen to be at the actual potential values
// at several specified relative distance from Q1, i.e. at phi(Q1_x0*reldist) (phi: potential of Q1)
QVector<double> reldists; reldists<<0.1<<0.25<<0.5<<1<<1.5<<2<<2.5<<3;
// finally contour levels with +1 and -1 sign are added to show the positive and negative potential:
for (auto reldist: reldists) {
const double level=fabs(Q1/(4.0*M_PI*eps0)/(Q1_x0*reldist));
graph->addContourLevel(-level);
graph->addContourLevel(level);
// set a special color for some lines:
//if (reldist==1) {
// graph->setOverrideColor(-level, QColor("yellow"));
// graph->setOverrideColor(level, QColor("yellow"));
//}
}
qDebug()<<graph->getContourLevels();
graph->setAutoImageRange(false);
graph->setImageMin(graph->getContourLevels().first());
graph->setImageMax(graph->getContourLevels().last());
// all contour lines have the same color:
//graph->setContourColoringMode(JKQTPColumnContourPlot::SingleColorContours);
//graph->setLineColor(QColor("magenta"));
// color contour lines from palette, but wothout taking their actual level value into account:
//graph->setContourColoringMode(JKQTPColumnContourPlot::ColorContoursFromPalette);
// 4. add the graphs to the plot, so it is actually displayed
plot.addGraph(graph);
// 5. set axis labels
plot.getXAxis()->setAxisLabel("x [m]");
plot.getYAxis()->setAxisLabel("y [m]");
// 6. fix axis and plot aspect ratio to 1
plot.getPlotter()->setMaintainAspectRatio(true);
plot.getPlotter()->setAspectRatio(w/h);
plot.getPlotter()->setMaintainAxisAspectRatio(true);
plot.getPlotter()->setAxisAspectRatio(w/h);
// 7 autoscale the plot so the graph is contained
plot.zoomToFit();
// 8. show plotter and make it a decent size
plot.show();
plot.resize(800,800);
plot.setWindowTitle("JKQTPColumnContourPlot");
return app.exec();
}

View File

@ -0,0 +1,29 @@
# source code for this simple demo
SOURCES = jkqtplotter_simpletest_contourplot.cpp \
contourplotanimator.cpp
# configure Qt
CONFIG += link_prl qt
QT += core gui xml svg
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport
# output executable name
TARGET = jkqtplotter_simpletest_contourplot
# include JKQTPlotter source code
DEPENDPATH += ../../lib ../../staticlib/jkqtplotterlib
INCLUDEPATH += ../../lib
CONFIG (debug, debug|release) {
LIBS += -L../../staticlib/jkqtplotterlib/debug -ljkqtplotterlib_debug
} else {
LIBS += -L../../staticlib/jkqtplotterlib/release -ljkqtplotterlib
}
message("LIBS = $$LIBS")
HEADERS += \
contourplotanimator.h

View File

@ -0,0 +1,8 @@
TEMPLATE = subdirs
SUBDIRS += jkqtplotterlib jkqtplotter_simpletest_contourplot
jkqtplotterlib.file = ../../staticlib/jkqtplotterlib/jkqtplotterlib.pro
jkqtplotter_simpletest_contourplot.file=$$PWD/jkqtplotter_simpletest_contourplot.pro
jkqtplotter_simpletest_contourplot.depends = jkqtplotterlib

View File

@ -715,6 +715,7 @@ JKQTP_LIB_EXPORT QPolygonF jkqtpRotateRect(QRectF r, double angle);
/*! \brief swap two elements \a l and \a r in an array \a a
\ingroup jkqtptools
@ -1005,6 +1006,22 @@ inline T jkqtp_sqr(const T& v) {
return v*v;
}
/** \brief calculate the distance between two QPointF points
* \ingroup jkqtptools_math
*
*/
inline double jkqtp_distance(const QPointF& p1, const QPointF& p2){
return sqrt(jkqtp_sqr<double>(p1.x()-p2.x())+jkqtp_sqr<double>(p1.y()-p2.y()));
}
/** \brief calculate the distance between two QPoint points
* \ingroup jkqtptools_math
*
*/
inline double jkqtp_distance(const QPoint& p1, const QPoint& p2){
return sqrt(jkqtp_sqr<double>(p1.x()-p2.x())+jkqtp_sqr<double>(p1.y()-p2.y()));
}
#endif // JKQTPTOOLS_H_INCLUDED

File diff suppressed because it is too large Load Diff

View File

@ -477,15 +477,11 @@ class JKQTP_LIB_EXPORT JKQTMathText : public QObject {
{
return this->fontEncoding;
}
/*! \brief returns the property useSTIXfonts ( \copybrief useSTIXfonts ).
\details Description of the parameter useSTIXfonts is: <BLOCKQUOTE>\copydoc useSTIXfonts </BLOCKQUOTE>.
\see useSTIXfonts for more information */
/*! \copydoc useSTIXfonts */
inline bool isUsingSTIXfonts() const {
return this->useSTIXfonts;
}
/*! \brief returns the property useXITSfonts ( \copybrief useXITSfonts ).
\details Description of the parameter useXITSfonts is: <BLOCKQUOTE>\copydoc useXITSfonts </BLOCKQUOTE>.
\see useXITSfonts for more information */
/*! \copydoc useXITSfonts */
inline bool isUsingXITSfonts() const {
return this->useXITSfonts;
}
@ -649,9 +645,7 @@ class JKQTP_LIB_EXPORT JKQTMathText : public QObject {
{
return this->useUnparsed;
}
/*! \brief returns the property error_list ( \copybrief error_list ).
\details Description of the parameter error_list is: <BLOCKQUOTE>\copydoc error_list </BLOCKQUOTE>.
\see error_list for more information */
/*! \copydoc error_list */
inline QStringList getErrorList() const {
return this->error_list;
}
@ -801,9 +795,7 @@ class JKQTP_LIB_EXPORT JKQTMathText : public QObject {
virtual double draw(QPainter& painter, double x, double y, MTenvironment currentEv, const MTnodeSize* prevNodeSize=nullptr) override;
/** \copydoc MTnode::toHtml() */
virtual bool toHtml(QString& html, JKQTMathText::MTenvironment currentEv, JKQTMathText::MTenvironment defaultEv) override;
/*! \brief returns the property text ( \copybrief text ).
\details Description of the parameter text is: <BLOCKQUOTE>\copydoc text </BLOCKQUOTE>.
\see text for more information */
/*! \copydoc text */
inline QString getText() const {
return this->text;
}
@ -849,9 +841,7 @@ class JKQTP_LIB_EXPORT JKQTMathText : public QObject {
virtual double draw(QPainter& painter, double x, double y, MTenvironment currentEv, const MTnodeSize* prevNodeSize=nullptr) override;
/** \copydoc MTnode::toHtml() */
virtual bool toHtml(QString& html, JKQTMathText::MTenvironment currentEv, JKQTMathText::MTenvironment defaultEv) override;
/*! \brief returns the property symbolName ( \copybrief symbolName ).
\details Description of the parameter symbolName is: <BLOCKQUOTE>\copydoc symbolName </BLOCKQUOTE>.
\see symbolName for more information */
/*! \copydoc symbolName */
inline QString getSymbolName() const {
return this->symbolName;
}
@ -899,9 +889,7 @@ class JKQTP_LIB_EXPORT JKQTMathText : public QObject {
virtual bool toHtml(QString& html, JKQTMathText::MTenvironment currentEv, JKQTMathText::MTenvironment defaultEv) override;
/** \copydoc MTnode::setDrawBoxes() */
virtual void setDrawBoxes(bool draw) override;
/*! \brief returns the property nodes ( \copybrief nodes ).
\details Description of the parameter nodes is: <BLOCKQUOTE>\copydoc nodes </BLOCKQUOTE>.
\see nodes for more information */
/*! \copydoc nodes */
inline QList<MTnode*> getNodes() const {
return this->nodes;
}
@ -930,15 +918,11 @@ class JKQTP_LIB_EXPORT JKQTMathText : public QObject {
inline MTnode* getChild() const {
return this->child;
}
/*! \brief returns the property name ( \copybrief name ).
\details Description of the parameter name is: <BLOCKQUOTE>\copydoc name </BLOCKQUOTE>.
\see name for more information */
/*! \copydoc name */
inline QString getName() const {
return this->name;
}
/*! \brief returns the property parameters ( \copybrief parameters ).
\details Description of the parameter parameters is: <BLOCKQUOTE>\copydoc parameters </BLOCKQUOTE>.
\see parameters for more information */
/*! \copydoc parameters */
inline QStringList getParameters() const {
return this->parameters;
}
@ -1024,21 +1008,15 @@ class JKQTP_LIB_EXPORT JKQTMathText : public QObject {
inline MTnode* getChild() const {
return this->child;
}
/*! \brief returns the property openbrace ( \copybrief openbrace ).
\details Description of the parameter openbrace is: <BLOCKQUOTE>\copydoc openbrace </BLOCKQUOTE>.
\see openbrace for more information */
/*! \copydoc openbrace */
inline QString getOpenbrace() const {
return this->openbrace;
}
/*! \brief returns the property closebrace ( \copybrief closebrace ).
\details Description of the parameter closebrace is: <BLOCKQUOTE>\copydoc closebrace </BLOCKQUOTE>.
\see closebrace for more information */
/*! \copydoc closebrace */
inline QString getClosebrace() const {
return this->closebrace;
}
/*! \brief returns the property showRightBrace ( \copybrief showRightBrace ).
\details Description of the parameter showRightBrace is: <BLOCKQUOTE>\copydoc showRightBrace </BLOCKQUOTE>.
\see showRightBrace for more information */
/*! \copydoc showRightBrace */
inline bool getShowRightBrace() const {
return this->showRightBrace;
}
@ -1070,9 +1048,7 @@ class JKQTP_LIB_EXPORT JKQTMathText : public QObject {
inline MTnode* getChild() const {
return this->child;
}
/*! \brief returns the property degree ( \copybrief degree ).
\details Description of the parameter degree is: <BLOCKQUOTE>\copydoc degree </BLOCKQUOTE>.
\see degree for more information */
/*! \copydoc degree */
inline int getDegree() const {
return this->degree;
}
@ -1118,9 +1094,7 @@ class JKQTP_LIB_EXPORT JKQTMathText : public QObject {
inline MTnode* getChild2() const {
return this->child2;
}
/*! \brief returns the property mode ( \copybrief mode ).
\details Description of the parameter mode is: <BLOCKQUOTE>\copydoc mode </BLOCKQUOTE>.
\see mode for more information */
/*! \copydoc mode */
inline MTfracMode getMode() const {
return this->mode;
}
@ -1145,15 +1119,11 @@ class JKQTP_LIB_EXPORT JKQTMathText : public QObject {
inline QVector<QVector<MTnode*> > getChildren() const {
return this->children;
}
/*! \brief returns the property columns ( \copybrief columns ).
\details Description of the parameter columns is: <BLOCKQUOTE>\copydoc columns </BLOCKQUOTE>.
\see columns for more information */
/*! \copydoc columns */
inline int getColumns() const {
return this->columns;
}
/*! \brief returns the property lines ( \copybrief lines ).
\details Description of the parameter lines is: <BLOCKQUOTE>\copydoc lines </BLOCKQUOTE>.
\see lines for more information */
/*! \copydoc lines */
inline int getLines() const {
return this->lines;
}
@ -1199,9 +1169,7 @@ class JKQTP_LIB_EXPORT JKQTMathText : public QObject {
inline MTnode* getChild() const {
return this->child;
}
/*! \brief returns the property decoration ( \copybrief decoration ).
\details Description of the parameter decoration is: <BLOCKQUOTE>\copydoc decoration </BLOCKQUOTE>.
\see decoration for more information */
/*! \copydoc decoration */
inline MTdecoration getDecoration() const {
return this->decoration;
}
@ -1439,9 +1407,7 @@ class JKQTP_LIB_EXPORT JKQTMathText : public QObject {
public:
/*! \brief returns the property parsedNode ( \copybrief parsedNode ).
\details Description of the parameter parsedNode is: <BLOCKQUOTE>\copydoc parsedNode </BLOCKQUOTE>.
\see parsedNode for more information */
/*! \copydoc parsedNode */
inline MTnode* getParsedNode() const {
return this->parsedNode;
}

View File

@ -766,43 +766,25 @@ class JKQTP_LIB_EXPORT JKQTBasePlotter: public QObject {
/*! \copydoc JKQTBasePlotterStyle::plotFrameRounding */
double getPlotFrameRounding() const;
/*! \brief returns the property plotLabelFontSize ( \copybrief plotLabelFontSize ).
\details Description of the parameter plotLabelFontSize is: <BLOCKQUOTE>\copydoc plotLabelFontSize </BLOCKQUOTE>
\see plotLabelFontSize for more information */
/*! \copydoc plotLabelFontSize */
double getPlotLabelFontSize() const;
/*! \brief returns the property plotLabelFontName ( \copybrief plotLabelFontName ).
\details Description of the parameter plotLabelFontName is: <BLOCKQUOTE>\copydoc plotLabelFontName </BLOCKQUOTE>
\see plotLabelFontName for more information */
/*! \copydoc plotLabelFontName */
QString getplotLabelFontName() const;
/*! \brief returns the property plotLabel ( \copybrief plotLabel ).
\details Description of the parameter plotLabel is: <BLOCKQUOTE>\copydoc plotLabel </BLOCKQUOTE>
\see plotLabel for more information */
/*! \copydoc plotLabel */
QString getPlotLabel() const;
/*! \brief sets the property gridPrinting ( \copybrief gridPrinting ) to the specified \a __value.
\details Description of the parameter gridPrinting is: <BLOCKQUOTE>\copydoc gridPrinting </BLOCKQUOTE>
\see gridPrinting for more information */
/*! \copydoc gridPrinting */
void setGridPrinting(bool __value);
/*! \brief returns the property gridPrinting ( \copybrief gridPrinting ).
\details Description of the parameter gridPrinting is: <BLOCKQUOTE>\copydoc gridPrinting </BLOCKQUOTE>
\see gridPrinting for more information */
/*! \copydoc gridPrinting */
bool getGridPrinting() const;
/*! \brief sets the property gridPrintingCurrentX ( \copybrief gridPrintingCurrentX ) to the specified \a __value.
\details Description of the parameter gridPrintingCurrentX is: <BLOCKQUOTE>\copydoc gridPrintingCurrentX </BLOCKQUOTE>
\see gridPrintingCurrentX for more information */
/*! \copydoc gridPrintingCurrentX */
void setGridPrintingCurrentX(size_t __value);
/*! \brief returns the property gridPrintingCurrentX ( \copybrief gridPrintingCurrentX ).
\details Description of the parameter gridPrintingCurrentX is: <BLOCKQUOTE>\copydoc gridPrintingCurrentX </BLOCKQUOTE>
\see gridPrintingCurrentX for more information */
/*! \copydoc gridPrintingCurrentX */
size_t getGridPrintingCurrentX() const;
/*! \brief sets the property gridPrintingCurrentY ( \copybrief gridPrintingCurrentY ) to the specified \a __value.
\details Description of the parameter gridPrintingCurrentY is: <BLOCKQUOTE>\copydoc gridPrintingCurrentY </BLOCKQUOTE>
\see gridPrintingCurrentY for more information */
/*! \copydoc gridPrintingCurrentY */
void setGridPrintingCurrentY(size_t __value);
/*! \brief returns the property gridPrintingCurrentY ( \copybrief gridPrintingCurrentY ).
\details Description of the parameter gridPrintingCurrentY is: <BLOCKQUOTE>\copydoc gridPrintingCurrentY </BLOCKQUOTE>
\see gridPrintingCurrentY for more information */
/*! \copydoc gridPrintingCurrentY */
size_t getGridPrintingCurrentY() const;
/** \brief set the x- and y-positions of this JKQTPlotter in the grid-printing grid
@ -821,13 +803,13 @@ class JKQTP_LIB_EXPORT JKQTBasePlotter: public QObject {
/** \brief set the string used to introduce comments in text output when exporting data */
QString getCSVcommentInitializer() const;
/*! \brief returns the property internalPlotBorderTop ( \copybrief internalPlotBorderTop ). \details Description of the parameter internalPlotBorderTop is: <BLOCKQUOTE>\copydoc internalPlotBorderTop </BLOCKQUOTE>. \see internalPlotBorderTop for more information */
/*! \copydoc internalPlotBorderTop */
inline double getInternalPlotBorderTop() const { return this->internalPlotBorderTop; }
/*! \brief returns the property internalPlotBorderLeft ( \copybrief internalPlotBorderLeft ). \details Description of the parameter internalPlotBorderLeft is: <BLOCKQUOTE>\copydoc internalPlotBorderLeft </BLOCKQUOTE>. \see internalPlotBorderLeft for more information */
/*! \copydoc internalPlotBorderLeft */
inline double getInternalPlotBorderLeft() const { return this->internalPlotBorderLeft; }
/*! \brief returns the property internalPlotBorderBottom ( \copybrief internalPlotBorderBottom ). \details Description of the parameter internalPlotBorderBottom is: <BLOCKQUOTE>\copydoc internalPlotBorderBottom </BLOCKQUOTE>. \see internalPlotBorderBottom for more information */
/*! \copydoc internalPlotBorderBottom */
inline double getInternalPlotBorderBottom() const { return this->internalPlotBorderBottom; }
/*! \brief returns the property internalPlotBorderRight ( \copybrief internalPlotBorderRight ). \details Description of the parameter internalPlotBorderRight is: <BLOCKQUOTE>\copydoc internalPlotBorderRight </BLOCKQUOTE>. \see internalPlotBorderRight for more information */
/*! \copydoc internalPlotBorderRight */
inline double getInternalPlotBorderRight() const { return this->internalPlotBorderRight; }
/*! \copydoc internalPlotWidth */
inline int getPlotWidth() const { return this->internalPlotWidth; }
@ -847,39 +829,39 @@ class JKQTP_LIB_EXPORT JKQTBasePlotter: public QObject {
const JKQTPVerticalAxis *getYAxis() const;
/*! \brief returns the property actSavePlot ( \copybrief actSavePlot ). \details Description of the parameter actSavePlot is: <BLOCKQUOTE>\copydoc actSavePlot </BLOCKQUOTE>. \see actSavePlot for more information */
/*! \copydoc actSavePlot */
QAction* getActionSavePlot() const;
/*! \brief returns the property actSaveData ( \copybrief actSaveData ). \details Description of the parameter actSaveData is: <BLOCKQUOTE>\copydoc actSaveData </BLOCKQUOTE>. \see actSaveData for more information */
/*! \copydoc actSaveData */
QAction* getActionSaveData() const;
/*! \brief returns the property actCopyData ( \copybrief actCopyData ). \details Description of the parameter actCopyData is: <BLOCKQUOTE>\copydoc actCopyData </BLOCKQUOTE>. \see actCopyData for more information */
/*! \copydoc actCopyData */
QAction* getActionCopyData() const;
/*! \brief returns the property actCopyPixelImage ( \copybrief actCopyPixelImage ). \details Description of the parameter actCopyPixelImage is: <BLOCKQUOTE>\copydoc actCopyPixelImage </BLOCKQUOTE>. \see actCopyPixelImage for more information */
/*! \copydoc actCopyPixelImage */
QAction* getActionCopyPixelImage() const;
/*! \brief returns the property actCopyMatlab ( \copybrief actCopyMatlab ). \details Description of the parameter actCopyMatlab is: <BLOCKQUOTE>\copydoc actCopyMatlab </BLOCKQUOTE>. \see actCopyMatlab for more information */
/*! \copydoc actCopyMatlab */
QAction* getActionCopyMatlab() const;
/*! \brief returns the property actSavePDF ( \copybrief actSavePDF ). \details Description of the parameter actSavePDF is: <BLOCKQUOTE>\copydoc actSavePDF </BLOCKQUOTE>. \see actSavePDF for more information */
/*! \copydoc actSavePDF */
QAction* getActionSavePDF() const;
#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0))
/*! \brief returns the property actSavePS ( \copybrief actSavePS ). \details Description of the parameter actSavePS is: <BLOCKQUOTE>\copydoc actSavePS </BLOCKQUOTE>. \see actSavePS for more information */
/*! \copydoc actSavePS */
QAction* getActionSavePS() const;
#endif
/*! \brief returns the property actSavePix ( \copybrief actSavePix ). \details Description of the parameter actSavePix is: <BLOCKQUOTE>\copydoc actSavePix </BLOCKQUOTE>. \see actSavePix for more information */
/*! \copydoc actSavePix */
QAction* getActionSavePix() const;
/*! \brief returns the property actSaveSVG ( \copybrief actSaveSVG ). \details Description of the parameter actSaveSVG is: <BLOCKQUOTE>\copydoc actSaveSVG </BLOCKQUOTE>. \see actSaveSVG for more information */
/*! \copydoc actSaveSVG */
QAction* getActionSaveSVG() const;
/*! \brief returns the property actPrint ( \copybrief actPrint ). \details Description of the parameter actPrint is: <BLOCKQUOTE>\copydoc actPrint </BLOCKQUOTE>. \see actPrint for more information */
/*! \copydoc actPrint */
QAction* getActionPrint() const;
/*! \brief returns the property actSaveCSV ( \copybrief actSaveCSV ). \details Description of the parameter actSaveCSV is: <BLOCKQUOTE>\copydoc actSaveCSV </BLOCKQUOTE>. \see actSaveCSV for more information */
/*! \copydoc actSaveCSV */
QAction* getActionSaveCSV() const;
/*! \brief returns the property actZoomAll ( \copybrief actZoomAll ). \details Description of the parameter actZoomAll is: <BLOCKQUOTE>\copydoc actZoomAll </BLOCKQUOTE>. \see actZoomAll for more information */
/*! \copydoc actZoomAll */
QAction* getActionZoomAll() const;
/*! \brief returns the property actZoomIn ( \copybrief actZoomIn ). \details Description of the parameter actZoomIn is: <BLOCKQUOTE>\copydoc actZoomIn </BLOCKQUOTE>. \see actZoomIn for more information */
/*! \copydoc actZoomIn */
QAction* getActionZoomIn() const;
/*! \brief returns the property actZoomOut ( \copybrief actZoomOut ). \details Description of the parameter actZoomOut is: <BLOCKQUOTE>\copydoc actZoomOut </BLOCKQUOTE>. \see actZoomOut for more information */
/*! \copydoc actZoomOut */
QAction *getActionZoomOut() const;
/*! \brief returns the property actShowPlotData ( \copybrief actShowPlotData ). \details Description of the parameter actShowPlotData is: <BLOCKQUOTE>\copydoc actShowPlotData </BLOCKQUOTE>. \see actShowPlotData for more information */
/*! \copydoc actShowPlotData */
QAction *getActionShowPlotData() const;
/*! \brief returns the property lstAdditionalPlotterActions ( \copybrief lstAdditionalPlotterActions ). \details Description of the parameter lstAdditionalPlotterActions is: <BLOCKQUOTE>\copydoc lstAdditionalPlotterActions </BLOCKQUOTE>. \see lstAdditionalPlotterActions for more information */
/*! \copydoc lstAdditionalPlotterActions */
AdditionalActionsMap getLstAdditionalPlotterActions() const;
/** \brief this function registers additional actions to lstAdditionalPlotterActions, which are displayed in the context-menu */
@ -890,29 +872,21 @@ class JKQTP_LIB_EXPORT JKQTBasePlotter: public QObject {
*/
void deregisterAdditionalAction(QAction* act);
/*! \brief returns the property masterSynchronizeWidth ( \copybrief masterSynchronizeWidth ). \details Description of the parameter masterSynchronizeWidth is: <BLOCKQUOTE>\copydoc masterSynchronizeWidth </BLOCKQUOTE>. \see masterSynchronizeWidth for more information */
/*! \copydoc masterSynchronizeWidth */
bool getMasterSynchronizeWidth() const;
/*! \brief returns the property masterSynchronizeHeight ( \copybrief masterSynchronizeHeight ). \details Description of the parameter masterSynchronizeHeight is: <BLOCKQUOTE>\copydoc masterSynchronizeHeight </BLOCKQUOTE>. \see masterSynchronizeHeight for more information */
/*! \copydoc masterSynchronizeHeight */
bool getMasterSynchronizeHeight() const;
/*! \brief sets the property fontSizePrintMultiplier ( \copybrief fontSizePrintMultiplier ) to the specified \a __value.
\details Description of the parameter fontSizePrintMultiplier is: <BLOCKQUOTE>\copydoc fontSizePrintMultiplier </BLOCKQUOTE>
\see fontSizePrintMultiplier for more information */
/*! \copydoc fontSizePrintMultiplier */
void setFontSizePrintMultiplier(double __value);
/*! \brief returns the property fontSizePrintMultiplier ( \copybrief fontSizePrintMultiplier ).
\details Description of the parameter fontSizePrintMultiplier is: <BLOCKQUOTE>\copydoc fontSizePrintMultiplier </BLOCKQUOTE>
\see fontSizePrintMultiplier for more information */
/*! \copydoc fontSizePrintMultiplier */
double getFontSizePrintMultiplier() const;
/*! \brief sets the property lineWidthPrintMultiplier ( \copybrief lineWidthPrintMultiplier ) to the specified \a __value.
\details Description of the parameter lineWidthPrintMultiplier is: <BLOCKQUOTE>\copydoc lineWidthPrintMultiplier </BLOCKQUOTE>
\see lineWidthPrintMultiplier for more information */
/*! \copydoc lineWidthPrintMultiplier */
void setLineWidthPrintMultiplier(double __value);
/*! \brief returns the property lineWidthPrintMultiplier ( \copybrief lineWidthPrintMultiplier ).
\details Description of the parameter lineWidthPrintMultiplier is: <BLOCKQUOTE>\copydoc lineWidthPrintMultiplier </BLOCKQUOTE>
\see lineWidthPrintMultiplier for more information */
/*! \copydoc lineWidthPrintMultiplier */
double getLineWidthPrintMultiplier() const;
/*! \brief returns the property fontSizeMultiplier ( \copybrief fontSizeMultiplier ). \details Description of the parameter fontSizeMultiplier is: <BLOCKQUOTE>\copydoc fontSizeMultiplier </BLOCKQUOTE>. \see fontSizeMultiplier for more information */
/*! \copydoc fontSizeMultiplier */
double getFontSizeMultiplier() const;
/*! \brief returns the property lineWidthMultiplier ( \copybrief lineWidthMultiplier ). \details Description of the parameter lineWidthMultiplier is: <BLOCKQUOTE>\copydoc lineWidthMultiplier </BLOCKQUOTE>. \see lineWidthMultiplier for more information */
/*! \copydoc lineWidthMultiplier */
double getLineWidthMultiplier() const;
@ -1823,29 +1797,17 @@ class JKQTP_LIB_EXPORT JKQTBasePlotter: public QObject {
/** \brief show the export preview window for a given page size \a pageSize, either in pixels (\a unitIsMM \c ==false ) or in millimeters (\a unitIsMM \c ==true ) */
bool exportpreview(QSizeF pageSize, bool unitIsMM=false);
/*! \brief sets the property fontSizeMultiplier ( \copybrief fontSizeMultiplier ) to the specified \a __value.
\details Description of the parameter fontSizeMultiplier is: <BLOCKQUOTE>\copydoc fontSizeMultiplier </BLOCKQUOTE>
\see fontSizeMultiplier for more information */
/*! \copydoc fontSizeMultiplier */
void setFontSizeMultiplier(double __value);
/*! \brief sets the property lineWidthMultiplier ( \copybrief lineWidthMultiplier ) to the specified \a __value.
\details Description of the parameter lineWidthMultiplier is: <BLOCKQUOTE>\copydoc lineWidthMultiplier </BLOCKQUOTE>
\see lineWidthMultiplier for more information */
/*! \copydoc lineWidthMultiplier */
void setLineWidthMultiplier(double __value);
/*! \brief sets the property printMagnification ( \copybrief printMagnification ) to the specified \a __value.
\details Description of the parameter printMagnification is: <BLOCKQUOTE>\copydoc printMagnification </BLOCKQUOTE>
\see printMagnification for more information */
/*! \copydoc printMagnification */
void setPrintMagnification(double __value);
/*! \brief returns the property printMagnification ( \copybrief printMagnification ).
\details Description of the parameter printMagnification is: <BLOCKQUOTE>\copydoc printMagnification </BLOCKQUOTE>
\see printMagnification for more information */
/*! \copydoc printMagnification */
double getPrintMagnification() const;
/*! \brief sets the property paintMagnification ( \copybrief paintMagnification ) to the specified \a __value.
\details Description of the parameter paintMagnification is: <BLOCKQUOTE>\copydoc paintMagnification </BLOCKQUOTE>
\see paintMagnification for more information */
/*! \copydoc paintMagnification */
void setPaintMagnification(double __value);
/*! \brief returns the property paintMagnification ( \copybrief paintMagnification ).
\details Description of the parameter paintMagnification is: <BLOCKQUOTE>\copydoc paintMagnification </BLOCKQUOTE>
\see paintMagnification for more information */
/*! \copydoc paintMagnification */
double getPaintMagnification() const;

View File

@ -330,18 +330,14 @@ class JKQTP_LIB_EXPORT JKQTPCoordinateAxis: public QObject {
}
/*! \copydoc parent */
inline const JKQTBasePlotter* getParent() const { return this->parent; }
/*! \brief returns the property parent ( \copybrief parent ). \details Description of the parameter parent is: <BLOCKQUOTE>\copydoc parent </BLOCKQUOTE>. \see parent for more information */
/*! \copydoc parent */
inline JKQTBasePlotter* getParent() { return this->parent; }
/*! \brief sets the property doUpdateScaling ( \copybrief doUpdateScaling ) to the specified \a __value.
\details Description of the parameter doUpdateScaling is: <BLOCKQUOTE>\copydoc doUpdateScaling </BLOCKQUOTE>
\see doUpdateScaling for more information */
/*! \copydoc doUpdateScaling */
inline void setDoUpdateScaling(bool __value)
{
this->doUpdateScaling = __value;
}
/*! \brief returns the property doUpdateScaling ( \copybrief doUpdateScaling ).
\details Description of the parameter doUpdateScaling is: <BLOCKQUOTE>\copydoc doUpdateScaling </BLOCKQUOTE>
\see doUpdateScaling for more information */
/*! \copydoc doUpdateScaling */
inline bool getDoUpdateScaling() const
{
return this->doUpdateScaling;

View File

@ -348,6 +348,12 @@ void JKQTPDatastore::deleteAllPrefixedColumns(QString prefix, bool removeItems)
}
////////////////////////////////////////////////////////////////////////////////////////////////
quint16 JKQTPDatastore::getColumnChecksum(int column) const
{
return getColumn(column).calculateChecksum();
}
////////////////////////////////////////////////////////////////////////////////////////////////
void JKQTPDatastore::deleteColumn(size_t column, bool removeItems) {

View File

@ -239,6 +239,8 @@ class JKQTP_LIB_EXPORT JKQTPDatastore{
inline size_t getColumnImageWidth(int column) const;
/** \brief returns the height of the image, represented by \a column (in row-major ordering) */
inline size_t getColumnImageHeight(int column) const;
/** \brief returns the data checksum of the given column */
quint16 getColumnChecksum(int column) const;
/** \brief returns the value at position (\c column, \c row). \c column is the logical column and will be mapped to the according memory block internally!) */
inline double get(size_t column, size_t row) const ;
@ -990,9 +992,9 @@ class JKQTP_LIB_EXPORT JKQTPColumn {
/** \brief class destructor */
~JKQTPColumn() =default;
/*! \brief sets the property name ( \copybrief name ) to the specified \a __value. \details Description of the parameter name is: <BLOCKQUOTE>\copydoc JKQTPColumn::name </BLOCKQUOTE> \see JKQTPColumn::name for more information */
/*! \copydoc name */
void setName (const QString& __value);
/*! \brief returns the property name ( \copybrief name ). \see name for more information */
/*! \copydoc name */
QString getName () const;
/*! \copydoc imageColumns */
@ -1096,11 +1098,13 @@ class JKQTP_LIB_EXPORT JKQTPColumn {
/** \brief set all values in the column to a specific \a value */
void setAll(double value);
/** \brief calculates a checksum over the contents of the column (using <a href="https://doc.qt.io/qt-5/qbytearray.html#qChecksum">qChecksum()</a>) */
inline quint16 calculateChecksum() const;
/*! \brief returns the property datastoreItem ( \copybrief datastoreItem ). \details Description of the parameter datastoreItem is: <BLOCKQUOTE>\copydoc JKQTPColumn::datastoreItem </BLOCKQUOTE>. \see JKQTPColumn::datastoreItem for more information */ \
/*! \copydoc datastoreItem */ \
inline size_t getDatastoreItemNum() const \
{ return this->datastoreItem; }
/*! \brief returns the property datastoreOffset ( \copybrief datastoreOffset ). \details Description of the parameter datastoreOffset is: <BLOCKQUOTE>\copydoc JKQTPColumn::datastoreOffset </BLOCKQUOTE>. \see JKQTPColumn::datastoreOffset for more information */ \
/*! \copydoc datastoreOffset */ \
inline size_t getDatastoreOffset() const \
{ return this->datastoreOffset; }
};
@ -1318,6 +1322,14 @@ inline void JKQTPColumn::incValue(size_t n, double increment){
datastore->getItem(datastoreItem)->set(datastoreOffset, n, datastore->getItem(datastoreItem)->get(datastoreOffset, n)+increment);
}
////////////////////////////////////////////////////////////////////////////////////////////////
quint16 JKQTPColumn::calculateChecksum() const
{
if (!datastore) return 0;
if (!datastore->getItem(datastoreItem)) return 0;
return qChecksum(reinterpret_cast<const char*>(getPointer(0)), static_cast<uint>(getRows()*sizeof(double)));
}
////////////////////////////////////////////////////////////////////////////////////////////////
inline double JKQTPColumn::getValue(size_t n) const {
if (!datastore) return JKQTP_NAN;

View File

@ -54,11 +54,9 @@ class JKQTP_LIB_EXPORT JKQTPOverlayElement : public QObject {
/*! \copydoc visible
\see see visible for details */
/*! \copydoc visible */
void setVisible(bool __value);
/*! \copydoc visible
\see see visible for details */
/*! \copydoc visible */
bool isVisible() const;
protected:
@ -113,29 +111,21 @@ class JKQTP_LIB_EXPORT JKQTPOverlayTwoPositionOverlay : public JKQTPOverlayEleme
public:
explicit JKQTPOverlayTwoPositionOverlay(double x1, double y1, double x2, double y2, JKQTBasePlotter *parent = nullptr);
/*! \copydoc x1
\see see x1 for details */
/*! \copydoc x1 */
void setX1(double __value);
/*! \copydoc x1
\see see x1 for details */
/*! \copydoc x1 */
double getX1() const;
/*! \copydoc x2
\see see x2 for details */
/*! \copydoc x2 */
void setX2(double __value);
/*! \copydoc x2
\see see x2 for details */
/*! \copydoc x2 */
double getX2() const;
/*! \copydoc y1
\see see y1 for details */
/*! \copydoc y1 */
void setY1(double __value);
/*! \copydoc y1
\see see y1 for details */
/*! \copydoc y1 */
double getY1() const;
/*! \copydoc y2
\see see y2 for details */
/*! \copydoc y2 */
void setY2(double __value);
/*! \copydoc y2
\see see y2 for details */
/*! \copydoc y2 */
double getY2() const;
protected:
/** \brief x-coordinate of first point of overlay */
@ -158,11 +148,9 @@ class JKQTP_LIB_EXPORT JKQTPOverlayOneCoordOverlay : public JKQTPOverlayElement
public:
explicit JKQTPOverlayOneCoordOverlay(double pos, JKQTBasePlotter *parent = nullptr);
/*! \copydoc position
\see see position for details */
/*! \copydoc position */
void setPosition(double __value);
/*! \copydoc position
\see see position for details */
/*! \copydoc position */
double getPosition() const;
protected:
/** \brief second position for the element */
@ -179,11 +167,9 @@ class JKQTP_LIB_EXPORT JKQTPOverlayTwoCoordOverlay : public JKQTPOverlayOneCoord
public:
explicit JKQTPOverlayTwoCoordOverlay(double pos, double pos2, JKQTBasePlotter *parent = nullptr);
/*! \copydoc position2
\see see position2 for details */
/*! \copydoc position2 */
void setPosition2(double __value);
/*! \copydoc position2
\see see position2 for details */
/*! \copydoc position2 */
double getPosition2() const;
protected:
/** \brief second position for the element */
@ -209,11 +195,9 @@ class JKQTP_LIB_EXPORT JKQTPOverlayVerticalLine : public JKQTPOverlayOneCoordOve
/** \brief set element color */
virtual void setColor(QColor c);
/*! \copydoc text
\see see text for details */
/*! \copydoc text */
void setText(const QString & __value);
/*! \copydoc text
\see see text for details */
/*! \copydoc text */
QString getText() const;
protected:
/** \brief a text to display next to the vertical line */
@ -238,18 +222,14 @@ class JKQTP_LIB_EXPORT JKQTPOverlayVerticalRange : public JKQTPOverlayTwoCoordOv
/** \brief set element color */
virtual void setColor(QColor c);
/*! \copydoc inverted
\see see inverted for details */
/*! \copydoc inverted */
void setInverted(bool __value);
/*! \copydoc inverted
\see see inverted for details */
/*! \copydoc inverted */
bool getInverted() const;
/*! \copydoc text
\see see text for details */
/*! \copydoc text */
void setText(const QString & __value);
/*! \copydoc text
\see see text for details */
/*! \copydoc text */
QString getText() const;
protected:
/** \brief a text to display next to the range */
@ -270,11 +250,9 @@ class JKQTP_LIB_EXPORT JKQTPOverlayLine : public JKQTPOverlayTwoPositionOverlay,
/** \brief plots the graph to the plotter object specified as parent */
virtual void draw(JKQTPEnhancedPainter& painter);
/*! \copydoc infinite
\see see infinite for details */
/*! \copydoc infinite */
void setInfinite(bool __value);
/*! \copydoc infinite
\see see infinite for details */
/*! \copydoc infinite */
bool getInfinite() const;
/** \brief set element color */
virtual void setColor(QColor c);

View File

@ -103,23 +103,17 @@ class JKQTP_LIB_EXPORT JKQTPBarVerticalGraph: public JKQTPXYGraph, public JKQTPG
*/
virtual void setColor(QColor c);
/*! \copydoc shift
\see see shift for details */
/*! \copydoc shift */
void setShift(double __value);
/*! \copydoc shift
\see see shift for details */
/*! \copydoc shift */
double getShift() const;
/*! \copydoc width
\see see width for details */
/*! \copydoc width */
void setWidth(double __value);
/*! \copydoc width
\see see width for details */
/*! \copydoc width */
double getWidth() const;
/*! \copydoc baseline
\see see baseline for details */
/*! \copydoc baseline */
void setBaseline(double __value);
/*! \copydoc baseline
\see see baseline for details */
/*! \copydoc baseline */
double getBaseline() const;
/** \brief sets the fill color and the color together, where fillColor is set to \a fill and the line-color is set to \c fill.darker(colorDarker)
* \see setColor()

View File

@ -502,33 +502,23 @@ class JKQTP_LIB_EXPORT JKQTPXYGraph: public JKQTPGraph {
/** \copydoc JKQTPGraph::usesColumn() */
virtual bool usesColumn(int column) const override;
/*! \copydoc xColumn
\see see xColumn for details */
/*! \copydoc xColumn */
void setXColumn(int __value);
/*! \copydoc xColumn
\see see xColumn for details */
/*! \copydoc xColumn */
int getXColumn() const;
/*! \brief sets the property xColumn ( \copybrief xColumn ) to the specified \a __value, where __value is static_cast'ed from size_t to int.
\details Description of the parameter xColumn is: <BLOCKQUOTE>\copydoc xColumn </BLOCKQUOTE>
\see xColumn for more information */
/*! \copydoc xColumn */
void setXColumn (size_t __value);
/*! \copydoc yColumn
\see see yColumn for details */
/*! \copydoc yColumn */
void setYColumn(int __value);
/*! \copydoc yColumn
\see see yColumn for details */
/*! \copydoc yColumn */
int getYColumn() const;
/*! \brief sets the property yColumn ( \copybrief yColumn ) to the specified \a __value, where __value is static_cast'ed from size_t to int.
\details Description of the parameter yColumn is: <BLOCKQUOTE>\copydoc yColumn </BLOCKQUOTE>
\see yColumn for more information */
/*! \copydoc yColumn */
void setYColumn (size_t __value);
/*! \copydoc sortData
\see see sortData for details */
/*! \copydoc sortData */
void setDataSortOrder(DataSortOrder __value);
/*! \copydoc sortData
\see see sortData for details */
/*! \copydoc sortData */
DataSortOrder getDataSortOrder() const;
/*! \brief sets the property sortData ( \copybrief sortData ) to the specified \a __value. \details Description of the parameter sortData is: <BLOCKQUOTE>\copydoc sortData </BLOCKQUOTE> \see sortData for more information */
/*! \copydoc sortData */
void setDataSortOrder(int __value);
/** \brief sets xColumn and yColumn at the same time */
@ -622,32 +612,24 @@ class JKQTP_LIB_EXPORT JKQTPSingleColumnGraph: public JKQTPGraph {
JKQTPSingleColumnGraph(JKQTBasePlotter* parent=nullptr);
JKQTPSingleColumnGraph(JKQTPlotter* parent);
/*! \copydoc dataColumn
\see see dataColumn for details */
/*! \copydoc dataColumn */
void setDataColumn(int __value);
/*! \copydoc dataColumn
\see see dataColumn for details */
/*! \copydoc dataColumn */
int getDataColumn() const;
/*! \brief sets the property dataColumn ( \copybrief dataColumn ) to the specified \a __value, where __value is static_cast'ed from size_t to int.
\details Description of the parameter dataColumn is: <BLOCKQUOTE>\copydoc dataColumn </BLOCKQUOTE>
\see dataColumn for more information */
/*! \copydoc dataColumn */
void setDataColumn (size_t __value);
/*! \copydoc sortData
\see see sortData for details */
/*! \copydoc sortData */
void setDataSortOrder(DataSortOrder __value);
/*! \copydoc sortData
\see see sortData for details */
/*! \copydoc sortData */
DataSortOrder getDataSortOrder() const;
/*! \brief sets the property sortData ( \copybrief sortData ) to the specified \a __value. \details Description of the parameter sortData is: <BLOCKQUOTE>\copydoc sortData </BLOCKQUOTE> \see sortData for more information */
/*! \copydoc sortData */
void setDataSortOrder(int __value);
/*! \copydoc dataDirection
\see see dataDirection for details */
/*! \copydoc dataDirection */
void setDataDirection(DataDirection __value);
/*! \copydoc dataDirection
\see see dataDirection for details */
/*! \copydoc dataDirection */
DataDirection getDataDirection() const;
/** \copydoc JKQTPGraph::usesColumn() */

View File

@ -139,106 +139,69 @@ class JKQTP_LIB_EXPORT JKQTPBoxplotVerticalGraph: public JKQTPGraph, public JKQT
/** \copydoc JKQTPGraph::usesColumn() */
virtual bool usesColumn(int c) const override;
/*! \copydoc sortData
\see see sortData for details */
/*! \copydoc sortData */
void setDataSortOrder(DataSortOrder __value);
/*! \copydoc sortData
\see see sortData for details */
/*! \copydoc sortData */
DataSortOrder getDataSortOrder() const;
/*! \brief sets the property sortData ( \copybrief sortData ) to the specified \a __value. \details Description of the parameter sortData is: <BLOCKQUOTE>\copydoc sortData </BLOCKQUOTE> \see sortData for more information */
/*! \copydoc sortData */
void setDataSortOrder(int __value);
/*! \copydoc posColumn
\see see posColumn for details */
/*! \copydoc posColumn */
void setPositionColumn(int __value);
/*! \copydoc posColumn
\see see posColumn for details */
/*! \copydoc posColumn */
int getPositionColumn() const;
/*! \brief sets the property posColumn ( \copybrief posColumn ) to the specified \a __value, where __value is static_cast'ed from size_t to int.
\details Description of the parameter posColumn is: <BLOCKQUOTE>\copydoc posColumn </BLOCKQUOTE>
\see posColumn for more information */
/*! \copydoc posColumn */
void setPositionColumn (size_t __value);
/*! \copydoc medianColumn
\see see medianColumn for details */
/*! \copydoc medianColumn */
void setMedianColumn(int __value);
/*! \copydoc medianColumn
\see see medianColumn for details */
/*! \copydoc medianColumn */
int getMedianColumn() const;
/*! \brief sets the property medianColumn ( \copybrief medianColumn ) to the specified \a __value, where __value is static_cast'ed from size_t to int.
\details Description of the parameter medianColumn is: <BLOCKQUOTE>\copydoc medianColumn </BLOCKQUOTE>
\see medianColumn for more information */
/*! \copydoc medianColumn */
void setMedianColumn (size_t __value);
/*! \copydoc meanColumn
\see see meanColumn for details */
/*! \copydoc meanColumn */
void setMeanColumn(int __value);
/*! \copydoc meanColumn
\see see meanColumn for details */
/*! \copydoc meanColumn */
int getMeanColumn() const;
/*! \brief sets the property meanColumn ( \copybrief meanColumn ) to the specified \a __value, where __value is static_cast'ed from size_t to int.
\details Description of the parameter meanColumn is: <BLOCKQUOTE>\copydoc meanColumn </BLOCKQUOTE>
\see meanColumn for more information */
/*! \copydoc meanColumn */
void setMeanColumn (size_t __value);
/*! \copydoc minColumn
\see see minColumn for details */
/*! \copydoc minColumn */
void setMinColumn(int __value);
/*! \copydoc minColumn
\see see minColumn for details */
/*! \copydoc minColumn */
int getMinColumn() const;
/*! \brief sets the property minColumn ( \copybrief minColumn ) to the specified \a __value, where __value is static_cast'ed from size_t to int.
\details Description of the parameter minColumn is: <BLOCKQUOTE>\copydoc minColumn </BLOCKQUOTE>
\see minColumn for more information */
/*! \copydoc minColumn */
void setMinColumn( size_t __value);
/*! \copydoc maxColumn
\see see maxColumn for details */
/*! \copydoc maxColumn */
void setMaxColumn(int __value);
/*! \copydoc maxColumn
\see see maxColumn for details */
/*! \copydoc maxColumn */
int getMaxColumn() const;
/*! \brief sets the property maxColumn ( \copybrief maxColumn ) to the specified \a __value, where __value is static_cast'ed from size_t to int.
\details Description of the parameter maxColumn is: <BLOCKQUOTE>\copydoc maxColumn </BLOCKQUOTE>
\see maxColumn for more information */
/*! \copydoc maxColumn */
void setMaxColumn (size_t __value);
/*! \copydoc percentile25Column
\see see percentile25Column for details */
/*! \copydoc percentile25Column */
void setPercentile25Column(int __value);
/*! \copydoc percentile25Column
\see see percentile25Column for details */
/*! \copydoc percentile25Column */
int getPercentile25Column() const;
/*! \brief sets the property percentile25Column ( \copybrief percentile25Column ) to the specified \a __value, where __value is static_cast'ed from size_t to int.
\details Description of the parameter percentile25Column is: <BLOCKQUOTE>\copydoc percentile25Column </BLOCKQUOTE>
\see percentile25Column for more information */
/*! \copydoc percentile25Column */
void setPercentile25Column (size_t __value);
/*! \copydoc percentile75Column
\see see percentile75Column for details */
/*! \copydoc percentile75Column */
void setPercentile75Column(int __value);
/*! \copydoc percentile75Column
\see see percentile75Column for details */
/*! \copydoc percentile75Column */
int getPercentile75Column() const;
/*! \brief sets the property percentile75Column ( \copybrief percentile75Column ) to the specified \a __value, where __value is static_cast'ed from size_t to int.
\details Description of the parameter percentile75Column is: <BLOCKQUOTE>\copydoc percentile75Column </BLOCKQUOTE>
\see percentile75Column for more information */
/*! \copydoc percentile75Column */
void setPercentile75Column (size_t __value);
/*! \copydoc medianConfidenceColumn
\see see medianConfidenceColumn for details */
/*! \copydoc medianConfidenceColumn */
int getMedianConfidenceColumn() const;
/*! \brief sets the property medianConfidenceColumn ( \copybrief medianConfidenceColumn ) to the specified \a __value, where __value is static_cast'ed from size_t to int.
\details Description of the parameter medianConfidenceColumn is: <BLOCKQUOTE>\copydoc medianConfidenceColumn </BLOCKQUOTE>
\see medianConfidenceColumn for more information */
/*! \copydoc medianConfidenceColumn */
void setMedianConfidenceColumn (size_t __value);
/*! \copydoc boxWidthRelative
\see see boxWidthRelative for details */
/*! \copydoc boxWidthRelative */
void setBoxWidthRelative(double __value);
/*! \copydoc boxWidthRelative
\see see boxWidthRelative for details */
/*! \copydoc boxWidthRelative */
double getBoxWidthRelative() const;
/*! \copydoc useRelativeBoxWidth
\see see useRelativeBoxWidth for details */
/*! \copydoc useRelativeBoxWidth */
void setUseRelativeBoxWidth(bool __value);
/*! \copydoc useRelativeBoxWidth
\see see useRelativeBoxWidth for details */
/*! \copydoc useRelativeBoxWidth */
bool getUseRelativeBoxWidth() const;
protected:
/** \brief width of box in percent of distance between the current two posColumn values
@ -372,79 +335,55 @@ class JKQTP_LIB_EXPORT JKQTPBoxplotVerticalElement: public JKQTPPlotObject, publ
virtual bool getYMinMax(double& miny, double& maxy, double& smallestGreaterZero) override;
/*! \copydoc pos
\see see pos for details */
/*! \copydoc pos */
void setPos(double __value);
/*! \copydoc pos
\see see pos for details */
/*! \copydoc pos */
double getPos() const;
/*! \copydoc median
\see see median for details */
/*! \copydoc median */
void setMedian(double __value);
/*! \copydoc median
\see see median for details */
/*! \copydoc median */
double getMedian() const;
/*! \copydoc mean
\see see mean for details */
/*! \copydoc mean */
void setMean(double __value);
/*! \copydoc mean
\see see mean for details */
/*! \copydoc mean */
double getMean() const;
/*! \copydoc min
\see see min for details */
/*! \copydoc min */
void setMin(double __value);
/*! \copydoc min
\see see min for details */
/*! \copydoc min */
double getMin() const;
/*! \copydoc max
\see see max for details */
/*! \copydoc max */
void setMax(double __value);
/*! \copydoc max
\see see max for details */
/*! \copydoc max */
double getMax() const;
/*! \copydoc percentile25
\see see percentile25 for details */
/*! \copydoc percentile25 */
void setPercentile25(double __value);
/*! \copydoc percentile25
\see see percentile25 for details */
/*! \copydoc percentile25 */
double getPercentile25() const;
/*! \copydoc percentile75
\see see percentile75 for details */
/*! \copydoc percentile75 */
void setPercentile75(double __value);
/*! \copydoc percentile75
\see see percentile75 for details */
/*! \copydoc percentile75 */
double getPercentile75() const;
/*! \copydoc drawMean
\see see drawMean for details */
/*! \copydoc drawMean */
void setDrawMean(bool __value);
/*! \copydoc drawMean
\see see drawMean for details */
/*! \copydoc drawMean */
bool getDrawMean() const;
/*! \copydoc drawMedian
\see see drawMedian for details */
/*! \copydoc drawMedian */
void setDrawMedian(bool __value);
/*! \copydoc drawMedian
\see see drawMedian for details */
/*! \copydoc drawMedian */
bool getDrawMedian() const;
/*! \copydoc drawMinMax
\see see drawMinMax for details */
/*! \copydoc drawMinMax */
void setDrawMinMax(bool __value);
/*! \copydoc drawMinMax
\see see drawMinMax for details */
/*! \copydoc drawMinMax */
bool getDrawMinMax() const;
/*! \copydoc drawNotch
\see see drawNotch for details */
/*! \copydoc drawNotch */
void setDrawNotch(bool __value);
/*! \copydoc drawNotch
\see see drawNotch for details */
/*! \copydoc drawNotch */
bool getDrawNotch() const;
/*! \copydoc medianConfidenceIntervalWidth
\see see medianConfidenceIntervalWidth for details */
/*! \copydoc medianConfidenceIntervalWidth */
double getMedianConfidenceIntervalWidth() const;
/*! \copydoc medianConfidenceIntervalWidth
\see see medianConfidenceIntervalWidth for details */
/*! \copydoc medianConfidenceIntervalWidth */
void setMedianConfidenceIntervalWidth(double __value);
protected:

View File

@ -49,32 +49,24 @@ class JKQTP_LIB_EXPORT JKQTPGraphBoxplotStyleMixin: public JKQTPGraphLineStyleMi
JKQTPGraphBoxplotStyleMixin();
void initBoxplotStyle(JKQTBasePlotter* parent, int &parentPlotStyle);
/*! \copydoc boxWidthAbsolute
\see see boxWidthAbsolute for details */
/*! \copydoc boxWidthAbsolute */
void setBoxWidthAbsolute(double __value);
/*! \copydoc boxWidthAbsolute
\see see boxWidthAbsolute for details */
/*! \copydoc boxWidthAbsolute */
double getBoxWidthAbsolute() const;
/*! \copydoc drawBox
\see see drawBox for details */
/*! \copydoc drawBox */
void setDrawBox(bool __value);
/*! \copydoc drawBox
\see see drawBox for details */
/*! \copydoc drawBox */
bool getDrawBox() const;
/*! \copydoc relativeWhiskerWidth
\see see relativeWhiskerWidth for details */
/*! \copydoc relativeWhiskerWidth */
void setRelativeWhiskerWidth(double __value);
/*! \copydoc relativeWhiskerWidth
\see see relativeWhiskerWidth for details */
/*! \copydoc relativeWhiskerWidth */
double getRelativeWhiskerWidth() const;
/*! \copydoc relativeNotchIndent
\see see relativeNotchIndent for details */
/*! \copydoc relativeNotchIndent */
void setRelativeNotchIndent(double __value);
/*! \copydoc relativeNotchIndent
\see see relativeNotchIndent for details */
/*! \copydoc relativeNotchIndent */
double getRelativeNotchIndent() const;
@ -209,11 +201,9 @@ class JKQTP_LIB_EXPORT JKQTPGraphBoxplotStyleMixin: public JKQTPGraphLineStyleMi
MeanAsLine /*!< \brief draw mean as a lie (specified by the pen settings in JKQTPGraphSymbolStyleMixin) */
};
/*! \copydoc meanMode
\see see meanMode for details */
/*! \copydoc meanMode */
void setMeanMode(MeanMode __value);
/*! \copydoc meanMode
\see see meanMode for details */
/*! \copydoc meanMode */
MeanMode getMeanMode() const;

View File

@ -24,6 +24,7 @@
#include "jkqtcommon/jkqtptools.h"
#include "jkqtplottertools/jkqtpenhancedpainter.h"
#include "jkqtplotter/jkqtplotter.h"
#include "jkqtpgraphscontour.h"
#include <QDebug>
#include <QImageWriter>
#include <QFileDialog>
@ -32,60 +33,54 @@
#include <QClipboard>
# include <QVector3D>
JKQTPContour::JKQTPContour(JKQTBasePlotter *parent) :
JKQTPContourPlot::JKQTPContourPlot(JKQTBasePlotter *parent) :
JKQTPMathImage(parent)
{
colorBarRightVisible=false;
ignoreOnPlane=false;
numberOfLevels=1;
colorFromPalette=true;
datatype=JKQTPMathImageBase::DoubleArray;
relativeLevels=false;
initLineStyle(parent, parentPlotStyle);
}
JKQTPContour::JKQTPContour(double x, double y, double width, double height, void* data, int Nx, int Ny, JKQTPMathImageColorPalette palette, DataType datatype, JKQTBasePlotter* parent) :
JKQTPMathImage( x, y, width, height, datatype, data, Nx, Ny, palette, parent)
{
colorBarRightVisible=false;
ignoreOnPlane=false;
numberOfLevels=1;
colorFromPalette=true;
contourColoringMode=ColorContoursFromPaletteByValue;
relativeLevels=false;
initLineStyle(parent, parentPlotStyle);
}
JKQTPContour::JKQTPContour(JKQTPlotter *parent) :
JKQTPContour(parent->getPlotter())
JKQTPContourPlot::JKQTPContourPlot(JKQTPlotter *parent) :
JKQTPContourPlot(parent->getPlotter())
{
}
JKQTPContour::JKQTPContour(double x, double y, double width, double height, void* data, int Nx, int Ny, JKQTPMathImageColorPalette palette, DataType datatype, JKQTPlotter* parent) :
JKQTPContour( x, y, width, height, data, Nx, Ny, palette, datatype, parent->getPlotter())
{
}
void JKQTPContour::draw(JKQTPEnhancedPainter &painter)
void JKQTPContourPlot::draw(JKQTPEnhancedPainter &painter)
{
//qDebug()<<"JKQTPContourPlot::draw";
ensureImageData();
if(contourLevels.isEmpty()) createContourLevels(numberOfLevels);
else {
numberOfLevels=contourLevels.size();
// qSort(contourLevels);
int numberOfLevels=contourLevels.size();
if (numberOfLevels<=0) return;
int64_t colChecksum=-1;
if (data && Nx*Ny>0) {
colChecksum=static_cast<int64_t>(qChecksum(reinterpret_cast<char*>(data), Nx*Ny* getSampleSize()));
}
/*if (parent && parent->getDatastore() && imageColumn>=0) {
colChecksum=static_cast<int64_t>(parent->getDatastore()->getColumnChecksum(imageColumn));
}*/
if(contourLines.isEmpty()) { // contour lines are only calculated once
if(contourLinesCache.isEmpty() || (contourLinesCachedForChecksum!=colChecksum) || (contourLinesCachedForChecksum<0)) { // contour lines are only calculated once
QList<QVector<QLineF> > lines;
lines.reserve(contourLevels.size());
for(int i =0; i<contourLevels.size();++i) {
contourLines.append(QVector<QLineF> (0));
lines.append(QVector<QLineF> (0));
}
this->calcContourLines(lines);
contourLinesCache.clear();
contourLinesCachedForChecksum=colChecksum;
for (const QVector<QLineF>& l: lines) {
contourLinesCache.push_back(JKQTPUnifyLinesToPolygons(l, qMin(getWidth()/static_cast<double>(getNx()),getHeight()/static_cast<double>(getNy()))/4.0));
}
this->calcContourLines(contourLines);
}
@ -95,29 +90,53 @@ void JKQTPContour::draw(JKQTPEnhancedPainter &painter)
QPen p=getLinePen(painter, parent);
painter.setPen(p);
QImage colorLevels = getPaletteImage(palette,numberOfLevels);
QVector<QLineF> contourLinesTransformedSingleLevel;
QLineF lineTranformed;
// calculate an image with one pixel per contour level and fill it with the appropriate colors
QImage colorLevels = getPaletteImage(palette,numberOfLevels); // (contourColoringMode==ContourColoringMode::ColorContoursFromPalette)
if (contourColoringMode==ContourColoringMode::SingleColorContours) {
for (int i=0; i<numberOfLevels; i++) colorLevels.setPixel(i, 0, getLineColor().rgba());
} else if (contourColoringMode==ContourColoringMode::ColorContoursFromPaletteByValue) {
QImage colorDataLevels = getPaletteImage(palette,2000);
for (int i=0; i<numberOfLevels; i++) {
colorLevels.setPixel(i, 0, colorDataLevels.pixel(qBound<int>(0, (internalDataMax-contourLevels.value(i, 0))*static_cast<double>(colorDataLevels.width())/(internalDataMax-internalDataMin), colorDataLevels.width()-1),0));
}
}
// set override colors
for (int i=0; i<numberOfLevels; i++) {
if (contourOverrideColor.contains(contourLevels[i])) {
colorLevels.setPixel(i, 0, contourOverrideColor[contourLevels[i]].rgba());
}
}
getDataMinMax(internalDataMin, internalDataMax);
{
#ifdef JKQTBP_AUTOTIMER
JKQTPAutoOutputTimer jkaat(QString("JKQTPContourPlot::draw(): draw lines (incl. unify)"));
#endif
for(int i =0; i<numberOfLevels;++i) {
if(colorFromPalette) {
//qDebug()<<"============================================================\n== LEVEL "<<i<<"\n============================================================";
QVector<QPolygonF> contourLinesTransformedSingleLevel;
p.setColor(QColor(colorLevels.pixel(i,0)));
painter.setPen(p);
}
// transform into plot coordinates
for(QVector<QLineF >::const_iterator line =contourLines.at(i).begin(); line!=contourLines.at(i).end();++line ) {
lineTranformed.setP1(transform(x+line->p1().x()/double(Nx-1)*width, y+line->p1().y()/double(Ny-1)*height));
lineTranformed.setP2(transform(x+line->p2().x()/double(Nx-1)*width, y+line->p2().y()/double(Ny-1)*height));
contourLinesTransformedSingleLevel.append(lineTranformed);
for(auto polygon =contourLinesCache.at(i).begin(); polygon!=contourLinesCache.at(i).end();++polygon ) {
contourLinesTransformedSingleLevel.push_back(QPolygonF());
for (auto& p: *polygon) {
contourLinesTransformedSingleLevel.last().append(transform(x+p.x()/double(Nx-1)*width, y+p.y()/double(Ny-1)*height));
}
//qDebug()<<lineTranformed;
}
for (const QPolygonF& p: contourLinesTransformedSingleLevel) {
painter.drawPolyline(p);
}
}
painter.drawLines(contourLinesTransformedSingleLevel);
contourLinesTransformedSingleLevel.clear();
}
}
void JKQTPContour::createContourLevels(int nLevels)
void JKQTPContourPlot::createContourLevels(int nLevels)
{
ensureImageData();
clearContourLevel();
if (!data) return;
if (nLevels<1) return;
double min,max;
@ -129,10 +148,14 @@ void JKQTPContour::createContourLevels(int nLevels)
}
relativeLevels=false;
clearCachedContours();
}
void JKQTPContour::createContourLevelsLog(int nLevels, int m)
void JKQTPContourPlot::createContourLevelsLog(int nLevels, int m)
{
ensureImageData();
clearContourLevel();
if (!data) return;
if (nLevels<1) return;
double min,max;
@ -161,217 +184,122 @@ void JKQTPContour::createContourLevelsLog(int nLevels, int m)
}
relativeLevels=false;
clearCachedContours();
}
void JKQTPContour::setIgnoreOnPlane(bool __value)
void JKQTPContourPlot::setIgnoreOnPlane(bool __value)
{
this->ignoreOnPlane = __value;
clearCachedContours();
}
bool JKQTPContour::getIgnoreOnPlane() const
bool JKQTPContourPlot::getIgnoreOnPlane() const
{
return this->ignoreOnPlane;
}
void JKQTPContour::setNumberOfLevels(int __value)
int JKQTPContourPlot::getNumberOfLevels() const
{
this->numberOfLevels = __value;
return this->contourLevels.size();
}
int JKQTPContour::getNumberOfLevels() const
void JKQTPContourPlot::setContourColoringMode(ContourColoringMode __value)
{
return this->numberOfLevels;
this->contourColoringMode = __value;
}
void JKQTPContour::setColorFromPalette(bool __value)
JKQTPContourPlot::ContourColoringMode JKQTPContourPlot::getContourColoringMode() const
{
this->colorFromPalette = __value;
return this->contourColoringMode;
}
bool JKQTPContour::getColorFromPalette() const
{
return this->colorFromPalette;
}
void JKQTPContour::setContourLevels(const QList<double> &__value)
{
this->contourLevels = __value;
}
QList<double> JKQTPContour::getContourLevels() const
QVector<double> JKQTPContourPlot::getContourLevels() const
{
return this->contourLevels;
}
void JKQTPContour::setRelativeLevels(bool __value)
void JKQTPContourPlot::setRelativeLevels(bool __value)
{
this->relativeLevels = __value;
}
bool JKQTPContour::getRelativeLevels() const
bool JKQTPContourPlot::getRelativeLevels() const
{
return this->relativeLevels;
}
void JKQTPContour::setImageColumn(size_t columnID)
void JKQTPContourPlot::addContourLevel(double level)
{
datatype=JKQTPMathImageBase::DoubleArray;
data=parent->getDatastore()->getColumnPointer(columnID,0);
if (parent && columnID>=0 && parent->getDatastore()) {
setNx(parent->getDatastore()->getColumnImageWidth(columnID));
setNy(parent->getDatastore()->getColumnImageHeight(columnID));
contourLevels.append(level);
qSort(contourLevels);
clearCachedContours();
}
void JKQTPContourPlot::addContourLevel(double level, QColor overrideColor)
{
addContourLevel(level);
setOverrideColor(level, overrideColor);
}
void JKQTPContourPlot::setOverrideColor(double level, QColor overrideColor)
{
contourOverrideColor[level]=overrideColor;
}
QColor JKQTPContourPlot::getOverrideColor(int level) const
{
if (level>=0 && level<contourLevels.size()) {
if (contourOverrideColor.contains(contourLevels.at(level))) {
return contourOverrideColor.value(contourLevels.at(level));
}
}
return getLineColor();
}
bool JKQTPContourPlot::hasOverrideColor(int level) const
{
if (level>=0 && level<contourLevels.size()) {
if (contourOverrideColor.contains(contourLevels.at(level))) {
return true;
}
}
return false;
}
void JKQTPContourPlot::removeOverrideColor(int level)
{
if (level>=0 && level<contourLevels.size()) {
if (contourOverrideColor.contains(contourLevels.at(level))) {
contourOverrideColor.remove(contourLevels.at(level));
}
}
}
void JKQTPContour::ensureImageData()
void JKQTPContourPlot::clearContourLevel()
{
contourLevels.clear();
contourOverrideColor.clear();
clearCachedContours();
}
double JKQTPContour::value(int xIdx, int yIdx)
void JKQTPContourPlot::clearCachedContours()
{
// row-major in datastore
ensureImageData();
if (!data) return 0;
switch(datatype) {
case JKQTPMathImageBase::DoubleArray:
return (static_cast<double*>(data))[yIdx*getNx()+xIdx];
case JKQTPMathImageBase::FloatArray:
return (static_cast<float*>(data))[yIdx*getNx()+xIdx];
case JKQTPMathImageBase::UInt8Array:
return (static_cast<uint8_t*>(data))[yIdx*getNx()+xIdx];
case JKQTPMathImageBase::UInt16Array:
return (static_cast<uint16_t*>(data))[yIdx*getNx()+xIdx];
case JKQTPMathImageBase::UInt32Array:
return (static_cast<uint32_t*>(data))[yIdx*getNx()+xIdx];
case JKQTPMathImageBase::UInt64Array:
return (static_cast<uint64_t*>(data))[yIdx*getNx()+xIdx];
case JKQTPMathImageBase::Int8Array:
return (static_cast<int8_t*>(data))[yIdx*getNx()+xIdx];
case JKQTPMathImageBase::Int16Array:
return (static_cast<int16_t*>(data))[yIdx*getNx()+xIdx];
case JKQTPMathImageBase::Int32Array:
return (static_cast<int32_t*>(data))[yIdx*getNx()+xIdx];
case JKQTPMathImageBase::Int64Array:
return (static_cast<int64_t*>(data))[yIdx*getNx()+xIdx];
default:
return 0;
}
}
bool JKQTPContour::intersect(QLineF &line, const QVector3D &vertex1,const QVector3D &vertex2,const QVector3D &vertex3,double level)
{
bool found = true;
// Are the vertices below (-1), on (0) or above (1) the plane ?
const int eq1 = compare2level(vertex1,level);
const int eq2 = compare2level(vertex2,level);
const int eq3 = compare2level(vertex3,level);
/*
(a) All the vertices lie below the contour level.
(b) Two vertices lie below and one on the contour level.
(c) Two vertices lie below and one above the contour level.
(d) One vertex lies below and two on the contour level.
(e) One vertex lies below, one on and one above the contour level.
(f) One vertex lies below and two above the contour level.
(g) Three vertices lie on the contour level.
(h) Two vertices lie on and one above the contour level.
(i) One vertex lies on and two above the contour level.
(j) All the vertices lie above the contour level.
*/
static const int caseLUT[3][3][3] =
{
// jump table to avoid nested case statements
{ { 0, 0, 8 }, { 0, 2, 5 }, { 7, 6, 9 } },
{ { 0, 3, 4 }, { 1, 10, 1 }, { 4, 3, 0 } },
{ { 9, 6, 7 }, { 5, 2, 0 }, { 8, 0, 0 } }
};
const int caseType = caseLUT[eq1+1][eq2+1][eq3+1];
switch (caseType)
{
case 1:
// d(0,0,-1), h(0,0,1)
line.setP1(vertex1.toPointF());
line.setP2(vertex2.toPointF());
break;
case 2:
// d(-1,0,0), h(1,0,0)
line.setP1(vertex2.toPointF());
line.setP2(vertex3.toPointF());
break;
case 3:
// d(0,-1,0), h(0,1,0)
line.setP1(vertex3.toPointF());
line.setP2(vertex1.toPointF());
break;
case 4:
// e(0,-1,1), e(0,1,-1)
line.setP1(vertex1.toPointF());
line.setP2(interpolatePoint(vertex2, vertex3, level));
break;
case 5:
// e(-1,0,1), e(1,0,-1)
line.setP1(vertex2.toPointF());
line.setP2(interpolatePoint(vertex3, vertex1, level));
break;
case 6:
// e(-1,1,0), e(1,0,-1)
line.setP1(vertex3.toPointF());
line.setP2(interpolatePoint(vertex1, vertex2, level));
break;
case 7:
// c(-1,1,-1), f(1,1,-1)
line.setP1(interpolatePoint(vertex1, vertex2, level));
line.setP2(interpolatePoint(vertex2, vertex3, level));
break;
case 8:
// c(-1,-1,1), f(1,1,-1)
line.setP1(interpolatePoint(vertex2, vertex3, level));
line.setP2(interpolatePoint(vertex3, vertex1, level));
break;
case 9:
// f(-1,1,1), c(1,-1,-1)
line.setP1(interpolatePoint(vertex3, vertex1, level));
line.setP2(interpolatePoint(vertex1, vertex2, level));
break;
case 10:
// g(0,0,0)
// The CONREC algorithm has no satisfying solution for
// what to do, when all vertices are on the plane.
if ( ignoreOnPlane )
found = false;
else
{
line.setP1(vertex3.toPointF());
line.setP2(vertex1.toPointF());
}
break;
default:
found = false;
}
// qDebug()<<caseType;
// qDebug()<<line;
return found;
contourLinesCache.clear();
contourLinesCachedForChecksum=-1;
}
int JKQTPContour::compare2level(const QVector3D &vertex, double level)
{
if (vertex.z() > level)
return 1;
if (vertex.z() < level)
return -1;
return 0;
}
void JKQTPContour::calcContourLines(QList<QVector<QLineF> > &ContourLines)
void JKQTPContourPlot::calcContourLines(QList<QVector<QLineF> > &ContourLines)
{
#ifdef JKQTBP_AUTOTIMER
JKQTPAutoOutputTimer jkaat(QString("JKQTPContourPlot::calcContourLines()"));
#else
qDebug()<<"JKQTPContourPlot::calcContourLines()";
#endif
double scale=1; ///< scale of the contour levels;
@ -410,20 +338,20 @@ void JKQTPContour::calcContourLines(QList<QVector<QLineF> > &ContourLines)
for ( int yp = 0; yp < (int64_t)getNy() - 1; ++yp ) { // go through image (pixel coordinates) in row major order
QVector<QVector3D> vertices(NumPositions);
for ( int xp = 0; xp < (int64_t)getNy() - 1; ++xp ) {
for ( int xp = 0; xp < (int64_t)getNx() - 1; ++xp ) {
if ( xp == 0 )
{
vertices[TopRight].setX(xp); // will be used for TopLeft later
vertices[TopRight].setY(yp);
vertices[TopRight].setZ(
value( vertices[TopRight].x(), vertices[TopRight].y())*scale
getPixelValue( vertices[TopRight].x(), vertices[TopRight].y())*scale
);
vertices[BottomRight].setX(xp);
vertices[BottomRight].setY(yp+1);
vertices[BottomRight].setZ(
value(vertices[BottomRight].x(), vertices[BottomRight].y())*scale
getPixelValue(vertices[BottomRight].x(), vertices[BottomRight].y())*scale
);
}
@ -433,13 +361,13 @@ void JKQTPContour::calcContourLines(QList<QVector<QLineF> > &ContourLines)
vertices[TopRight].setX(xp + 1);
vertices[TopRight].setY(yp); // <----
vertices[TopRight].setZ(
value(vertices[TopRight].x(), vertices[TopRight].y())*scale
getPixelValue(vertices[TopRight].x(), vertices[TopRight].y())*scale
);
vertices[BottomRight].setX(xp + 1);
vertices[BottomRight].setY(yp + 1);
vertices[BottomRight].setZ(
value(vertices[BottomRight].x(), vertices[BottomRight].y())*scale
getPixelValue(vertices[BottomRight].x(), vertices[BottomRight].y())*scale
);
double zMin = vertices[TopLeft].z();
@ -495,25 +423,49 @@ void JKQTPContour::calcContourLines(QList<QVector<QLineF> > &ContourLines)
}
}
QPointF JKQTPContour::interpolatePoint(const QVector3D &point1, const QVector3D &point2,double level)
JKQTPColumnContourPlot::JKQTPColumnContourPlot(JKQTBasePlotter *parent):
JKQTPContourPlot(parent)
{
const double h1 = point1.z() - level; // height above contour level
const double h2 = point2.z() - level;
// // check if h1 or h2 is zero
// Division by zero is not possible (the intersect function is not called if h2-h1 is zero, !)
// if(h2-h1==0||h1==0||h2==0) {
// qDebug()<<h1<<h2;
// qDebug()<<"interpolate p1="<<point1<<", p2="<<point2<<" level="<<level;
// }
const double x = (h2 * point1.x() - h1 * point2.x()) / (h2 - h1); // linear interpolation in x.direction (independent of y)
const double y = (h2 * point1.y() - h1 * point2.y()) / (h2 - h1);
// const double alpha=(level-point1.z())/(point2.z()-point1.z());
// const double x=point1.x()+alpha*(point2.x()-point1.x());
// const double y=point1.y()+alpha*(point2.y()-point1.y());
return QPointF(x, y);
this->imageColumn=imageColumn;
this->datatype=JKQTPMathImageBase::DoubleArray;
}
JKQTPColumnContourPlot::JKQTPColumnContourPlot(JKQTPlotter *parent):
JKQTPColumnContourPlot(parent->getPlotter())
{
}
void JKQTPColumnContourPlot::setImageColumn(int __value)
{
this->imageColumn = __value;
if (parent && __value>=0 && parent->getDatastore()) {
setNx(parent->getDatastore()->getColumnImageWidth(__value));
setNy(parent->getDatastore()->getColumnImageHeight(__value));
}
}
int JKQTPColumnContourPlot::getImageColumn() const
{
return this->imageColumn;
}
bool JKQTPColumnContourPlot::usesColumn(int c) const
{
return (c==imageColumn);
}
void JKQTPColumnContourPlot::ensureImageData()
{
if (this->Nx==0 || imageColumn<0 || !parent->getDatastore()->getColumnPointer(imageColumn,0)) {
this->Ny=0;
this->data=nullptr;
this->datatype=JKQTPMathImageBase::DoubleArray;
} else {
this->datatype=JKQTPMathImageBase::DoubleArray;
this->data=parent->getDatastore()->getColumnPointer(imageColumn,0);
this->Ny=parent->getDatastore()->getRows(imageColumn)/this->Nx;
}
}

View File

@ -25,6 +25,7 @@
#include <QString>
#include <QPainter>
#include <QImage>
#include <QVector3D>
#include <QIcon>
#include "jkqtplotter/jkqtpgraphsscatter.h"
#include "jkqtcommon/jkqtptools.h"
@ -38,33 +39,54 @@
/*! \brief class for a contour plot
* \ingroup jkqtplotter_imagelots_contour
* calculates the contour of a given image using the CONREC algorithm
* <a href="http://paulbourke.net/papers/conrec/">http://paulbourke.net/papers/conrec/</a>
* The implementation for Qt is adapted from Qwt
* <a href="http://qwt.sourceforge.net/">http://qwt.sourceforge.net/</a>
*
* The contour lines are calculated only once and then redrawn to save plotting time.
* Make sure you add a new graph when your data changes. The contour levels can be defined in
* contourLevels, each elemt in the list represents a contour plane. You can also create contour
* levels with createContourLevels(). The levels are linearly spaced between the maximum and minimum
* value in your data. For logarithmic data, use createContourLevelsLog() to create contour levels
* with logarithmic spacing.
* This class calculates the contour plot for a given image \f$ f(x,y) \f$ , i.e. it
* finds the iso lines/polygons, connecting all neighboring points \f$ \{(x,y)|f(x,y)\equiv L_i\} \f$
* that equal a given set of contour levels \f$ \{L_i\} \f$ .
*
* \author Sebastian Isbaner, 2013-2014
* For its calculations, this class implements the CONREC algorithm
* (see <a href="http://paulbourke.net/papers/conrec/">http://paulbourke.net/papers/conrec/</a>).
*
* In order to use this class, you first have to set an image column with the data for this plot and then
* define several contour levels for which to plot the contour lines. See \ref JKQTPlotterContourPlot for a
* detailed example!
*
* \note Although this class is derived from JKQTPColumnMathImage, which supports a modifier to the data,
* (see JKQTPColumnMathImage::modifierColumn), these features do not make sense for a contour plot
* and are not used here. The access functions are hidden in this class, but may be accessible
* via a down-cast! Still they do not have any effect on the plotted graph!
*
* \see See \ref JKQTPlotterContourPlot for a detailed example.
* See https://en.wikipedia.org/wiki/Contour_line for details on Contour Lines and Plots.
* The implementation for Qt is adapted from Qwt: <a href="http://qwt.sourceforge.net/">http://qwt.sourceforge.net/</a>
*
* \author Sebastian Isbaner (2013-2014) & Jan Krieger (2019)
*
* \image html JKQTPContour.png
*
* \image html jkqtplotter_simpletest_contourplot.png
*
* \note This class uses a caching strategy to determine whether contour lines need to be recalculated (which is time-consuming):
* Whenever contours have been calculated, these contours are stored in the member contourLinesCache and can then be used for
* redrawing. In addition the checksum of the data column is stored in contourLinesCachedForChecksum. On every redraw,
* the checksum is recalculated and compared to the value in contourLinesCachedForChecksum. If it matches, no recalculation
* is necessary. If it doesn't match, the contours are recalculated. In addition several methods that change certain
* properties of the plot will force a recalculation. Finally you can call clearCachedContours() to force a recalculation!
*/
class JKQTP_LIB_EXPORT JKQTPContour: public JKQTPMathImage, public JKQTPGraphLineStyleMixin {
class JKQTP_LIB_EXPORT JKQTPContourPlot: public JKQTPMathImage, public JKQTPGraphLineStyleMixin {
Q_OBJECT
public:
/** \brief options of how the colors for the contours are chosen (note that all images in the documentation show the same graph, just with different coloring modes!)*/
enum ContourColoringMode {
SingleColorContours, /*!< \brief each contour line has the same color \image html jkqtplotter_simpletest_contourplot_SingleColorContours.png */
ColorContoursFromPaletteByValue, /*!< \brief the color for each contour line is determined by the current color palette, image range and the value associated with each contour line \image html jkqtplotter_simpletest_contourplot_ColorContoursFromPaletteByValue.png */
ColorContoursFromPalette, /*!< \brief the color for each contour line is chosen from the current color palette, distributing the contour lines evenly over the palette, wirhout any connection to the value associated with each contour line \image html jkqtplotter_simpletest_contourplot_ColorContoursFromPalette.png */
};
/** \brief class constructor */
JKQTPContour(JKQTBasePlotter* parent=nullptr);
JKQTPContourPlot(JKQTBasePlotter* parent=nullptr);
/** \brief class constructor */
JKQTPContour(double x, double y, double width, double height, void* data, int Nx, int Ny, JKQTPMathImageColorPalette palette=JKQTPMathImageGRAY, DataType datatype = JKQTPMathImageBase::DoubleArray, JKQTBasePlotter* parent=nullptr);
/** \brief class constructor */
JKQTPContour(JKQTPlotter* parent);
/** \brief class constructor */
JKQTPContour(double x, double y, double width, double height, void* data, int Nx, int Ny, JKQTPMathImageColorPalette palette, DataType datatype , JKQTPlotter* parent);
JKQTPContourPlot(JKQTPlotter* parent);
/** \brief plots the graph to the plotter object specified as parent */
virtual void draw(JKQTPEnhancedPainter& painter) override;
@ -73,61 +95,114 @@ class JKQTP_LIB_EXPORT JKQTPContour: public JKQTPMathImage, public JKQTPGraphLin
/** \brief creates at least nLevels contour levels with logarithmic spacing. FIXME: Has not been tested yet */
void createContourLevelsLog(int nLevels=3,int m=2);
/*! \copydoc ignoreOnPlane
\see see ignoreOnPlane for details */
/*! \copydoc ignoreOnPlane */
void setIgnoreOnPlane(bool __value);
/*! \copydoc ignoreOnPlane
\see see ignoreOnPlane for details */
/*! \copydoc ignoreOnPlane */
bool getIgnoreOnPlane() const;
/*! \copydoc numberOfLevels
\see see numberOfLevels for details */
void setNumberOfLevels(int __value);
/*! \copydoc numberOfLevels
\see see numberOfLevels for details */
/*! \copydoc numberOfLevels */
int getNumberOfLevels() const;
/*! \copydoc colorFromPalette
\see see colorFromPalette for details */
void setColorFromPalette(bool __value);
/*! \copydoc colorFromPalette
\see see colorFromPalette for details */
bool getColorFromPalette() const;
/*! \copydoc contourLevels
\see see contourLevels for details */
void setContourLevels(const QList<double> & __value);
/*! \copydoc contourLevels
\see see contourLevels for details */
QList<double> getContourLevels() const;
/*! \copydoc relativeLevels
\see see relativeLevels for details */
/*! \copydoc contourColoringMode */
void setContourColoringMode(ContourColoringMode __value);
/*! \copydoc contourColoringMode */
ContourColoringMode getContourColoringMode() const;
/** \brief sets new contour levels from a container \a levels
*
* \tparam TConatiner any standard container with c++ standard iterators. The contents needs to be convertible to double via jkqtp_todouble()
* \param levels the container to copy from
*/
template <class TContainer>
void setContourLevels(const TContainer &levels);
/** \brief sets new contour levels from a container \a levels
*
* \tparam TConatiner any standard container with c++ standard iterators. The contents needs to be convertible to double via jkqtp_todouble()
* \tparam TColorContainer any standard container with c++ standard iterators. The contents needs to be convertible to QColor
* \param levels the container to copy from
* \param colors a container with QColors inside, which define the line colors
*/
template <class TContainer, class TColorContainer>
void setContourLevels(const TContainer &levels, const TColorContainer& colors);
/*! \copydoc contourLevels */
QVector<double> getContourLevels() const;
/*! \copydoc relativeLevels */
void setRelativeLevels(bool __value);
/*! \copydoc relativeLevels
\see see relativeLevels for details */
/*! \copydoc relativeLevels */
bool getRelativeLevels() const;
/** \brief convenience function to work with JKQTPDatastore */
void setImageColumn(size_t columnID);
/** \brief add another level for which to draw a contour */
void addContourLevel(double &level);
/** \brief add another level for which to draw a contour
* \see setOverrideColor(), addContourLevel(), hasOverrideColor(), removeOverrideColor(), getOverrideColor()
*/
void addContourLevel(double level);
/** \brief add another level for which to draw a contour and define an override color for this line
*
* \image html jkqtplotter_simpletest_contourplot_overridecolors.png
*
* \see setOverrideColor(), addContourLevel(), hasOverrideColor(), removeOverrideColor(), getOverrideColor()
*/
void addContourLevel(double level, QColor overrideColor);
/** \brief define an override color for the contour line at the given level
*
* \image html jkqtplotter_simpletest_contourplot_overridecolors.png
*
* \see setOverrideColor(), addContourLevel(), hasOverrideColor(), removeOverrideColor(), getOverrideColor()
*/
void setOverrideColor(double level, QColor overrideColor);
/** \brief returns the override color for contour level \a level
* \see setOverrideColor(), addContourLevel(), hasOverrideColor(), removeOverrideColor(), getOverrideColor()
*/
QColor getOverrideColor(int level) const;
/** \brief returns the override color for contour level \a level
* \see setOverrideColor(), addContourLevel(), hasOverrideColor(), removeOverrideColor(), getOverrideColor()
*/
bool hasOverrideColor(int level) const;
/** \brief removes the override color for contour level \a level
* \see setOverrideColor(), addContourLevel(), hasOverrideColor(), removeOverrideColor(), getOverrideColor()
*/
void removeOverrideColor(int level) ;
/** \brief clear all currently defined contour levels */
void clearContourLevel();
/** \brief overrides the caching strategy and forces a recalculation of the contours */
void clearCachedContours();
protected:
/** \brief if true, vertices that all lie on the contour plane will be ignored*/
bool ignoreOnPlane;
/** \brief if true, the colors of the \a palette are used for the contour lines */
bool colorFromPalette;
/** \brief the number of contour levels. Is only used if contourLevels is empty*/
int numberOfLevels;
/** \brief defines how the colors for the contours are chosen */
ContourColoringMode contourColoringMode;
/** \brief the list of contour levels */
QList<double> contourLevels;
QVector<double> contourLevels;
/** \brief override contour level colors for specific levels, when \c contourColoringMode==SingleColorContours */
QMap<double,QColor> contourOverrideColor;
/** \brief indicates wether the contour levels are absolute values or relative to the maximum (max-min) */
bool relativeLevels;
virtual void ensureImageData() override;
// hide unusable members (this class does not provide data modifier functionality
using JKQTPMathImage::setDataModifier;
using JKQTPMathImage::getDataModifier;
using JKQTPMathImage::setDatatypeModifier;
using JKQTPMathImage::getDatatypeModifier;
using JKQTPMathImage::setModifierMode;
using JKQTPMathImage::getModifierMode;
using JKQTPMathImage::getModifierMinMax;
using JKQTPMathImage::getDataModifierAsDoubleVector;
using JKQTPMathImage::setColorBarModifiedWidth;
using JKQTPMathImage::getColorBarModifiedWidth;
using JKQTPMathImage::getModifierColorBarTopAxis;
using JKQTPMathImage::getModifierColorBarRightAxis;
using JKQTPMathImage::setModifierMin;
using JKQTPMathImage::getModifierMin;
using JKQTPMathImage::setAutoModifierRange;
using JKQTPMathImage::getAutoModifierRange;
using JKQTPMathImage::setModifierMax;
using JKQTPMathImage::getModifierMax;
using JKQTPMathImage::getModifierValueAt;
using JKQTPMathImage::getModifierSampleSize;
using JKQTPMathImage::getModifierPixelValue;
private:
double value(int xIdx, int yIdx);
/// gives the intersection line of a plane defined by three vertices with a contour level in the x-y plane of heigth level
bool intersect(QLineF &line, const QVector3D &vertex1,const QVector3D &vertex2,const QVector3D &vertex3,double level);
/** \brief gives the intersection line of a plane defined by three vertices with a contour level in the x-y plane of heigth level */
inline bool intersect(QLineF &line, const QVector3D &vertex1,const QVector3D &vertex2,const QVector3D &vertex3,double level) const;
/**
* @brief interpolatePoint linear interpolation of a line to the x-y plane using the z-value relative to level
* @param point1 start point of the line
@ -135,20 +210,32 @@ class JKQTP_LIB_EXPORT JKQTPContour: public JKQTPMathImage, public JKQTPGraphLin
* @param level the heigth for the interpolation (this z-value is projected onto the xy-plane)
* @return the interpolated point in the x-y plane
*/
QPointF interpolatePoint(const QVector3D &point1, const QVector3D &point2,double level);
inline QPointF interpolatePoint(const QVector3D &point1, const QVector3D &point2,double level) const ;
/**
* @brief compare2level checks if the vertex lies above, under or on the contour plane level
* @param vertex
* @param level contour plane
* @return above (1), on the plane (0), below (-1);
*/
int compare2level(const QVector3D &vertex, double level);
/**
* @brief calcContourLines calculates the contour lines using the CONREC algorithm
*/
inline int compare2level(const QVector3D &vertex, double level) const ;
/** \brief calcContourLines calculates the contour lines using the CONREC algorithm */
void calcContourLines(QList<QVector<QLineF > > &ContourLines);
/// the contour lines as vector of single lines (one for each triangle). the list index refers to the contour level.
QList<QVector<QLineF > > contourLines; // contour levels, squares on grid, line
/** \brief For Caching: the contour lines as vector of single lines (one for each triangle). the list index refers to the contour level.
* \internal
*
* This property is used to store the last result of the contour line calculation. This is done, because
* calculating contour lines is rather expensive. In order to determine the need for a recalculation,
* the data in the column is converted to a checksum, which can be compared to the sum value stored in
* contourLinesCachedForChecksum.
*
* \see contourLinesCachedForChecksum
*/
QList<QVector<QPolygonF > > contourLinesCache; // contour levels, squares on grid, line
/** \brief if (>=0) checksum of the column for which contours were cached in contourLinesCache
* \internal
* \see contourLinesCache
*/
int64_t contourLinesCachedForChecksum;
};
@ -156,5 +243,219 @@ class JKQTP_LIB_EXPORT JKQTPContour: public JKQTPMathImage, public JKQTPGraphLin
/** \brief class for a contour plots (same as JKQTPContourPlot) of images stored in a JKQTPDatastore column
* \ingroup jkqtplotter_imagelots_contour
*
* \copydetails JKQTPContourPlot
*/
class JKQTP_LIB_EXPORT JKQTPColumnContourPlot: public JKQTPContourPlot {
Q_OBJECT
public:
/** \brief class constructor */
JKQTPColumnContourPlot(JKQTBasePlotter* parent=nullptr);
/** \brief class constructor */
JKQTPColumnContourPlot(JKQTPlotter* parent);
/*! \copydoc imageColumn */
virtual void setImageColumn(int __value);
/*! \copydoc imageColumn */
int getImageColumn() const;
/** \copydoc JKQTPGraph::usesColumn() */
virtual bool usesColumn(int c) const override;
protected:
/** \brief column containing the displayed image */
int imageColumn;
virtual void ensureImageData() override;
};
////////////////////////////////////////////////////////////////////////////////////////////////
template<class TContainer, class TColorContainer>
void JKQTPContourPlot::setContourLevels(const TContainer &levels, const TColorContainer &colors)
{
contourLevels.clear();
contourOverrideColor.clear();
auto itc=colors.begin();
for (auto it=levels.begin(); it!=levels.end(); ++it) {
const double v=jkqtp_todouble(*it);
contourLevels<<v;
contourOverrideColor[v]=*itc;
++itc;
}
qSort(contourLevels);
clearCachedContours();
}
////////////////////////////////////////////////////////////////////////////////////////////////
template<class TContainer>
void JKQTPContourPlot::setContourLevels(const TContainer &levels)
{
contourLevels.clear();
contourOverrideColor.clear();
for (auto it=levels.begin(); it!=levels.end(); ++it) {
contourLevels<<jkqtp_todouble(*it);
}
qSort(contourLevels);
clearCachedContours();
}
////////////////////////////////////////////////////////////////////////////////////////////////
bool JKQTPContourPlot::intersect(QLineF &line, const QVector3D &vertex1, const QVector3D &vertex2, const QVector3D &vertex3, double level) const
{
bool found = true;
// Are the vertices below (-1), on (0) or above (1) the plane ?
const int eq1 = compare2level(vertex1,level);
const int eq2 = compare2level(vertex2,level);
const int eq3 = compare2level(vertex3,level);
/*
(a) All the vertices lie below the contour level.
(b) Two vertices lie below and one on the contour level.
(c) Two vertices lie below and one above the contour level.
(d) One vertex lies below and two on the contour level.
(e) One vertex lies below, one on and one above the contour level.
(f) One vertex lies below and two above the contour level.
(g) Three vertices lie on the contour level.
(h) Two vertices lie on and one above the contour level.
(i) One vertex lies on and two above the contour level.
(j) All the vertices lie above the contour level.
*/
static const int caseLUT[3][3][3] =
{
// jump table to avoid nested case statements
{ { 0, 0, 8 }, { 0, 2, 5 }, { 7, 6, 9 } },
{ { 0, 3, 4 }, { 1, 10, 1 }, { 4, 3, 0 } },
{ { 9, 6, 7 }, { 5, 2, 0 }, { 8, 0, 0 } }
};
const int caseType = caseLUT[eq1+1][eq2+1][eq3+1];
switch (caseType)
{
case 1:
// d(0,0,-1), h(0,0,1)
line.setP1(vertex1.toPointF());
line.setP2(vertex2.toPointF());
break;
case 2:
// d(-1,0,0), h(1,0,0)
line.setP1(vertex2.toPointF());
line.setP2(vertex3.toPointF());
break;
case 3:
// d(0,-1,0), h(0,1,0)
line.setP1(vertex3.toPointF());
line.setP2(vertex1.toPointF());
break;
case 4:
// e(0,-1,1), e(0,1,-1)
line.setP1(vertex1.toPointF());
line.setP2(interpolatePoint(vertex2, vertex3, level));
break;
case 5:
// e(-1,0,1), e(1,0,-1)
line.setP1(vertex2.toPointF());
line.setP2(interpolatePoint(vertex3, vertex1, level));
break;
case 6:
// e(-1,1,0), e(1,0,-1)
line.setP1(vertex3.toPointF());
line.setP2(interpolatePoint(vertex1, vertex2, level));
break;
case 7:
// c(-1,1,-1), f(1,1,-1)
line.setP1(interpolatePoint(vertex1, vertex2, level));
line.setP2(interpolatePoint(vertex2, vertex3, level));
break;
case 8:
// c(-1,-1,1), f(1,1,-1)
line.setP1(interpolatePoint(vertex2, vertex3, level));
line.setP2(interpolatePoint(vertex3, vertex1, level));
break;
case 9:
// f(-1,1,1), c(1,-1,-1)
line.setP1(interpolatePoint(vertex3, vertex1, level));
line.setP2(interpolatePoint(vertex1, vertex2, level));
break;
case 10:
// g(0,0,0)
// The CONREC algorithm has no satisfying solution for
// what to do, when all vertices are on the plane.
if ( ignoreOnPlane )
found = false;
else
{
line.setP1(vertex3.toPointF());
line.setP2(vertex1.toPointF());
}
break;
default:
found = false;
}
// qDebug()<<caseType;
// qDebug()<<line;
return found;
}
////////////////////////////////////////////////////////////////////////////////////////////////
QPointF JKQTPContourPlot::interpolatePoint(const QVector3D &point1, const QVector3D &point2, double level) const
{
const double h1 = point1.z() - level; // height above contour level
const double h2 = point2.z() - level;
// // check if h1 or h2 is zero
// Division by zero is not possible (the intersect function is not called if h2-h1 is zero, !)
// if(h2-h1==0||h1==0||h2==0) {
// qDebug()<<h1<<h2;
// qDebug()<<"interpolate p1="<<point1<<", p2="<<point2<<" level="<<level;
// }
const double x = (h2 * point1.x() - h1 * point2.x()) / (h2 - h1); // linear interpolation in x.direction (independent of y)
const double y = (h2 * point1.y() - h1 * point2.y()) / (h2 - h1);
// const double alpha=(level-point1.z())/(point2.z()-point1.z());
// const double x=point1.x()+alpha*(point2.x()-point1.x());
// const double y=point1.y()+alpha*(point2.y()-point1.y());
return QPointF(x, y);
}
////////////////////////////////////////////////////////////////////////////////////////////////
int JKQTPContourPlot::compare2level(const QVector3D &vertex, double level) const {
if (vertex.z() > level)
return 1;
if (vertex.z() < level)
return -1;
return 0;
}
#endif // JKQTPGRAPHSCONTOUR_H

View File

@ -111,11 +111,9 @@ class JKQTP_LIB_EXPORT JKQTPXFunctionLineGraph: public JKQTPGraph, public JKQTPG
/*! \brief set color, fill color and error color at the same time */
void setColor(QColor c);
/*! \copydoc drawLine
\see see drawLine for details */
/*! \copydoc drawLine */
void setDrawLine(bool __value);
/*! \copydoc drawLine
\see see drawLine for details */
/*! \copydoc drawLine */
bool getDrawLine() const;
/** \brief sets the property plotFunction ( \copybrief plotFunction ) to the specified \a __value.
@ -138,16 +136,14 @@ class JKQTP_LIB_EXPORT JKQTPXFunctionLineGraph: public JKQTPGraph, public JKQTPG
* \details Description of the parameter plotFunction is: <BLOCKQUOTE>\copydoc plotFunction </BLOCKQUOTE>
* \see plotFunction for more information */
virtual void setPlotFunctionFunctor (const jkqtpSimplePlotFunctionType & __value);
/*! \brief returns the property plotFunction ( \copybrief plotFunction ). \see plotFunction for more information */ \
/*! \copydoc plotFunction */ \
virtual jkqtpPlotFunctionType getPlotFunctionFunctor () const;
/*! \brief returns the property simplePlotFunction ( \copybrief simplePlotFunction ). \see simplePlotFunction for more information */ \
/*! \copydoc simplePlotFunction */ \
virtual jkqtpSimplePlotFunctionType getSimplePlotFunction () const;
/*! \copydoc params
\see see params for details */
/*! \copydoc params */
virtual void setParams(void* __value);
/*! \copydoc params
\see see params for details */
/*! \copydoc params */
void* getParams() const;
/** \brief sets the params as a pointer to an internal COPY of the given vector (not the data of the vector, as then the size would be unknown!!!) */
virtual void setParams(const QVector<double>& params);
@ -168,53 +164,37 @@ class JKQTP_LIB_EXPORT JKQTPXFunctionLineGraph: public JKQTPGraph, public JKQTPG
QVector<double> getInternalParams() const;
/** \brief returns the currently set internal parameter vector */
QVector<double> getInternalErrorParams() const;
/*! \copydoc minSamples
\see see minSamples for details */
/*! \copydoc minSamples */
void setMinSamples(const unsigned int & __value);
/*! \copydoc minSamples
\see see minSamples for details */
/*! \copydoc minSamples */
unsigned int getMinSamples() const;
/*! \copydoc maxRefinementDegree
\see see maxRefinementDegree for details */
/*! \copydoc maxRefinementDegree */
void setMaxRefinementDegree(const unsigned int & __value);
/*! \copydoc maxRefinementDegree
\see see maxRefinementDegree for details */
/*! \copydoc maxRefinementDegree */
unsigned int getMaxRefinementDegree() const;
/*! \copydoc slopeTolerance
\see see slopeTolerance for details */
/*! \copydoc slopeTolerance */
void setSlopeTolerance(double __value);
/*! \copydoc slopeTolerance
\see see slopeTolerance for details */
/*! \copydoc slopeTolerance */
double getSlopeTolerance() const;
/*! \copydoc minPixelPerSample
\see see minPixelPerSample for details */
/*! \copydoc minPixelPerSample */
void setMinPixelPerSample(double __value);
/*! \copydoc minPixelPerSample
\see see minPixelPerSample for details */
/*! \copydoc minPixelPerSample */
double getMinPixelPerSample() const;
/*! \copydoc plotRefinement
\see see plotRefinement for details */
/*! \copydoc plotRefinement */
void setPlotRefinement(bool __value);
/*! \copydoc plotRefinement
\see see plotRefinement for details */
/*! \copydoc plotRefinement */
bool getPlotRefinement() const;
/*! \copydoc displaySamplePoints
\see see displaySamplePoints for details */
/*! \copydoc displaySamplePoints */
void setDisplaySamplePoints(bool __value);
/*! \copydoc displaySamplePoints
\see see displaySamplePoints for details */
/*! \copydoc displaySamplePoints */
bool getDisplaySamplePoints() const;
/*! \copydoc drawErrorPolygons
\see see drawErrorPolygons for details */
/*! \copydoc drawErrorPolygons */
void setDrawErrorPolygons(bool __value);
/*! \copydoc drawErrorPolygons
\see see drawErrorPolygons for details */
/*! \copydoc drawErrorPolygons */
bool getDrawErrorPolygons() const;
/*! \copydoc drawErrorLines
\see see drawErrorLines for details */
/*! \copydoc drawErrorLines */
void setDrawErrorLines(bool __value);
/*! \copydoc drawErrorLines
\see see drawErrorLines for details */
/*! \copydoc drawErrorLines */
bool getDrawErrorLines() const;
/** \brief sets the property errorPlotFunction ( \copybrief errorPlotFunction ) to the specified \a __value.
*
@ -226,7 +206,7 @@ class JKQTP_LIB_EXPORT JKQTPXFunctionLineGraph: public JKQTPGraph, public JKQTPG
* \details Description of the parameter errorPlotFunction is: <BLOCKQUOTE>\copydoc errorPlotFunction </BLOCKQUOTE>
* \see errorPlotFunction for more information */
virtual void setErrorPlotFunction (const jkqtpPlotFunctionType & __value);
/*! \brief returns the property errorPlotFunction ( \copybrief errorPlotFunction ). \see errorPlotFunction for more information */ \
/*! \copydoc errorPlotFunction */ \
virtual jkqtpPlotFunctionType getErrorPlotFunction () const;
/** \brief sets the property errorPlotFunction ( \copybrief errorPlotFunction ) to the specified \a __value.
*
@ -238,94 +218,74 @@ class JKQTP_LIB_EXPORT JKQTPXFunctionLineGraph: public JKQTPGraph, public JKQTPG
* \details Description of the parameter errorPlotFunction is: <BLOCKQUOTE>\copydoc errorPlotFunction </BLOCKQUOTE>
* \see errorPlotFunction for more information */
virtual void setErrorPlotFunction (const jkqtpSimplePlotFunctionType & __value);
/*! \brief returns the property errorSimplePlotFunction ( \copybrief errorSimplePlotFunction ). \see errorSimplePlotFunction for more information */ \
/*! \copydoc errorSimplePlotFunction */ \
virtual jkqtpSimplePlotFunctionType getErrorSimplePlotFunction () const;
/*! \copydoc errorParams
\see see errorParams for details */
/*! \copydoc errorParams */
virtual void setErrorParams(void* __value);
/*! \copydoc errorParams
\see see errorParams for details */
/*! \copydoc errorParams */
void *getErrorParams() const;
/** \brief sets the error params as a pointer to an internal COPY of the given vector (not the data of the vector, as then the size would be unknown!!!) */
void setErrorParams(const QVector<double>& errorParams);
/*! \copydoc parameterColumn
\see see parameterColumn for details */
/*! \copydoc parameterColumn */
void setParameterColumn(int __value);
/*! \copydoc parameterColumn
\see see parameterColumn for details */
/*! \copydoc parameterColumn */
int getParameterColumn() const;
/*! \brief sets the property parameterColumn ( \copybrief parameterColumn ) to the specified \a __value, where __value is static_cast'ed from size_t to int.
\details Description of the parameter parameterColumn is: <BLOCKQUOTE>\copydoc parameterColumn </BLOCKQUOTE>
\see parameterColumn for more information */
/*! \copydoc parameterColumn */
void setParameterColumn (size_t __value);
/*! \copydoc errorParameterColumn
\see see errorParameterColumn for details */
/*! \copydoc errorParameterColumn */
void setErrorParameterColumn(int __value);
/*! \copydoc errorParameterColumn
\see see errorParameterColumn for details */
/*! \copydoc errorParameterColumn */
int getErrorParameterColumn() const;
/*! \brief sets the property errorParameterColumn ( \copybrief errorParameterColumn ) to the specified \a __value, where __value is static_cast'ed from size_t to int.
\details Description of the parameter errorParameterColumn is: <BLOCKQUOTE>\copydoc errorParameterColumn </BLOCKQUOTE>
\see errorParameterColumn for more information */
/*! \copydoc errorParameterColumn */
void setErrorParameterColumn (size_t __value);
/*! \copydoc errorColor
\see see errorColor for details */
/*! \copydoc errorColor */
inline virtual void setErrorLineColor(const QColor & __value)
{
this->errorColor = __value;
}
/*! \copydoc errorColor
\see see errorColor for details */
/*! \copydoc errorColor */
inline virtual QColor getErrorLineColor() const
{
return this->errorColor;
}
/*! \copydoc errorFillColor
\see see errorFillColor for details */
/*! \copydoc errorFillColor */
inline virtual void setErrorFillColor(const QColor & __value)
{
this->errorFillColor = __value;
}
/*! \copydoc errorFillColor
\see see errorFillColor for details */
/*! \copydoc errorFillColor */
inline virtual QColor getErrorFillColor() const
{
return this->errorFillColor;
}
/*! \copydoc errorFillStyle
\see see errorFillStyle for details */
/*! \copydoc errorFillStyle */
inline virtual void setErrorFillStyle(Qt::BrushStyle __value)
{
this->errorFillStyle = __value;
}
/*! \copydoc errorFillStyle
\see see errorFillStyle for details */
/*! \copydoc errorFillStyle */
inline virtual Qt::BrushStyle getErrorFillStyle() const
{
return this->errorFillStyle;
}
/*! \copydoc errorStyle
\see see errorStyle for details */
/*! \copydoc errorStyle */
inline virtual void setErrorLineStyle(Qt::PenStyle __value)
{
this->errorStyle = __value;
}
/*! \copydoc errorStyle
\see see errorStyle for details */
/*! \copydoc errorStyle */
inline virtual Qt::PenStyle getErrorLineStyle() const
{
return this->errorStyle;
}
/*! \copydoc errorLineWidth
\see see errorLineWidth for details */
/*! \copydoc errorLineWidth */
inline virtual void setErrorLineWidth(double __value)
{
this->errorLineWidth = __value;
}
/*! \copydoc errorLineWidth
\see see errorLineWidth for details */
/*! \copydoc errorLineWidth */
inline virtual double getErrorLineWidth() const
{
return this->errorLineWidth;

View File

@ -162,22 +162,16 @@ class JKQTP_LIB_EXPORT JKQTPFilledVerticalRangeGraph: public JKQTPXYGraph, publi
/** \brief returns the color to be used for the key label */
virtual QColor getKeyLabelColor() const override;
/*! \copydoc yColumn2
\see see yColumn2 for details */
/*! \copydoc yColumn2 */
void setYColumn2(int __value);
/*! \copydoc yColumn2
\see see yColumn2 for details */
/*! \copydoc yColumn2 */
int getYColumn2() const;
/*! \brief sets the property yColumn2 ( \copybrief yColumn2 ) to the specified \a __value, where __value is static_cast'ed from size_t to int.
\details Description of the parameter yColumn2 is: <BLOCKQUOTE>\copydoc yColumn2 </BLOCKQUOTE>
\see yColumn2 for more information */
/*! \copydoc yColumn2 */
void setYColumn2 (size_t __value);
/*! \copydoc drawLine
\see see drawLine for details */
/*! \copydoc drawLine */
void setDrawLine(bool __value);
/*! \copydoc drawLine
\see see drawLine for details */
/*! \copydoc drawLine */
bool getDrawLine() const;

View File

@ -181,17 +181,13 @@ class JKQTP_LIB_EXPORT JKQTPGeoSymbol: public JKQTPPlotObject, public JKQTPGraph
/*! set the symbol color and symbol fill color */
virtual void setColor(QColor c);
/*! \copydoc x
\see see x for details */
/*! \copydoc x */
void setX(double __value);
/*! \copydoc x
\see see x for details */
/*! \copydoc x */
double getX() const;
/*! \copydoc y
\see see y for details */
/*! \copydoc y */
void setY(double __value);
/*! \copydoc y
\see see y for details */
/*! \copydoc y */
double getY() const;
/** \copydoc JKQTPGraph::getXMinMax() */
@ -261,23 +257,17 @@ class JKQTP_LIB_EXPORT JKQTPGeoText: public JKQTPPlotObject, public JKQTPGraphTe
*/
JKQTPGeoText(JKQTPlotter* parent, double x, double y, const QString& text);
/*! \copydoc text
\see see text for details */
/*! \copydoc text */
void setText(const QString & __value);
/*! \copydoc text
\see see text for details */
/*! \copydoc text */
QString getText() const;
/*! \copydoc x
\see see x for details */
/*! \copydoc x */
void setX(double __value);
/*! \copydoc x
\see see x for details */
/*! \copydoc x */
double getX() const;
/*! \copydoc y
\see see y for details */
/*! \copydoc y */
void setY(double __value);
/*! \copydoc y
\see see y for details */
/*! \copydoc y */
double getY() const;
/** \brief set line and fill color */
@ -373,29 +363,21 @@ class JKQTP_LIB_EXPORT JKQTPGeoLine: public JKQTPGeoBaseLine {
/** \brief plots the graph to the plotter object specified as parent */
virtual void draw(JKQTPEnhancedPainter& painter) override;
/*! \copydoc x1
\see see x1 for details */
/*! \copydoc x1 */
void setX1(double __value);
/*! \copydoc x1
\see see x1 for details */
/*! \copydoc x1 */
double getX1() const;
/*! \copydoc y1
\see see y1 for details */
/*! \copydoc y1 */
void setY1(double __value);
/*! \copydoc y1
\see see y1 for details */
/*! \copydoc y1 */
double getY1() const;
/*! \copydoc x2
\see see x2 for details */
/*! \copydoc x2 */
void setX2(double __value);
/*! \copydoc x2
\see see x2 for details */
/*! \copydoc x2 */
double getX2() const;
/*! \copydoc y2
\see see y2 for details */
/*! \copydoc y2 */
void setY2(double __value);
/*! \copydoc y2
\see see y2 for details */
/*! \copydoc y2 */
double getY2() const;
protected:
/** \brief x-coordinate of first point of line */
@ -457,35 +439,25 @@ class JKQTP_LIB_EXPORT JKQTPGeoInfiniteLine: public JKQTPGeoBaseLine {
/** \brief plots the graph to the plotter object specified as parent */
virtual void draw(JKQTPEnhancedPainter& painter) override;
/*! \copydoc x
\see see x for details */
/*! \copydoc x */
void setX(double __value);
/*! \copydoc x
\see see x for details */
/*! \copydoc x */
double getX() const;
/*! \copydoc y
\see see y for details */
/*! \copydoc y */
void setY(double __value);
/*! \copydoc y
\see see y for details */
/*! \copydoc y */
double getY() const;
/*! \copydoc dx
\see see dx for details */
/*! \copydoc dx */
void setDx(double __value);
/*! \copydoc dx
\see see dx for details */
/*! \copydoc dx */
double getDx() const;
/*! \copydoc dy
\see see dy for details */
/*! \copydoc dy */
void setDy(double __value);
/*! \copydoc dy
\see see dy for details */
/*! \copydoc dy */
double getDy() const;
/*! \copydoc two_sided
\see see two_sided for details */
/*! \copydoc two_sided */
void setTwoSided(bool __value);
/*! \copydoc two_sided
\see see two_sided for details */
/*! \copydoc two_sided */
bool getTwoSided() const;
protected:
/** \brief x-coordinate of a point on the line */
@ -555,11 +527,9 @@ class JKQTP_LIB_EXPORT JKQTPGeoPolyLines: public JKQTPGeoBaseLine {
/** \brief plots the graph to the plotter object specified as parent */
virtual void draw(JKQTPEnhancedPainter& painter) override;
/*! \copydoc points
\see see points for details */
/*! \copydoc points */
void setPoints(const QVector<QPointF> & __value);
/*! \copydoc points
\see see points for details */
/*! \copydoc points */
QVector<QPointF> getPoints() const;
/** \brief append a point to the polygon */
@ -673,35 +643,25 @@ class JKQTP_LIB_EXPORT JKQTPGeoRectangle: public JKQTPGeoBaseFilled {
/** \brief plots the graph to the plotter object specified as parent */
virtual void draw(JKQTPEnhancedPainter& painter) override;
/*! \copydoc x
\see see x for details */
/*! \copydoc x */
void setX(double __value);
/*! \copydoc x
\see see x for details */
/*! \copydoc x */
double getX() const;
/*! \copydoc y
\see see y for details */
/*! \copydoc y */
void setY(double __value);
/*! \copydoc y
\see see y for details */
/*! \copydoc y */
double getY() const;
/*! \copydoc width
\see see width for details */
/*! \copydoc width */
void setWidth(double __value);
/*! \copydoc width
\see see width for details */
/*! \copydoc width */
double getWidth() const;
/*! \copydoc height
\see see height for details */
/*! \copydoc height */
void setHeight(double __value);
/*! \copydoc height
\see see height for details */
/*! \copydoc height */
double getHeight() const;
/*! \copydoc angle
\see see angle for details */
/*! \copydoc angle */
void setAngle(double __value);
/*! \copydoc angle
\see see angle for details */
/*! \copydoc angle */
double getAngle() const;
/** \brief set the rectangle using the bottom-left corner, as well as its width and height */
void setBottomleftrectangle(double x, double y, double width, double height);
@ -787,11 +747,9 @@ class JKQTP_LIB_EXPORT JKQTPGeoPolygon: public JKQTPGeoBaseFilled {
/** \brief plots the graph to the plotter object specified as parent */
virtual void draw(JKQTPEnhancedPainter& painter) override;
/*! \copydoc points
\see see points for details */
/*! \copydoc points */
void setPoints(const QVector<QPointF> & __value);
/*! \copydoc points
\see see points for details */
/*! \copydoc points */
QVector<QPointF> getPoints() const;
/** \brief append a point to the polygon */
@ -904,11 +862,9 @@ class JKQTP_LIB_EXPORT JKQTPGeoEllipse: public JKQTPGeoRectangle {
/** \brief plots the graph to the plotter object specified as parent */
virtual void draw(JKQTPEnhancedPainter& painter) override;
/*! \copydoc controlPoints
\see see controlPoints for details */
/*! \copydoc controlPoints */
void setControlPoints(const unsigned int & __value);
/*! \copydoc controlPoints
\see see controlPoints for details */
/*! \copydoc controlPoints */
unsigned int getControlPoints() const;
protected:
/** \brief number of steps/control points to draw the ellipse */
@ -964,53 +920,37 @@ class JKQTP_LIB_EXPORT JKQTPGeoArc: public JKQTPGeoBaseLine {
/** \brief plots the graph to the plotter object specified as parent */
virtual void draw(JKQTPEnhancedPainter& painter) override;
/*! \copydoc controlPoints
\see see controlPoints for details */
/*! \copydoc controlPoints */
void setControlPoints(const unsigned int & __value);
/*! \copydoc controlPoints
\see see controlPoints for details */
/*! \copydoc controlPoints */
unsigned int getControlPoints() const;
/*! \copydoc angleStart
\see see angleStart for details */
/*! \copydoc angleStart */
void setAngleStart(double __value);
/*! \copydoc angleStart
\see see angleStart for details */
/*! \copydoc angleStart */
double getAngleStart() const;
/*! \copydoc angleStop
\see see angleStop for details */
/*! \copydoc angleStop */
void setAngleStop(double __value);
/*! \copydoc angleStop
\see see angleStop for details */
/*! \copydoc angleStop */
double getAngleStop() const;
/*! \copydoc x
\see see x for details */
/*! \copydoc x */
void setX(double __value);
/*! \copydoc x
\see see x for details */
/*! \copydoc x */
double getX() const;
/*! \copydoc y
\see see y for details */
/*! \copydoc y */
void setY(double __value);
/*! \copydoc y
\see see y for details */
/*! \copydoc y */
double getY() const;
/*! \copydoc width
\see see width for details */
/*! \copydoc width */
void setWidth(double __value);
/*! \copydoc width
\see see width for details */
/*! \copydoc width */
double getWidth() const;
/*! \copydoc height
\see see height for details */
/*! \copydoc height */
void setHeight(double __value);
/*! \copydoc height
\see see height for details */
/*! \copydoc height */
double getHeight() const;
/*! \copydoc angle
\see see angle for details */
/*! \copydoc angle */
void setAngle(double __value);
/*! \copydoc angle
\see see angle for details */
/*! \copydoc angle */
double getAngle() const;
protected:
/** \brief x-coordinate of a center of the rectangle */
@ -1092,17 +1032,13 @@ class JKQTP_LIB_EXPORT JKQTPGeoPie: public JKQTPGeoEllipse {
/** \brief plots the graph to the plotter object specified as parent */
virtual void draw(JKQTPEnhancedPainter& painter) override;
/*! \copydoc angleStart
\see see angleStart for details */
/*! \copydoc angleStart */
void setAngleStart(double __value);
/*! \copydoc angleStart
\see see angleStart for details */
/*! \copydoc angleStart */
double getAngleStart() const;
/*! \copydoc angleStop
\see see angleStop for details */
/*! \copydoc angleStop */
void setAngleStop(double __value);
/*! \copydoc angleStop
\see see angleStop for details */
/*! \copydoc angleStop */
double getAngleStop() const;
protected:
/** \brief if we only draw an arc, this is the starting angle */

View File

@ -1252,26 +1252,7 @@ void JKQTPMathImage::getModifierMinMax(double &imin, double &imax)
}
}
double JKQTPMathImage::getValueAt(double x, double y)
{
ensureImageData();
int xx=trunc((x-this->x)/width*double(Nx));
int yy=trunc((y-this->y)/height*double(Ny));
if (xx>=0 && xx<(int64_t)Nx && yy>=0 && yy<(int64_t)Ny) {
switch(datatype) {
case JKQTPMathImageBase::DoubleArray: return (static_cast<double*>(data))[yy*Nx+xx]; break;
case JKQTPMathImageBase::FloatArray: return (static_cast<float*>(data))[yy*Nx+xx]; break;
case JKQTPMathImageBase::UInt8Array: return (static_cast<uint8_t*>(data))[yy*Nx+xx]; break;
case JKQTPMathImageBase::UInt16Array: return (static_cast<uint16_t*>(data))[yy*Nx+xx]; break;
case JKQTPMathImageBase::UInt32Array: return (static_cast<uint32_t*>(data))[yy*Nx+xx]; break;
case JKQTPMathImageBase::UInt64Array: return (static_cast<uint64_t*>(data))[yy*Nx+xx]; break;
case JKQTPMathImageBase::Int8Array: return (static_cast<int8_t*>(data))[yy*Nx+xx]; break;
case JKQTPMathImageBase::Int16Array: return (static_cast<int16_t*>(data))[yy*Nx+xx]; break;
case JKQTPMathImageBase::Int32Array: return (static_cast<int32_t*>(data))[yy*Nx+xx]; break;
case JKQTPMathImageBase::Int64Array: return (static_cast<int64_t*>(data))[yy*Nx+xx]; break;
} }
return 0.0;
}
void JKQTPMathImage::drawKeyMarker(JKQTPEnhancedPainter &painter, QRectF &rect)
{

View File

@ -64,29 +64,21 @@ class JKQTP_LIB_EXPORT JKQTPImageBase: public JKQTPGraph {
/** \brief returns the color to be used for the key label */
virtual QColor getKeyLabelColor() const override;
/*! \copydoc x
\see see x for details */
/*! \copydoc x */
void setX(double __value);
/*! \copydoc x
\see see x for details */
/*! \copydoc x */
double getX() const;
/*! \copydoc y
\see see y for details */
/*! \copydoc y */
void setY(double __value);
/*! \copydoc y
\see see y for details */
/*! \copydoc y */
double getY() const;
/*! \copydoc width
\see see width for details */
/*! \copydoc width */
void setWidth(double __value);
/*! \copydoc width
\see see width for details */
/*! \copydoc width */
double getWidth() const;
/*! \copydoc height
\see see height for details */
/*! \copydoc height */
void setHeight(double __value);
/*! \copydoc height
\see see height for details */
/*! \copydoc height */
double getHeight() const;
protected:
@ -166,47 +158,33 @@ class JKQTP_LIB_EXPORT JKQTPMathImageBase: public JKQTPImageBase {
/** \brief plots a key marker inside the specified rectangle \a rect */
virtual void drawKeyMarker(JKQTPEnhancedPainter& painter, QRectF& rect) override;
/*! \copydoc Nx
\see see Nx for details */
/*! \copydoc Nx */
void setNx(int __value);
/*! \copydoc Nx
\see see Nx for details */
/*! \copydoc Nx */
int getNx() const;
/*! \copydoc Ny
\see see Ny for details */
/*! \copydoc Ny */
void setNy(int __value);
/*! \copydoc Ny
\see see Ny for details */
/*! \copydoc Ny */
int getNy() const;
/*! \copydoc data
\see see data for details */
/*! \copydoc data */
virtual void setData(void* __value);
/*! \copydoc data
\see see data for details */
/*! \copydoc data */
virtual void *getData() const;
/*! \copydoc datatype
\see see datatype for details */
/*! \copydoc datatype */
virtual void setDatatype(DataType __value);
/*! \copydoc datatype
\see see datatype for details */
/*! \copydoc datatype */
virtual DataType getDatatype() const;
/*! \copydoc dataModifier
\see see dataModifier for details */
/*! \copydoc dataModifier */
virtual void setDataModifier(void* __value);
/*! \copydoc dataModifier
\see see dataModifier for details */
/*! \copydoc dataModifier */
virtual void *getDataModifier() const;
/*! \copydoc datatypeModifier
\see see datatypeModifier for details */
/*! \copydoc datatypeModifier */
virtual void setDatatypeModifier(DataType __value);
/*! \copydoc datatypeModifier
\see see datatypeModifier for details */
/*! \copydoc datatypeModifier */
virtual DataType getDatatypeModifier() const;
/*! \copydoc modifierMode
\see see modifierMode for details */
/*! \copydoc modifierMode */
void setModifierMode(const ModifierMode & __value);
/*! \copydoc modifierMode
\see see modifierMode for details */
/*! \copydoc modifierMode */
ModifierMode getModifierMode() const;
virtual void setDataModifier(void* data, DataType datatype);
@ -290,7 +268,7 @@ class JKQTP_LIB_EXPORT JKQTPImage: public JKQTPImageBase {
/** \brief deletes the internal image */
void clear_image();
/*! \brief returns the property image ( \copybrief image ). \details Description of the parameter image is: <BLOCKQUOTE>\copydoc image </BLOCKQUOTE>. \see image for more information */
/*! \copydoc image */
inline QImage* getImage() const { return this->image; }
protected:
/** \brief the image to be plotted. This is freed by the destructor, iff \a image_owned is set to \c true (.e.g by QImage-copy-constructors) */
@ -360,153 +338,109 @@ class JKQTP_LIB_EXPORT JKQTPMathImage: public JKQTPMathImageBase {
static QImage getPaletteKeyImage(JKQTPMathImageColorPalette palette, int width, int height) ;
/*! \copydoc palette
\see see palette for details */
/*! \copydoc palette */
void setPalette(const JKQTPMathImageColorPalette & __value);
/*! \copydoc palette
\see see palette for details */
/*! \copydoc palette */
JKQTPMathImageColorPalette getPalette() const;
/*! \copydoc rangeMinFailAction
\see see rangeMinFailAction for details */
/*! \copydoc rangeMinFailAction */
void setRangeMinFailAction(const JKQTPMathImageColorRangeFailAction & __value);
/*! \copydoc rangeMinFailAction
\see see rangeMinFailAction for details */
/*! \copydoc rangeMinFailAction */
JKQTPMathImageColorRangeFailAction getActionRangeMinFail() const;
/*! \copydoc rangeMaxFailAction
\see see rangeMaxFailAction for details */
/*! \copydoc rangeMaxFailAction */
void setRangeMaxFailAction(const JKQTPMathImageColorRangeFailAction & __value);
/*! \copydoc rangeMaxFailAction
\see see rangeMaxFailAction for details */
/*! \copydoc rangeMaxFailAction */
JKQTPMathImageColorRangeFailAction getActionRangeMaxFail() const;
/*! \copydoc rangeMinFailColor
\see see rangeMinFailColor for details */
/*! \copydoc rangeMinFailColor */
void setRangeMinFailColor(const QColor & __value);
/*! \copydoc rangeMinFailColor
\see see rangeMinFailColor for details */
/*! \copydoc rangeMinFailColor */
QColor getRangeMinFailColor() const;
/*! \copydoc rangeMaxFailColor
\see see rangeMaxFailColor for details */
/*! \copydoc rangeMaxFailColor */
void setRangeMaxFailColor(const QColor & __value);
/*! \copydoc rangeMaxFailColor
\see see rangeMaxFailColor for details */
/*! \copydoc rangeMaxFailColor */
QColor getRangeMaxFailColor() const;
/*! \copydoc nanColor
\see see nanColor for details */
/*! \copydoc nanColor */
void setNanColor(const QColor & __value);
/*! \copydoc nanColor
\see see nanColor for details */
/*! \copydoc nanColor */
QColor getNanColor() const;
/*! \copydoc infColor
\see see infColor for details */
/*! \copydoc infColor */
void setInfColor(const QColor & __value);
/*! \copydoc infColor
\see see infColor for details */
/*! \copydoc infColor */
QColor getInfColor() const;
/*! \copydoc showColorBar
\see see showColorBar for details */
/*! \copydoc showColorBar */
void setShowColorBar(bool __value);
/*! \copydoc showColorBar
\see see showColorBar for details */
/*! \copydoc showColorBar */
bool getShowColorBar() const;
/*! \copydoc colorBarWidth
\see see colorBarWidth for details */
/*! \copydoc colorBarWidth */
void setColorBarWidth(double __value);
/*! \copydoc colorBarWidth
\see see colorBarWidth for details */
/*! \copydoc colorBarWidth */
double getColorBarWidth() const;
/*! \copydoc colorBarModifiedWidth
\see see colorBarModifiedWidth for details */
/*! \copydoc colorBarModifiedWidth */
void setColorBarModifiedWidth(double __value);
/*! \copydoc colorBarModifiedWidth
\see see colorBarModifiedWidth for details */
/*! \copydoc colorBarModifiedWidth */
double getColorBarModifiedWidth() const;
/*! \copydoc colorBarOffset
\see see colorBarOffset for details */
/*! \copydoc colorBarOffset */
void setColorBarOffset(double __value);
/*! \copydoc colorBarOffset
\see see colorBarOffset for details */
/*! \copydoc colorBarOffset */
double getColorBarOffset() const;
/*! \copydoc colorBarRelativeHeight
\see see colorBarRelativeHeight for details */
/*! \copydoc colorBarRelativeHeight */
void setColorBarRelativeHeight(double __value);
/*! \copydoc colorBarRelativeHeight
\see see colorBarRelativeHeight for details */
/*! \copydoc colorBarRelativeHeight */
double getColorBarRelativeHeight() const;
/*! \copydoc imageMin
\see see imageMin for details */
/*! \copydoc imageMin */
void setImageMin(double __value);
/*! \copydoc imageMin
\see see imageMin for details */
/*! \copydoc imageMin */
double getImageMin() const;
/*! \copydoc imageMax
\see see imageMax for details */
/*! \copydoc imageMax */
void setImageMax(double __value);
/*! \copydoc imageMax
\see see imageMax for details */
/*! \copydoc imageMax */
double getImageMax() const;
/*! \copydoc autoImageRange
\see see autoImageRange for details */
/*! \copydoc autoImageRange */
void setAutoImageRange(bool __value);
/*! \copydoc autoImageRange
\see see autoImageRange for details */
/*! \copydoc autoImageRange */
bool getAutoImageRange() const;
/*! \copydoc imageName
\see see imageName for details */
/*! \copydoc imageName */
void setImageName(const QString & __value);
/*! \copydoc imageName
\see see imageName for details */
/*! \copydoc imageName */
QString getImageName() const;
/*! \copydoc imageNameFontSize
\see see imageNameFontSize for details */
/*! \copydoc imageNameFontSize */
void setImageNameFontSize(double __value);
/*! \copydoc imageNameFontSize
\see see imageNameFontSize for details */
/*! \copydoc imageNameFontSize */
double getImageNameFontSize() const;
/*! \brief returns the property colorBarRightAxis ( \copybrief colorBarRightAxis ). \details Description of the parameter colorBarRightAxis is: <BLOCKQUOTE>\copydoc colorBarRightAxis </BLOCKQUOTE>. \see colorBarRightAxis for more information */
/*! \copydoc colorBarRightAxis */
JKQTPVerticalIndependentAxis* getColorBarRightAxis();
/*! \brief returns the property colorBarTopAxis ( \copybrief colorBarTopAxis ). \details Description of the parameter colorBarTopAxis is: <BLOCKQUOTE>\copydoc colorBarTopAxis </BLOCKQUOTE>. \see colorBarTopAxis for more information */
/*! \copydoc colorBarTopAxis */
JKQTPHorizontalIndependentAxis* getColorBarTopAxis();
/*! \brief returns the property modifierColorBarTopAxis ( \copybrief modifierColorBarTopAxis ). \details Description of the parameter modifierColorBarTopAxis is: <BLOCKQUOTE>\copydoc modifierColorBarTopAxis </BLOCKQUOTE>. \see modifierColorBarTopAxis for more information */
/*! \copydoc modifierColorBarTopAxis */
JKQTPVerticalIndependentAxis* getModifierColorBarTopAxis();
/*! \brief returns the property modifierColorBarRightAxis ( \copybrief modifierColorBarRightAxis ). \details Description of the parameter modifierColorBarRightAxis is: <BLOCKQUOTE>\copydoc modifierColorBarRightAxis </BLOCKQUOTE>. \see modifierColorBarRightAxis for more information */
/*! \copydoc modifierColorBarRightAxis */
JKQTPHorizontalIndependentAxis* getModifierColorBarRightAxis();
/*! \brief returns the property colorBarRightAxis ( \copybrief colorBarRightAxis ). \details Description of the parameter colorBarRightAxis is: <BLOCKQUOTE>\copydoc colorBarRightAxis </BLOCKQUOTE>. \see colorBarRightAxis for more information */
/*! \copydoc colorBarRightAxis */
const JKQTPVerticalIndependentAxis* getColorBarRightAxis() const;
/*! \brief returns the property colorBarTopAxis ( \copybrief colorBarTopAxis ). \details Description of the parameter colorBarTopAxis is: <BLOCKQUOTE>\copydoc colorBarTopAxis </BLOCKQUOTE>. \see colorBarTopAxis for more information */
/*! \copydoc colorBarTopAxis */
const JKQTPHorizontalIndependentAxis* getColorBarTopAxis() const;
/*! \brief returns the property modifierColorBarTopAxis ( \copybrief modifierColorBarTopAxis ). \details Description of the parameter modifierColorBarTopAxis is: <BLOCKQUOTE>\copydoc modifierColorBarTopAxis </BLOCKQUOTE>. \see modifierColorBarTopAxis for more information */
/*! \copydoc modifierColorBarTopAxis */
const JKQTPVerticalIndependentAxis* getModifierColorBarTopAxis() const;
/*! \brief returns the property modifierColorBarRightAxis ( \copybrief modifierColorBarRightAxis ). \details Description of the parameter modifierColorBarRightAxis is: <BLOCKQUOTE>\copydoc modifierColorBarRightAxis </BLOCKQUOTE>. \see modifierColorBarRightAxis for more information */
/*! \copydoc modifierColorBarRightAxis */
const JKQTPHorizontalIndependentAxis *getModifierColorBarRightAxis() const;
/*! \copydoc colorBarTopVisible
\see see colorBarTopVisible for details */
/*! \copydoc colorBarTopVisible */
void setColorBarTopVisible(bool __value);
/*! \copydoc colorBarTopVisible
\see see colorBarTopVisible for details */
/*! \copydoc colorBarTopVisible */
bool getColorBarTopVisible() const;
/*! \copydoc colorBarRightVisible
\see see colorBarRightVisible for details */
/*! \copydoc colorBarRightVisible */
void setColorBarRightVisible(bool __value);
/*! \copydoc colorBarRightVisible
\see see colorBarRightVisible for details */
/*! \copydoc colorBarRightVisible */
bool getColorBarRightVisible() const;
/*! \copydoc autoModifierRange
\see see autoModifierRange for details */
/*! \copydoc autoModifierRange */
void setAutoModifierRange(bool __value);
/*! \copydoc autoModifierRange
\see see autoModifierRange for details */
/*! \copydoc autoModifierRange */
bool getAutoModifierRange() const;
/*! \copydoc modifierMin
\see see modifierMin for details */
/*! \copydoc modifierMin */
void setModifierMin(double __value);
/*! \copydoc modifierMin
\see see modifierMin for details */
/*! \copydoc modifierMin */
double getModifierMin() const;
/*! \copydoc modifierMax
\see see modifierMax for details */
/*! \copydoc modifierMax */
void setModifierMax(double __value);
/*! \copydoc modifierMax
\see see modifierMax for details */
/*! \copydoc modifierMax */
double getModifierMax() const;
void setPalette(int pal);
@ -538,7 +472,20 @@ class JKQTP_LIB_EXPORT JKQTPMathImage: public JKQTPMathImageBase {
virtual void getModifierMinMax(double& imin, double& imax) override;
/** \brief return the value (raw data!) of the contained image at the given coordinate */
double getValueAt(double x, double y);
inline double getValueAt(double x, double y);
/** \brief retrieve size of a single sample in the image data (i.e. size of the datatype) */
inline int getSampleSize() const;
/** \brief retrieve image data at a given position as double */
inline double getPixelValue(int xIdx, int yIdx) const;
/** \brief return the value (raw data!) of the contained modifier image at the given coordinate */
inline double getModifierValueAt(double x, double y);
/** \brief retrieve size of a single sample in the modifier image data (i.e. size of the datatype) */
inline int getModifierSampleSize() const;
/** \brief retrieve modifier image data at a given position as double */
inline double getModifierPixelValue(int xIdx, int yIdx) const;
/** \brief plots a key marker inside the specified rectangle \a rect */
virtual void drawKeyMarker(JKQTPEnhancedPainter& painter, QRectF& rect) override;
@ -615,9 +562,173 @@ class JKQTP_LIB_EXPORT JKQTPMathImage: public JKQTPMathImageBase {
};
////////////////////////////////////////////////////////////////////////////////////////////////
double JKQTPMathImage::getValueAt(double x, double y)
{
ensureImageData();
int xx=trunc((x-this->x)/width*double(Nx));
int yy=trunc((y-this->y)/height*double(Ny));
if (xx>=0 && xx<(int64_t)Nx && yy>=0 && yy<(int64_t)Ny) {
switch(datatype) {
case JKQTPMathImageBase::DoubleArray: return (static_cast<double*>(data))[yy*Nx+xx]; break;
case JKQTPMathImageBase::FloatArray: return (static_cast<float*>(data))[yy*Nx+xx]; break;
case JKQTPMathImageBase::UInt8Array: return (static_cast<uint8_t*>(data))[yy*Nx+xx]; break;
case JKQTPMathImageBase::UInt16Array: return (static_cast<uint16_t*>(data))[yy*Nx+xx]; break;
case JKQTPMathImageBase::UInt32Array: return (static_cast<uint32_t*>(data))[yy*Nx+xx]; break;
case JKQTPMathImageBase::UInt64Array: return (static_cast<uint64_t*>(data))[yy*Nx+xx]; break;
case JKQTPMathImageBase::Int8Array: return (static_cast<int8_t*>(data))[yy*Nx+xx]; break;
case JKQTPMathImageBase::Int16Array: return (static_cast<int16_t*>(data))[yy*Nx+xx]; break;
case JKQTPMathImageBase::Int32Array: return (static_cast<int32_t*>(data))[yy*Nx+xx]; break;
case JKQTPMathImageBase::Int64Array: return (static_cast<int64_t*>(data))[yy*Nx+xx]; break;
} }
return 0.0;
}
////////////////////////////////////////////////////////////////////////////////////////////////
double JKQTPMathImage::getPixelValue(int xIdx, int yIdx) const {
// row-major in datastore
//ensureImageData();
if (!data) return 0;
switch(datatype) {
case JKQTPMathImageBase::DoubleArray:
return (static_cast<double*>(data))[yIdx*getNx()+xIdx];
case JKQTPMathImageBase::FloatArray:
return (static_cast<float*>(data))[yIdx*getNx()+xIdx];
case JKQTPMathImageBase::UInt8Array:
return (static_cast<uint8_t*>(data))[yIdx*getNx()+xIdx];
case JKQTPMathImageBase::UInt16Array:
return (static_cast<uint16_t*>(data))[yIdx*getNx()+xIdx];
case JKQTPMathImageBase::UInt32Array:
return (static_cast<uint32_t*>(data))[yIdx*getNx()+xIdx];
case JKQTPMathImageBase::UInt64Array:
return (static_cast<uint64_t*>(data))[yIdx*getNx()+xIdx];
case JKQTPMathImageBase::Int8Array:
return (static_cast<int8_t*>(data))[yIdx*getNx()+xIdx];
case JKQTPMathImageBase::Int16Array:
return (static_cast<int16_t*>(data))[yIdx*getNx()+xIdx];
case JKQTPMathImageBase::Int32Array:
return (static_cast<int32_t*>(data))[yIdx*getNx()+xIdx];
case JKQTPMathImageBase::Int64Array:
return (static_cast<int64_t*>(data))[yIdx*getNx()+xIdx];
default:
return 0;
}
}
////////////////////////////////////////////////////////////////////////////////////////////////
int JKQTPMathImage::getSampleSize() const {
switch(datatype) {
case JKQTPMathImageBase::DoubleArray:
return sizeof(double);
case JKQTPMathImageBase::FloatArray:
return sizeof(float);
case JKQTPMathImageBase::UInt8Array:
return sizeof(uint8_t);
case JKQTPMathImageBase::UInt16Array:
return sizeof(uint16_t);
case JKQTPMathImageBase::UInt32Array:
return sizeof(uint32_t);
case JKQTPMathImageBase::UInt64Array:
return sizeof(uint64_t);
case JKQTPMathImageBase::Int8Array:
return sizeof(int8_t);
case JKQTPMathImageBase::Int16Array:
return sizeof(int16_t);
case JKQTPMathImageBase::Int32Array:
return sizeof(int32_t);
case JKQTPMathImageBase::Int64Array:
return sizeof(int64_t);
default:
return 0;
}
}
////////////////////////////////////////////////////////////////////////////////////////////////
double JKQTPMathImage::getModifierValueAt(double x, double y)
{
ensureImageData();
int xx=trunc((x-this->x)/width*double(Nx));
int yy=trunc((y-this->y)/height*double(Ny));
if (xx>=0 && xx<(int64_t)Nx && yy>=0 && yy<(int64_t)Ny) {
switch(datatypeModifier) {
case JKQTPMathImageBase::DoubleArray: return (static_cast<double*>(dataModifier))[yy*Nx+xx]; break;
case JKQTPMathImageBase::FloatArray: return (static_cast<float*>(dataModifier))[yy*Nx+xx]; break;
case JKQTPMathImageBase::UInt8Array: return (static_cast<uint8_t*>(dataModifier))[yy*Nx+xx]; break;
case JKQTPMathImageBase::UInt16Array: return (static_cast<uint16_t*>(dataModifier))[yy*Nx+xx]; break;
case JKQTPMathImageBase::UInt32Array: return (static_cast<uint32_t*>(dataModifier))[yy*Nx+xx]; break;
case JKQTPMathImageBase::UInt64Array: return (static_cast<uint64_t*>(dataModifier))[yy*Nx+xx]; break;
case JKQTPMathImageBase::Int8Array: return (static_cast<int8_t*>(dataModifier))[yy*Nx+xx]; break;
case JKQTPMathImageBase::Int16Array: return (static_cast<int16_t*>(dataModifier))[yy*Nx+xx]; break;
case JKQTPMathImageBase::Int32Array: return (static_cast<int32_t*>(dataModifier))[yy*Nx+xx]; break;
case JKQTPMathImageBase::Int64Array: return (static_cast<int64_t*>(dataModifier))[yy*Nx+xx]; break;
} }
return 0.0;
}
////////////////////////////////////////////////////////////////////////////////////////////////
double JKQTPMathImage::getModifierPixelValue(int xIdx, int yIdx) const {
// row-major in datastore
//ensureImageData();
if (!dataModifier) return 0;
switch(datatypeModifier) {
case JKQTPMathImageBase::DoubleArray:
return (static_cast<double*>(dataModifier))[yIdx*getNx()+xIdx];
case JKQTPMathImageBase::FloatArray:
return (static_cast<float*>(dataModifier))[yIdx*getNx()+xIdx];
case JKQTPMathImageBase::UInt8Array:
return (static_cast<uint8_t*>(dataModifier))[yIdx*getNx()+xIdx];
case JKQTPMathImageBase::UInt16Array:
return (static_cast<uint16_t*>(dataModifier))[yIdx*getNx()+xIdx];
case JKQTPMathImageBase::UInt32Array:
return (static_cast<uint32_t*>(dataModifier))[yIdx*getNx()+xIdx];
case JKQTPMathImageBase::UInt64Array:
return (static_cast<uint64_t*>(dataModifier))[yIdx*getNx()+xIdx];
case JKQTPMathImageBase::Int8Array:
return (static_cast<int8_t*>(dataModifier))[yIdx*getNx()+xIdx];
case JKQTPMathImageBase::Int16Array:
return (static_cast<int16_t*>(dataModifier))[yIdx*getNx()+xIdx];
case JKQTPMathImageBase::Int32Array:
return (static_cast<int32_t*>(dataModifier))[yIdx*getNx()+xIdx];
case JKQTPMathImageBase::Int64Array:
return (static_cast<int64_t*>(dataModifier))[yIdx*getNx()+xIdx];
default:
return 0;
}
}
////////////////////////////////////////////////////////////////////////////////////////////////
int JKQTPMathImage::getModifierSampleSize() const {
switch(datatypeModifier) {
case JKQTPMathImageBase::DoubleArray:
return sizeof(double);
case JKQTPMathImageBase::FloatArray:
return sizeof(float);
case JKQTPMathImageBase::UInt8Array:
return sizeof(uint8_t);
case JKQTPMathImageBase::UInt16Array:
return sizeof(uint16_t);
case JKQTPMathImageBase::UInt32Array:
return sizeof(uint32_t);
case JKQTPMathImageBase::UInt64Array:
return sizeof(uint64_t);
case JKQTPMathImageBase::Int8Array:
return sizeof(int8_t);
case JKQTPMathImageBase::Int16Array:
return sizeof(int16_t);
case JKQTPMathImageBase::Int32Array:
return sizeof(int32_t);
case JKQTPMathImageBase::Int64Array:
return sizeof(int64_t);
default:
return 0;
}
}
@ -644,17 +755,13 @@ class JKQTP_LIB_EXPORT JKQTPColumnMathImage: public JKQTPMathImage {
JKQTPColumnMathImage(double x, double y, double width, double height, int imageColumn, int Nx, int Ny, JKQTPMathImageColorPalette palette, JKQTPlotter* parent);
JKQTPColumnMathImage(double x, double y, double width, double height, int imageColumn, int Nx, int Ny, JKQTPlotter* parent);
/*! \copydoc imageColumn
\see see imageColumn for details */
/*! \copydoc imageColumn */
virtual void setImageColumn(int __value);
/*! \copydoc imageColumn
\see see imageColumn for details */
/*! \copydoc imageColumn */
int getImageColumn() const;
/*! \copydoc modifierColumn
\see see modifierColumn for details */
/*! \copydoc modifierColumn */
virtual void setModifierColumn(int __value);
/*! \copydoc modifierColumn
\see see modifierColumn for details */
/*! \copydoc modifierColumn */
int getModifierColumn() const;
/** \copydoc JKQTPGraph::usesColumn() */

View File

@ -64,35 +64,25 @@ class JKQTP_LIB_EXPORT JKQTPOverlayImage: public JKQTPImageBase {
/** \brief returns the color to be used for the key label */
virtual QColor getKeyLabelColor() const override;
/*! \copydoc trueColor
\see see trueColor for details */
/*! \copydoc trueColor */
void setTrueColor(const QColor & __value);
/*! \copydoc trueColor
\see see trueColor for details */
/*! \copydoc trueColor */
QColor getTrueColor() const;
/*! \copydoc falseColor
\see see falseColor for details */
/*! \copydoc falseColor */
void setFalseColor(const QColor & __value);
/*! \copydoc falseColor
\see see falseColor for details */
/*! \copydoc falseColor */
QColor getFalseColor() const;
/*! \copydoc Nx
\see see Nx for details */
/*! \copydoc Nx */
void setNx(int __value);
/*! \copydoc Nx
\see see Nx for details */
/*! \copydoc Nx */
int getNx() const;
/*! \copydoc Ny
\see see Ny for details */
/*! \copydoc Ny */
void setNy(int __value);
/*! \copydoc Ny
\see see Ny for details */
/*! \copydoc Ny */
int getNy() const;
/*! \copydoc data
\see see data for details */
/*! \copydoc data */
virtual void setData(bool* __value);
/*! \copydoc data
\see see data for details */
/*! \copydoc data */
bool *getData() const;
/** \brief set the plot-data to a given array \a data with size \a Nx * \a Ny in row-major ordering */
@ -163,29 +153,21 @@ class JKQTP_LIB_EXPORT JKQTPOverlayImageEnhanced: public JKQTPOverlayImage {
/** \brief plots a key marker inside the specified rectangle \a rect */
virtual void drawKeyMarker(JKQTPEnhancedPainter& painter, QRectF& rect) override;
/*! \copydoc symbol
\see see symbol for details */
/*! \copydoc symbol */
void setSymbolType(JKQTPGraphSymbols __value);
/*! \copydoc symbol
\see see symbol for details */
/*! \copydoc symbol */
JKQTPGraphSymbols getSymbol() const;
/*! \copydoc symbolLineWidth
\see see symbolLineWidth for details */
/*! \copydoc symbolLineWidth */
void setSymbolLineWidth(double __value);
/*! \copydoc symbolLineWidth
\see see symbolLineWidth for details */
/*! \copydoc symbolLineWidth */
double getSymbolLineWidth() const;
/*! \copydoc drawMode
\see see drawMode for details */
/*! \copydoc drawMode */
void setDrawMode(OverlayImageEnhancedDrawMode __value);
/*! \copydoc drawMode
\see see drawMode for details */
/*! \copydoc drawMode */
OverlayImageEnhancedDrawMode getDrawMode() const;
/*! \copydoc symbolSizeFactor
\see see symbolSizeFactor for details */
/*! \copydoc symbolSizeFactor */
void setSymbolSizeFactor(double __value);
/*! \copydoc symbolSizeFactor
\see see symbolSizeFactor for details */
/*! \copydoc symbolSizeFactor */
double getSymbolSizeFactor() const;
protected:
@ -221,11 +203,9 @@ class JKQTP_LIB_EXPORT JKQTPColumnOverlayImageEnhanced: public JKQTPOverlayImage
JKQTPColumnOverlayImageEnhanced(JKQTBasePlotter* parent=nullptr);
JKQTPColumnOverlayImageEnhanced(JKQTPlotter* parent);
/*! \copydoc imageColumn
\see see imageColumn for details */
/*! \copydoc imageColumn */
virtual void setImageColumn(int __value);
/*! \copydoc imageColumn
\see see imageColumn for details */
/*! \copydoc imageColumn */
int getImageColumn() const;
/** \brief plots the graph to the plotter object specified as parent */
virtual void draw(JKQTPEnhancedPainter& painter) override;

View File

@ -1247,6 +1247,7 @@ bool JKQTPColumnRGBMathImage::usesColumn(int c) const
void JKQTPColumnRGBMathImage::ensureImageData()
{
JKQTPRGBMathImage::ensureImageData();
this->datatype=JKQTPMathImageBase::DoubleArray;
this->datatypeG=JKQTPMathImageBase::DoubleArray;
this->datatypeB=JKQTPMathImageBase::DoubleArray;

View File

@ -81,206 +81,150 @@ class JKQTP_LIB_EXPORT JKQTPRGBMathImage: public JKQTPMathImageBase {
virtual void getDataMinMax(double& imin, double& imax) override;
/*! \copydoc data
\see see data for details */
/*! \copydoc data */
virtual void setDataR(void* __value);
/*! \copydoc data
\see see data for details */
/*! \copydoc data */
void* getDataR() const;
/*! \copydoc datatype
\see see datatype for details */
/*! \copydoc datatype */
void setDatatypeR(DataType __value);
/*! \copydoc datatype
\see see datatype for details */
/*! \copydoc datatype */
DataType getDatatypeR() const;
/*! \copydoc dataG
\see see dataG for details */
/*! \copydoc dataG */
virtual void setDataG(void* __value);
/*! \copydoc dataG
\see see dataG for details */
/*! \copydoc dataG */
void* getDataG() const;
/*! \copydoc datatypeG
\see see datatypeG for details */
/*! \copydoc datatypeG */
void setDatatypeG(DataType __value);
/*! \copydoc datatypeG
\see see datatypeG for details */
/*! \copydoc datatypeG */
DataType getDatatypeG() const;
/*! \copydoc dataB
\see see dataB for details */
/*! \copydoc dataB */
virtual void setDataB(void* __value);
/*! \copydoc dataB
\see see dataB for details */
/*! \copydoc dataB */
void* getDataB() const;
/*! \copydoc datatypeB
\see see datatypeB for details */
/*! \copydoc datatypeB */
void setDatatypeB(DataType __value);
/*! \copydoc datatypeB
\see see datatypeB for details */
/*! \copydoc datatypeB */
DataType getDatatypeB() const;
/*! \copydoc showColorBar
\see see showColorBar for details */
/*! \copydoc showColorBar */
void setShowColorBar(bool __value);
/*! \copydoc showColorBar
\see see showColorBar for details */
/*! \copydoc showColorBar */
bool getShowColorBar() const;
/*! \copydoc colorBarWidth
\see see colorBarWidth for details */
/*! \copydoc colorBarWidth */
void setColorBarWidth(int __value);
/*! \copydoc colorBarWidth
\see see colorBarWidth for details */
/*! \copydoc colorBarWidth */
int getColorBarWidth() const;
/*! \copydoc colorBarOffset
\see see colorBarOffset for details */
/*! \copydoc colorBarOffset */
void setColorBarOffset(int __value);
/*! \copydoc colorBarOffset
\see see colorBarOffset for details */
/*! \copydoc colorBarOffset */
int getColorBarOffset() const;
/*! \copydoc colorBarRelativeHeight
\see see colorBarRelativeHeight for details */
/*! \copydoc colorBarRelativeHeight */
void setColorBarRelativeHeight(double __value);
/*! \copydoc colorBarRelativeHeight
\see see colorBarRelativeHeight for details */
/*! \copydoc colorBarRelativeHeight */
double getColorBarRelativeHeight() const;
/*! \copydoc imageMinR
\see see imageMinR for details */
/*! \copydoc imageMinR */
void setImageMin(double __value);
/*! \copydoc imageMinR
\see see imageMinR for details */
/*! \copydoc imageMinR */
double getImageMin() const;
/*! \copydoc imageMinR
\see see imageMinR for details */
/*! \copydoc imageMinR */
void setImageMinR(double m);
/*! \copydoc imageMaxR
\see see imageMaxR for details */
/*! \copydoc imageMaxR */
void setImageMax(double __value);
/*! \copydoc imageMaxR
\see see imageMaxR for details */
/*! \copydoc imageMaxR */
double getImageMax() const;
/*! \copydoc imageMaxR
\see see imageMaxR for details */
/*! \copydoc imageMaxR */
void setImageMaxR(double m);
/*! \copydoc imageMinG
\see see imageMinG for details */
/*! \copydoc imageMinG */
void setImageMinG(double __value);
/*! \copydoc imageMinG
\see see imageMinG for details */
/*! \copydoc imageMinG */
double getImageMinG() const;
/*! \copydoc imageMaxG
\see see imageMaxG for details */
/*! \copydoc imageMaxG */
void setImageMaxG(double __value);
/*! \copydoc imageMaxG
\see see imageMaxG for details */
/*! \copydoc imageMaxG */
double getImageMaxG() const;
/*! \copydoc imageMinB
\see see imageMinB for details */
/*! \copydoc imageMinB */
void setImageMinB(double __value);
/*! \copydoc imageMinB
\see see imageMinB for details */
/*! \copydoc imageMinB */
double getImageMinB() const;
/*! \copydoc imageMaxB
\see see imageMaxB for details */
/*! \copydoc imageMaxB */
void setImageMaxB(double __value);
/*! \copydoc imageMaxB
\see see imageMaxB for details */
/*! \copydoc imageMaxB */
double getImageMaxB() const;
/*! \copydoc autoImageRange
\see see autoImageRange for details */
/*! \copydoc autoImageRange */
void setAutoImageRange(bool __value);
/*! \copydoc autoImageRange
\see see autoImageRange for details */
/*! \copydoc autoImageRange */
bool getAutoImageRange() const;
/*! \copydoc imageNameR
\see see imageNameR for details */
/*! \copydoc imageNameR */
void setImageName(const QString & __value);
/*! \copydoc imageNameR
\see see imageNameR for details */
/*! \copydoc imageNameR */
QString getImageName() const;
/*! \copydoc imageNameR
\see see imageNameR for details */
/*! \copydoc imageNameR */
QString getImageNameR() const;
/*! \copydoc imageNameR
\see see imageNameR for details */
/*! \copydoc imageNameR */
void setImageNameR(const QString& m);
/*! \copydoc imageNameG
\see see imageNameG for details */
/*! \copydoc imageNameG */
void setImageNameG(const QString & __value);
/*! \copydoc imageNameG
\see see imageNameG for details */
/*! \copydoc imageNameG */
QString getImageNameG() const;
/*! \copydoc imageNameB
\see see imageNameB for details */
/*! \copydoc imageNameB */
void setImageNameB(const QString & __value);
/*! \copydoc imageNameB
\see see imageNameB for details */
/*! \copydoc imageNameB */
QString getImageNameB() const;
/*! \copydoc imageNameFontName
\see see imageNameFontName for details */
/*! \copydoc imageNameFontName */
void setImageNameFontName(const QString & __value);
/*! \copydoc imageNameFontName
\see see imageNameFontName for details */
/*! \copydoc imageNameFontName */
QString getImageNameFontName() const;
/*! \copydoc imageNameFontSize
\see see imageNameFontSize for details */
/*! \copydoc imageNameFontSize */
void setImageNameFontSize(double __value);
/*! \copydoc imageNameFontSize
\see see imageNameFontSize for details */
/*! \copydoc imageNameFontSize */
double getImageNameFontSize() const;
/*! \brief returns the property colorBarRightAxis ( \copybrief colorBarRightAxis ). \details Description of the parameter colorBarRightAxis is: <BLOCKQUOTE>\copydoc colorBarRightAxis </BLOCKQUOTE>. \see colorBarRightAxis for more information */
/*! \copydoc colorBarRightAxis */
JKQTPVerticalIndependentAxis* getColorBarRightAxis();
/*! \brief returns the property colorBarTopAxis ( \copybrief colorBarTopAxis ). \details Description of the parameter colorBarTopAxis is: <BLOCKQUOTE>\copydoc colorBarTopAxis </BLOCKQUOTE>. \see colorBarTopAxis for more information */
/*! \copydoc colorBarTopAxis */
JKQTPHorizontalIndependentAxis* getColorBarTopAxis();
/*! \brief returns the property colorBarRightAxis ( \copybrief colorBarRightAxis ). \details Description of the parameter colorBarRightAxis is: <BLOCKQUOTE>\copydoc colorBarRightAxis </BLOCKQUOTE>. \see colorBarRightAxis for more information */
/*! \copydoc colorBarRightAxis */
JKQTPVerticalIndependentAxis* getColorBarRightAxisR();
/*! \brief returns the property colorBarTopAxis ( \copybrief colorBarTopAxis ). \details Description of the parameter colorBarTopAxis is: <BLOCKQUOTE>\copydoc colorBarTopAxis </BLOCKQUOTE>. \see colorBarTopAxis for more information */
/*! \copydoc colorBarTopAxis */
JKQTPHorizontalIndependentAxis *getColorBarTopAxisR();
/*! \brief returns the property colorBarRightAxisG ( \copybrief colorBarRightAxisG ). \details Description of the parameter colorBarRightAxisG is: <BLOCKQUOTE>\copydoc colorBarRightAxisG </BLOCKQUOTE>. \see colorBarRightAxisG for more information */
/*! \copydoc colorBarRightAxisG */
JKQTPVerticalIndependentAxis* getColorBarRightAxisG();
/*! \brief returns the property colorBarTopAxisG ( \copybrief colorBarTopAxisG ). \details Description of the parameter colorBarTopAxisG is: <BLOCKQUOTE>\copydoc colorBarTopAxisG </BLOCKQUOTE>. \see colorBarTopAxisG for more information */
/*! \copydoc colorBarTopAxisG */
JKQTPHorizontalIndependentAxis* getColorBarTopAxisG();
/*! \brief returns the property colorBarRightAxisB ( \copybrief colorBarRightAxisB ). \details Description of the parameter colorBarRightAxisB is: <BLOCKQUOTE>\copydoc colorBarRightAxisB </BLOCKQUOTE>. \see colorBarRightAxisB for more information */
/*! \copydoc colorBarRightAxisB */
JKQTPVerticalIndependentAxis* getColorBarRightAxisB();
/*! \brief returns the property colorBarTopAxisB ( \copybrief colorBarTopAxisB ). \details Description of the parameter colorBarTopAxisB is: <BLOCKQUOTE>\copydoc colorBarTopAxisB </BLOCKQUOTE>. \see colorBarTopAxisB for more information */
/*! \copydoc colorBarTopAxisB */
JKQTPHorizontalIndependentAxis* getColorBarTopAxisB();
/*! \brief returns the property colorBarRightAxis ( \copybrief colorBarRightAxis ). \details Description of the parameter colorBarRightAxis is: <BLOCKQUOTE>\copydoc colorBarRightAxis </BLOCKQUOTE>. \see colorBarRightAxis for more information */
/*! \copydoc colorBarRightAxis */
const JKQTPVerticalIndependentAxis* getColorBarRightAxis() const;
/*! \brief returns the property colorBarTopAxis ( \copybrief colorBarTopAxis ). \details Description of the parameter colorBarTopAxis is: <BLOCKQUOTE>\copydoc colorBarTopAxis </BLOCKQUOTE>. \see colorBarTopAxis for more information */
/*! \copydoc colorBarTopAxis */
const JKQTPHorizontalIndependentAxis* getColorBarTopAxis() const;
/*! \brief returns the property colorBarRightAxis ( \copybrief colorBarRightAxis ). \details Description of the parameter colorBarRightAxis is: <BLOCKQUOTE>\copydoc colorBarRightAxis </BLOCKQUOTE>. \see colorBarRightAxis for more information */
/*! \copydoc colorBarRightAxis */
const JKQTPVerticalIndependentAxis* getColorBarRightAxisR() const;
/*! \brief returns the property colorBarTopAxis ( \copybrief colorBarTopAxis ). \details Description of the parameter colorBarTopAxis is: <BLOCKQUOTE>\copydoc colorBarTopAxis </BLOCKQUOTE>. \see colorBarTopAxis for more information */
/*! \copydoc colorBarTopAxis */
const JKQTPHorizontalIndependentAxis* getColorBarTopAxisR() const;
/*! \brief returns the property colorBarRightAxisG ( \copybrief colorBarRightAxisG ). \details Description of the parameter colorBarRightAxisG is: <BLOCKQUOTE>\copydoc colorBarRightAxisG </BLOCKQUOTE>. \see colorBarRightAxisG for more information */
/*! \copydoc colorBarRightAxisG */
const JKQTPVerticalIndependentAxis* getColorBarRightAxisG() const;
/*! \brief returns the property colorBarTopAxisG ( \copybrief colorBarTopAxisG ). \details Description of the parameter colorBarTopAxisG is: <BLOCKQUOTE>\copydoc colorBarTopAxisG </BLOCKQUOTE>. \see colorBarTopAxisG for more information */
/*! \copydoc colorBarTopAxisG */
const JKQTPHorizontalIndependentAxis *getColorBarTopAxisG() const;
/*! \brief returns the property colorBarRightAxisB ( \copybrief colorBarRightAxisB ). \details Description of the parameter colorBarRightAxisB is: <BLOCKQUOTE>\copydoc colorBarRightAxisB </BLOCKQUOTE>. \see colorBarRightAxisB for more information */
/*! \copydoc colorBarRightAxisB */
const JKQTPVerticalIndependentAxis* getColorBarRightAxisB() const;
/*! \brief returns the property colorBarTopAxisB ( \copybrief colorBarTopAxisB ). \details Description of the parameter colorBarTopAxisB is: <BLOCKQUOTE>\copydoc colorBarTopAxisB </BLOCKQUOTE>. \see colorBarTopAxisB for more information */
/*! \copydoc colorBarTopAxisB */
const JKQTPHorizontalIndependentAxis *getColorBarTopAxisB() const;
/*! \copydoc colorBarTopVisible
\see see colorBarTopVisible for details */
/*! \copydoc colorBarTopVisible */
void setColorBarTopVisible(bool __value);
/*! \copydoc colorBarTopVisible
\see see colorBarTopVisible for details */
/*! \copydoc colorBarTopVisible */
bool getColorBarTopVisible() const;
/*! \copydoc colorBarRightVisible
\see see colorBarRightVisible for details */
/*! \copydoc colorBarRightVisible */
void setColorBarRightVisible(bool __value);
/*! \copydoc colorBarRightVisible
\see see colorBarRightVisible for details */
/*! \copydoc colorBarRightVisible */
bool getColorBarRightVisible() const;
/*! \copydoc colorbarsSideBySide
\see see colorbarsSideBySide for details */
/*! \copydoc colorbarsSideBySide */
void setColorbarsSideBySide(bool __value);
/*! \copydoc colorbarsSideBySide
\see see colorbarsSideBySide for details */
/*! \copydoc colorbarsSideBySide */
bool getColorbarsSideBySide() const;
/*! \copydoc rgbMode
\see see rgbMode for details */
/*! \copydoc rgbMode */
void setRgbMode(JKQTPRGBMathImageRGBMode __value);
/*! \copydoc rgbMode
\see see rgbMode for details */
/*! \copydoc rgbMode */
JKQTPRGBMathImageRGBMode getRgbMode() const;
/** \brief return the data of the green channel used for plotting as a QVector<double> in row-major data-ordering */
@ -435,29 +379,21 @@ class JKQTP_LIB_EXPORT JKQTPColumnRGBMathImage: public JKQTPRGBMathImage {
JKQTPColumnRGBMathImage(double x, double y, double width, double height, int imageRColumn, int imageGColumn, int Nx, int Ny, JKQTPlotter* parent);
JKQTPColumnRGBMathImage(double x, double y, double width, double height, int imageRColumn, int imageGColumn, int imageBColumn, int Nx, int Ny, JKQTPlotter* parent);
/*! \copydoc imageRColumn
\see see imageRColumn for details */
/*! \copydoc imageRColumn */
virtual void setImageRColumn(int __value);
/*! \copydoc imageRColumn
\see see imageRColumn for details */
/*! \copydoc imageRColumn */
int getImageRColumn() const;
/*! \copydoc imageGColumn
\see see imageGColumn for details */
/*! \copydoc imageGColumn */
virtual void setImageGColumn(int __value);
/*! \copydoc imageGColumn
\see see imageGColumn for details */
/*! \copydoc imageGColumn */
int getImageGColumn() const;
/*! \copydoc imageBColumn
\see see imageBColumn for details */
/*! \copydoc imageBColumn */
virtual void setImageBColumn(int __value);
/*! \copydoc imageBColumn
\see see imageBColumn for details */
/*! \copydoc imageBColumn */
int getImageBColumn() const;
/*! \copydoc modifierColumn
\see see modifierColumn for details */
/*! \copydoc modifierColumn */
virtual void setModifierColumn(int __value);
/*! \copydoc modifierColumn
\see see modifierColumn for details */
/*! \copydoc modifierColumn */
int getModifierColumn() const;
/** \copydoc JKQTPGraph::usesColumn() */
virtual bool usesColumn(int c) const override;

View File

@ -50,18 +50,14 @@ class JKQTP_LIB_EXPORT JKQTPImpulsesHorizontalGraph: public JKQTPXYGraph, public
/*! \brief color of symbols and impulses in one call */
virtual void setColor(QColor c);
/*! \copydoc baseline
\see see baseline for details */
/*! \copydoc baseline */
void setBaseline(double __value);
/*! \copydoc baseline
\see see baseline for details */
/*! \copydoc baseline */
double getBaseline() const;
/*! \copydoc drawSymbols
\see see drawSymbols for details */
/*! \copydoc drawSymbols */
void setDrawSymbols(bool __value);
/*! \copydoc drawSymbols
\see see drawSymbols for details */
/*! \copydoc drawSymbols */
bool getDrawSymbols() const;
protected:

View File

@ -57,18 +57,14 @@ class JKQTP_LIB_EXPORT JKQTPXParsedFunctionLineGraph: public JKQTPXFunctionLineG
/** \brief class destructor */
virtual ~JKQTPXParsedFunctionLineGraph() override;
/*! \copydoc function
\see see function for details */
/*! \copydoc function */
void setFunction(const QString & __value);
/*! \copydoc function
\see see function for details */
/*! \copydoc function */
QString getFunction() const;
/*! \copydoc errorFunction
\see see errorFunction for details */
/*! \copydoc errorFunction */
void setErrorFunction(const QString & __value);
/*! \copydoc errorFunction
\see see errorFunction for details */
/*! \copydoc errorFunction */
QString getErrorFunction() const;
/** \brief INTERNAL data structure
@ -127,18 +123,14 @@ class JKQTP_LIB_EXPORT JKQTPYParsedFunctionLineGraph: public JKQTPYFunctionLineG
/** \brief class destructor */
virtual ~JKQTPYParsedFunctionLineGraph() override;
/*! \copydoc function
\see see function for details */
/*! \copydoc function */
void setFunction(const QString & __value);
/*! \copydoc function
\see see function for details */
/*! \copydoc function */
QString getFunction() const;
/*! \copydoc errorFunction
\see see errorFunction for details */
/*! \copydoc errorFunction */
void setErrorFunction(const QString & __value);
/*! \copydoc errorFunction
\see see errorFunction for details */
/*! \copydoc errorFunction */
QString getErrorFunction() const;
/** \brief INTERNAL data structure

View File

@ -70,29 +70,21 @@ class JKQTP_LIB_EXPORT JKQTPPeakStreamGraph: public JKQTPSingleColumnGraph, publ
virtual QColor getKeyLabelColor() const override;
/** \brief set symbol color and fill color at the same time */
void setColor(QColor col);
/*! \copydoc baseline
\see see baseline for details */
/*! \copydoc baseline */
void setBaseline(double __value);
/*! \copydoc baseline
\see see baseline for details */
/*! \copydoc baseline */
double getBaseline() const;
/*! \copydoc peakHeight
\see see peakHeight for details */
/*! \copydoc peakHeight */
void setPeakHeight(double __value);
/*! \copydoc peakHeight
\see see peakHeight for details */
/*! \copydoc peakHeight */
double getPeakHeight() const;
/*! \copydoc yPeaks
\see see yPeaks for details */
/*! \copydoc yPeaks */
void setYPeaks(bool __value);
/*! \copydoc yPeaks
\see see yPeaks for details */
/*! \copydoc yPeaks */
bool getYPeaks() const;
/*! \copydoc drawBaseline
\see see drawBaseline for details */
/*! \copydoc drawBaseline */
void setDrawBaseline(bool __value);
/*! \copydoc drawBaseline
\see see drawBaseline for details */
/*! \copydoc drawBaseline */
bool getDrawBaseline() const;
protected:

View File

@ -82,96 +82,66 @@ class JKQTP_LIB_EXPORT JKQTPHorizontalRange: public JKQTPGraph, public JKQTPGrap
/*! \brief set the color of the graph (all lines and filling) */
virtual void setColor(QColor c);
/*! \copydoc centerColor
\see see centerColor for details */
/*! \copydoc centerColor */
void setCenterColor(const QColor & __value);
/*! \copydoc centerColor
\see see centerColor for details */
/*! \copydoc centerColor */
QColor getCenterColor() const;
/*! \copydoc centerStyle
\see see centerStyle for details */
/*! \copydoc centerStyle */
void setCenterStyle(Qt::PenStyle __value);
/*! \copydoc centerStyle
\see see centerStyle for details */
/*! \copydoc centerStyle */
Qt::PenStyle getCenterStyle() const;
/*! \copydoc centerLineWidth
\see see centerLineWidth for details */
/*! \copydoc centerLineWidth */
void setCenterLineWidth(double __value);
/*! \copydoc centerLineWidth
\see see centerLineWidth for details */
/*! \copydoc centerLineWidth */
double getCenterLineWidth() const;
/*! \copydoc rangeMin
\see see rangeMin for details */
/*! \copydoc rangeMin */
void setRangeMin(double __value);
/*! \copydoc rangeMin
\see see rangeMin for details */
/*! \copydoc rangeMin */
double getRangeMin() const;
/*! \copydoc rangeMax
\see see rangeMax for details */
/*! \copydoc rangeMax */
void setRangeMax(double __value);
/*! \copydoc rangeMax
\see see rangeMax for details */
/*! \copydoc rangeMax */
double getRangeMax() const;
/*! \copydoc sizeMin
\see see sizeMin for details */
/*! \copydoc sizeMin */
void setSizeMin(double __value);
/*! \copydoc sizeMin
\see see sizeMin for details */
/*! \copydoc sizeMin */
double getSizeMin() const;
/*! \copydoc sizeMax
\see see sizeMax for details */
/*! \copydoc sizeMax */
void setSizeMax(double __value);
/*! \copydoc sizeMax
\see see sizeMax for details */
/*! \copydoc sizeMax */
double getSizeMax() const;
/*! \copydoc unlimitedSizeMin
\see see unlimitedSizeMin for details */
/*! \copydoc unlimitedSizeMin */
void setUnlimitedSizeMin(bool __value);
/*! \copydoc unlimitedSizeMin
\see see unlimitedSizeMin for details */
/*! \copydoc unlimitedSizeMin */
bool getUnlimitedSizeMin() const;
/*! \copydoc unlimitedSizeMax
\see see unlimitedSizeMax for details */
/*! \copydoc unlimitedSizeMax */
void setUnlimitedSizeMax(bool __value);
/*! \copydoc unlimitedSizeMax
\see see unlimitedSizeMax for details */
/*! \copydoc unlimitedSizeMax */
bool getUnlimitedSizeMax() const;
/*! \copydoc rangeCenter
\see see rangeCenter for details */
/*! \copydoc rangeCenter */
void setRangeCenter(double __value);
/*! \copydoc rangeCenter
\see see rangeCenter for details */
/*! \copydoc rangeCenter */
double getRangeCenter() const;
/*! \copydoc plotCenterLine
\see see plotCenterLine for details */
/*! \copydoc plotCenterLine */
void setPlotCenterLine(bool __value);
/*! \copydoc plotCenterLine
\see see plotCenterLine for details */
/*! \copydoc plotCenterLine */
bool getPlotCenterLine() const;
/*! \copydoc invertedRange
\see see invertedRange for details */
/*! \copydoc invertedRange */
void setInvertedRange(bool __value);
/*! \copydoc invertedRange
\see see invertedRange for details */
/*! \copydoc invertedRange */
bool getInvertedRange() const;
/*! \copydoc plotRange
\see see plotRange for details */
/*! \copydoc plotRange */
void setPlotRange(bool __value);
/*! \copydoc plotRange
\see see plotRange for details */
/*! \copydoc plotRange */
bool getPlotRange() const;
/*! \copydoc fillRange
\see see fillRange for details */
/*! \copydoc fillRange */
void setFillRange(bool __value);
/*! \copydoc fillRange
\see see fillRange for details */
/*! \copydoc fillRange */
bool getFillRange() const;
/*! \copydoc plotRangeLines
\see see plotRangeLines for details */
/*! \copydoc plotRangeLines */
void setPlotRangeLines(bool __value);
/*! \copydoc plotRangeLines
\see see plotRangeLines for details */
/*! \copydoc plotRangeLines */
bool getPlotRangeLines() const;
protected:
/** \brief min-value of range */

View File

@ -66,11 +66,9 @@ class JKQTP_LIB_EXPORT JKQTPXYLineGraph: public JKQTPXYGraph, public JKQTPGraphL
/** \brief returns the color to be used for the key label */
virtual QColor getKeyLabelColor() const override;
/*! \copydoc drawLine
\see see drawLine for details */
/*! \copydoc drawLine */
void setDrawLine(bool __value);
/*! \copydoc drawLine
\see see drawLine for details */
/*! \copydoc drawLine */
bool getDrawLine() const;
/** \brief set color of line and symbol */
@ -135,14 +133,11 @@ class JKQTP_LIB_EXPORT JKQTPXYParametrizedScatterGraph: public JKQTPXYLineGraph,
/** \brief returns the color to be used for the key label */
virtual QColor getKeyLabelColor() const override;
/*! \copydoc sizeColumn
\see see sizeColumn for details */
/*! \copydoc sizeColumn */
void setSizeColumn(int __value);
/*! \copydoc sizeColumn
\see see sizeColumn for details */
/*! \copydoc sizeColumn */
void setSizeColumn (size_t __value);
/*! \copydoc sizeColumn
\see see sizeColumn for details */
/*! \copydoc sizeColumn */
int getSizeColumn() const;
/** \brief defines a functor, which converts a value from the sizeColumn into an actual symbol size in pt
*
@ -165,25 +160,19 @@ class JKQTP_LIB_EXPORT JKQTPXYParametrizedScatterGraph: public JKQTPXYLineGraph,
FunctorToSize getSizeColumnFunctor();
/*! \copydoc colorColumn
\see see colorColumn for details */
/*! \copydoc colorColumn */
void setColorColumn(int __value);
/*! \copydoc colorColumn
\see see colorColumn for details */
/*! \copydoc colorColumn */
int getColorColumn() const;
/*! \copydoc colorColumn
\see see colorColumn for details */
/*! \copydoc colorColumn */
void setColorColumn (size_t __value);
/*! \copydoc symbolColumn
\see see symbolColumn for details */
/*! \copydoc symbolColumn */
void setSymbolColumn(int __value);
/*! \copydoc symbolColumn
\see see symbolColumn for details */
/*! \copydoc symbolColumn */
int getSymbolColumn() const;
/*! \copydoc symbolColumn
\see see symbolColumn for details */
/*! \copydoc symbolColumn */
void setSymbolColumn (size_t __value);
/** \brief defines a functor, which converts a value from the symbolColumn into an actual symbol type
*
@ -235,14 +224,11 @@ class JKQTP_LIB_EXPORT JKQTPXYParametrizedScatterGraph: public JKQTPXYLineGraph,
FunctorToSymbol getSymbolColumnFunctor();
/*! \copydoc linewidthColumn
\see see linewidthColumn for details */
/*! \copydoc linewidthColumn */
void setLinewidthColumn(int __value);
/*! \copydoc linewidthColumn
\see see linewidthColumn for details */
/*! \copydoc linewidthColumn */
int getLinewidthColumn() const;
/*! \copydoc linewidthColumn
\see see linewidthColumn for details */
/*! \copydoc linewidthColumn */
void setLinewidthColumn( size_t __value);
/** \brief defines a functor, which converts a value from the symbolColumn into an actual line width in pt
*
@ -272,43 +258,31 @@ class JKQTP_LIB_EXPORT JKQTPXYParametrizedScatterGraph: public JKQTPXYLineGraph,
/*! \copydoc colorColumnContainsRGB
\see see colorColumnContainsRGB for details */
/*! \copydoc colorColumnContainsRGB */
void setColorColumnContainsRGB(bool __value);
/*! \copydoc colorColumnContainsRGB
\see see colorColumnContainsRGB for details */
/*! \copydoc colorColumnContainsRGB */
bool getColorColumnContainsRGB() const;
/*! \copydoc gridModeForSymbolSize
\see see gridModeForSymbolSize for details */
/*! \copydoc gridModeForSymbolSize */
void setGridModeForSymbolSize(bool __value);
/*! \copydoc gridModeForSymbolSize
\see see gridModeForSymbolSize for details */
/*! \copydoc gridModeForSymbolSize */
bool getGridModeForSymbolSize() const;
/*! \copydoc gridDeltaX
\see see gridDeltaX for details */
/*! \copydoc gridDeltaX */
void setGridDeltaX(double __value);
/*! \copydoc gridDeltaX
\see see gridDeltaX for details */
/*! \copydoc gridDeltaX */
double getGridDeltaX() const;
/*! \copydoc gridDeltaY
\see see gridDeltaY for details */
/*! \copydoc gridDeltaY */
void setGridDeltaY(double __value);
/*! \copydoc gridDeltaY
\see see gridDeltaY for details */
/*! \copydoc gridDeltaY */
double getGridDeltaY() const;
/*! \copydoc gridSymbolFractionSize
\see see gridSymbolFractionSize for details */
/*! \copydoc gridSymbolFractionSize */
void setGridSymbolFractionSize(double __value);
/*! \copydoc gridSymbolFractionSize
\see see gridSymbolFractionSize for details */
/*! \copydoc gridSymbolFractionSize */
double getGridSymbolFractionSize() const;
/*! \copydoc symbolFillDerivationMode
\see see symbolFillDerivationMode for details */
/*! \copydoc symbolFillDerivationMode */
JKQTPColorDerivationMode getSymbolFillDerivationMode() const;
/*! \copydoc symbolFillDerivationMode
\see see symbolFillDerivationMode for details */
/*! \copydoc symbolFillDerivationMode */
void setSymbolFillDerivationMode(JKQTPColorDerivationMode m);
/** \copydoc JKQTPGraph::setParent() */

View File

@ -84,27 +84,21 @@ class JKQTP_LIB_EXPORT JKQTPSingleColumnSymbolsGraph: public JKQTPSingleColumnGr
/** \brief set symbol color and fill color at the same time */
void setColor(QColor col);
/*! \copydoc position
\see see position for details */
/*! \copydoc position */
void setPosition(double __value);
/*! \copydoc position
\see see position for details */
/*! \copydoc position */
double getPosition() const;
/*! \copydoc width
\see see width for details */
/*! \copydoc width */
void setWidth(double __value);
/*! \copydoc width
\see see width for details */
/*! \copydoc width */
double getWidth() const;
/*! \copydoc positionScatterStyle
\see see positionScatterStyle for details */
/*! \copydoc positionScatterStyle */
void setPositionScatterStyle(ScatterStyle __value);
/*! \copydoc positionScatterStyle
\see see positionScatterStyle for details */
/*! \copydoc positionScatterStyle */
ScatterStyle getPositionScatterStyle() const;

View File

@ -19,12 +19,9 @@ Copyright (c) 2008-2019 Jan W. Krieger (<jan@jkrieger.de>)
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "jkqtplottertools/jkqtpdrawingtools.h"
#include "jkqtplottertools/jkqtpenhancedpainter.h"
#include <QDebug>
const double JKQTPlotterDrawingTools::ABS_MIN_LINEWIDTH= 0.02;
@ -664,3 +661,116 @@ void JKQTPDrawTooltip(JKQTPEnhancedPainter &painter, double x, double y, const Q
painter.drawRect(rect);
}
}
QVector<QPolygonF> JKQTPUnifyLinesToPolygons(const QVector<QLineF> &lines, double distanceThreshold, int searchMaxSurroundingElements)
{
#ifdef JKQTBP_AUTOTIMER
JKQTPAutoOutputTimer jkaat(QString("JKQTPUnifyLinesToPolygons(%1, %2, %3)").arg(lines.size()).arg(distanceThreshold).arg(searchMaxSurroundingElements));
#endif
QList<QPolygonF> res;
res.reserve(lines.size());
// first simply convert all lines to polygons
for (const QLineF& l: lines) {
QPolygonF p;
p<<l.p1()<<l.p2();
res<<p;
}
//return res.toVector();
// clean the resulting polygon
for (QPolygonF& p: res) {
p=JKQTPCleanPolygon(p, distanceThreshold);
}
int maxIterations=100;
int iter=0;
bool found=true;
//qDebug()<<" iter "<<-1<<" -> polygons start "<<res.size();
while (found && iter<maxIterations) {
found=false;
int i=0;
while (i<res.size()-1) {
int j=i+1;
while (j<res.size() && j<i+searchMaxSurroundingElements) {
if (jkqtp_distance(res[i].first(),res[j].first())<=distanceThreshold) {
found=true;
for (int k=1; k<res[j].size(); k++) {
res[i].prepend(res[j].at(k));
}
res.removeAt(j);
} else if (jkqtp_distance(res[i].first(),res[j].last())<=distanceThreshold) {
found=true;
for (int k=res[j].size()-2; k>=0; k--) {
res[i].prepend(res[j].at(k));
}
res.removeAt(j);
} else if (jkqtp_distance(res[i].last(),res[j].first())<=distanceThreshold) {
found=true;
for (int k=1; k<res[j].size(); k++) {
res[i].append(res[j].at(k));
}
res.removeAt(j);
} else if (jkqtp_distance(res[i].last(),res[j].last())<=distanceThreshold) {
found=true;
for (int k=res[j].size()-2; k>=0; k--) {
res[i].append(res[j].at(k));
}
res.removeAt(j);
} else {
j++;
}
}
res[i]=JKQTPCleanPolygon(res[i], distanceThreshold);
i++;
}
//qDebug()<<" iter "<<iter<<" -> polygons left "<<res.size();
iter++;
}
return res.toVector();
}
QPolygonF JKQTPCleanPolygon(const QPolygonF &poly, double distanceThreshold)
{
if (poly.size()<=2) return poly;
QPolygonF p;
QPointF p0=poly[0];
p<<p0;
QVector<QPointF> inbetween;
int i=1;
while (i<poly.size()) {
if ((jkqtp_distance(poly[i], p0)<=distanceThreshold)) {
inbetween<<poly[i];
} else {
QPointF pmean(0,0);
if (inbetween.size()>0) {
for (const QPointF& pi: inbetween) {
pmean=QPointF(pmean.x()+pi.x()/static_cast<double>(inbetween.size()), pmean.y()+pi.y()/static_cast<double>(inbetween.size()));
}
} else {
pmean=poly[i];
}
p<<pmean;
p0=pmean;
inbetween.clear();
}
i++;
}
// maybe we have something left to add
QPointF pmean(0,0);
if (inbetween.size()>0) {
for (const QPointF& pi: inbetween) {
pmean=QPointF(pmean.x()+pi.x()/static_cast<double>(inbetween.size()), pmean.y()+pi.y()/static_cast<double>(inbetween.size()));
}
} else {
pmean=p0;
}
if (jkqtp_distance(pmean, poly.last())>distanceThreshold) {
p<<pmean<<poly.last();
} else {
if (p.last()!=poly.last()) p<<poly.last();
}
return p;
}

View File

@ -112,4 +112,25 @@ JKQTP_LIB_EXPORT QVector<QPointF> JKQTPDrawEllipse(double x, double y, double a,
JKQTP_LIB_EXPORT void JKQTPDrawTooltip(JKQTPEnhancedPainter& painter, double x, double y, const QRectF& rect);
/** \brief cleans a polygon by uniting all consecutive points that were closer than distanceThreshold are united
* \ingroup jkqtptools_drawing
*
* \param poly polygon to clean
* \param distanceThreshold if two end-points are closer together as this value, they are united to a single point
* \return a cleaned polygon, where all consecutive points that were closer than distanceThreshold are united
*/
JKQTP_LIB_EXPORT QPolygonF JKQTPCleanPolygon(const QPolygonF& poly, double distanceThreshold=0.3);
/** \brief takes a list of QLineF objesct \a lines and tries to combine as many of them as possible to QPolygonF objects.
* <b>Note: This method implements an incomplete algorithm with \a searchMaxSurroundingElements>0, as solving
* the complete problem is very time-consuming (cubic runtime)
* \ingroup jkqtptools_drawing
*
* \param lines line segments to unify
* \param distanceThreshold if two end-points are closer together as this value, they are united to a single point
* \param searchMaxSurroundingElements limits the search for a connected polygon to at most this number of neighbors
* \return a vector of QPolygonF objects, which contain longer line-segments formed from \a lines
*/
JKQTP_LIB_EXPORT QVector<QPolygonF> JKQTPUnifyLinesToPolygons(const QVector<QLineF>& lines, double distanceThreshold=0.3, int searchMaxSurroundingElements=10);
#endif // JKQTPDRAWINGTOOLS_H_INCLUDED

View File

@ -925,292 +925,208 @@ class JKQTP_LIB_EXPORT JKQTPColorPaletteTools {
public:
/*! \brief sets the property palette ( \copybrief palette ) to the specified \a __value.
\details Description of the parameter palette is: <BLOCKQUOTE>\copydoc palette </BLOCKQUOTE>
\see palette for more information */
/*! \copydoc palette */
inline virtual void setPalette(const JKQTPMathImageColorPalette & __value)
{
this->palette = __value;
}
/*! \brief returns the property palette ( \copybrief palette ).
\details Description of the parameter palette is: <BLOCKQUOTE>\copydoc palette </BLOCKQUOTE>
\see palette for more information */
/*! \copydoc palette */
inline virtual JKQTPMathImageColorPalette getPalette() const
{
return this->palette;
}
/*! \brief sets the property rangeMinFailAction ( \copybrief rangeMinFailAction ) to the specified \a __value.
\details Description of the parameter rangeMinFailAction is: <BLOCKQUOTE>\copydoc rangeMinFailAction </BLOCKQUOTE>
\see rangeMinFailAction for more information */
/*! \copydoc rangeMinFailAction */
inline virtual void setRangeMinFailAction(const JKQTPMathImageColorRangeFailAction & __value)
{
this->rangeMinFailAction = __value;
}
/*! \brief returns the property rangeMinFailAction ( \copybrief rangeMinFailAction ).
\details Description of the parameter rangeMinFailAction is: <BLOCKQUOTE>\copydoc rangeMinFailAction </BLOCKQUOTE>
\see rangeMinFailAction for more information */
/*! \copydoc rangeMinFailAction */
inline virtual JKQTPMathImageColorRangeFailAction getActionRangeMinFail() const
{
return this->rangeMinFailAction;
}
/*! \brief sets the property rangeMaxFailAction ( \copybrief rangeMaxFailAction ) to the specified \a __value.
\details Description of the parameter rangeMaxFailAction is: <BLOCKQUOTE>\copydoc rangeMaxFailAction </BLOCKQUOTE>
\see rangeMaxFailAction for more information */
/*! \copydoc rangeMaxFailAction */
inline virtual void setRangeMaxFailAction(const JKQTPMathImageColorRangeFailAction & __value)
{
this->rangeMaxFailAction = __value;
}
/*! \brief returns the property rangeMaxFailAction ( \copybrief rangeMaxFailAction ).
\details Description of the parameter rangeMaxFailAction is: <BLOCKQUOTE>\copydoc rangeMaxFailAction </BLOCKQUOTE>
\see rangeMaxFailAction for more information */
/*! \copydoc rangeMaxFailAction */
inline virtual JKQTPMathImageColorRangeFailAction getActionRangeMaxFail() const
{
return this->rangeMaxFailAction;
}
/*! \brief sets the property rangeMinFailColor ( \copybrief rangeMinFailColor ) to the specified \a __value.
\details Description of the parameter rangeMinFailColor is: <BLOCKQUOTE>\copydoc rangeMinFailColor </BLOCKQUOTE>
\see rangeMinFailColor for more information */
/*! \copydoc rangeMinFailColor */
inline virtual void setRangeMinFailColor(const QColor & __value)
{
this->rangeMinFailColor = __value;
}
/*! \brief returns the property rangeMinFailColor ( \copybrief rangeMinFailColor ).
\details Description of the parameter rangeMinFailColor is: <BLOCKQUOTE>\copydoc rangeMinFailColor </BLOCKQUOTE>
\see rangeMinFailColor for more information */
/*! \copydoc rangeMinFailColor */
inline virtual QColor getRangeMinFailColor() const
{
return this->rangeMinFailColor;
}
/*! \brief sets the property rangeMaxFailColor ( \copybrief rangeMaxFailColor ) to the specified \a __value.
\details Description of the parameter rangeMaxFailColor is: <BLOCKQUOTE>\copydoc rangeMaxFailColor </BLOCKQUOTE>
\see rangeMaxFailColor for more information */
/*! \copydoc rangeMaxFailColor */
inline virtual void setRangeMaxFailColor(const QColor & __value)
{
this->rangeMaxFailColor = __value;
}
/*! \brief returns the property rangeMaxFailColor ( \copybrief rangeMaxFailColor ).
\details Description of the parameter rangeMaxFailColor is: <BLOCKQUOTE>\copydoc rangeMaxFailColor </BLOCKQUOTE>
\see rangeMaxFailColor for more information */
/*! \copydoc rangeMaxFailColor */
inline virtual QColor getRangeMaxFailColor() const
{
return this->rangeMaxFailColor;
}
/*! \brief sets the property nanColor ( \copybrief nanColor ) to the specified \a __value.
\details Description of the parameter nanColor is: <BLOCKQUOTE>\copydoc nanColor </BLOCKQUOTE>
\see nanColor for more information */
/*! \copydoc nanColor */
inline virtual void setNanColor(const QColor & __value)
{
this->nanColor = __value;
}
/*! \brief returns the property nanColor ( \copybrief nanColor ).
\details Description of the parameter nanColor is: <BLOCKQUOTE>\copydoc nanColor </BLOCKQUOTE>
\see nanColor for more information */
/*! \copydoc nanColor */
inline virtual QColor getNanColor() const
{
return this->nanColor;
}
/*! \brief sets the property infColor ( \copybrief infColor ) to the specified \a __value.
\details Description of the parameter infColor is: <BLOCKQUOTE>\copydoc infColor </BLOCKQUOTE>
\see infColor for more information */
/*! \copydoc infColor */
inline virtual void setInfColor(const QColor & __value)
{
this->infColor = __value;
}
/*! \brief returns the property infColor ( \copybrief infColor ).
\details Description of the parameter infColor is: <BLOCKQUOTE>\copydoc infColor </BLOCKQUOTE>
\see infColor for more information */
/*! \copydoc infColor */
inline virtual QColor getInfColor() const
{
return this->infColor;
}
/*! \brief sets the property showColorBar ( \copybrief showColorBar ) to the specified \a __value.
\details Description of the parameter showColorBar is: <BLOCKQUOTE>\copydoc showColorBar </BLOCKQUOTE>
\see showColorBar for more information */
/*! \copydoc showColorBar */
inline virtual void setShowColorBar(bool __value)
{
this->showColorBar = __value;
}
/*! \brief returns the property showColorBar ( \copybrief showColorBar ).
\details Description of the parameter showColorBar is: <BLOCKQUOTE>\copydoc showColorBar </BLOCKQUOTE>
\see showColorBar for more information */
/*! \copydoc showColorBar */
inline virtual bool getShowColorBar() const
{
return this->showColorBar;
}
/*! \brief sets the property colorBarWidth ( \copybrief colorBarWidth ) to the specified \a __value.
\details Description of the parameter colorBarWidth is: <BLOCKQUOTE>\copydoc colorBarWidth </BLOCKQUOTE>
\see colorBarWidth for more information */
/*! \copydoc colorBarWidth */
inline virtual void setColorBarWidth(int __value)
{
this->colorBarWidth = __value;
}
/*! \brief returns the property colorBarWidth ( \copybrief colorBarWidth ).
\details Description of the parameter colorBarWidth is: <BLOCKQUOTE>\copydoc colorBarWidth </BLOCKQUOTE>
\see colorBarWidth for more information */
/*! \copydoc colorBarWidth */
inline virtual int getColorBarWidth() const
{
return this->colorBarWidth;
}
/*! \brief sets the property colorBarOffset ( \copybrief colorBarOffset ) to the specified \a __value.
\details Description of the parameter colorBarOffset is: <BLOCKQUOTE>\copydoc colorBarOffset </BLOCKQUOTE>
\see colorBarOffset for more information */
/*! \copydoc colorBarOffset */
inline virtual void setColorBarOffset(int __value)
{
this->colorBarOffset = __value;
}
/*! \brief returns the property colorBarOffset ( \copybrief colorBarOffset ).
\details Description of the parameter colorBarOffset is: <BLOCKQUOTE>\copydoc colorBarOffset </BLOCKQUOTE>
\see colorBarOffset for more information */
/*! \copydoc colorBarOffset */
inline virtual int getColorBarOffset() const
{
return this->colorBarOffset;
}
/*! \brief sets the property colorBarRelativeHeight ( \copybrief colorBarRelativeHeight ) to the specified \a __value.
\details Description of the parameter colorBarRelativeHeight is: <BLOCKQUOTE>\copydoc colorBarRelativeHeight </BLOCKQUOTE>
\see colorBarRelativeHeight for more information */
/*! \copydoc colorBarRelativeHeight */
inline virtual void setColorBarRelativeHeight(double __value)
{
this->colorBarRelativeHeight = __value;
}
/*! \brief returns the property colorBarRelativeHeight ( \copybrief colorBarRelativeHeight ).
\details Description of the parameter colorBarRelativeHeight is: <BLOCKQUOTE>\copydoc colorBarRelativeHeight </BLOCKQUOTE>
\see colorBarRelativeHeight for more information */
/*! \copydoc colorBarRelativeHeight */
inline virtual double getColorBarRelativeHeight() const
{
return this->colorBarRelativeHeight;
}
/*! \brief sets the property imageMin ( \copybrief imageMin ) to the specified \a __value.
\details Description of the parameter imageMin is: <BLOCKQUOTE>\copydoc imageMin </BLOCKQUOTE>
\see imageMin for more information */
/*! \copydoc imageMin */
inline virtual void setImageMin(double __value)
{
this->imageMin = __value;
}
/*! \brief returns the property imageMin ( \copybrief imageMin ).
\details Description of the parameter imageMin is: <BLOCKQUOTE>\copydoc imageMin </BLOCKQUOTE>
\see imageMin for more information */
/*! \copydoc imageMin */
inline virtual double getImageMin() const
{
return this->imageMin;
}
/*! \brief sets the property imageMax ( \copybrief imageMax ) to the specified \a __value.
\details Description of the parameter imageMax is: <BLOCKQUOTE>\copydoc imageMax </BLOCKQUOTE>
\see imageMax for more information */
/*! \copydoc imageMax */
inline virtual void setImageMax(double __value)
{
this->imageMax = __value;
}
/*! \brief returns the property imageMax ( \copybrief imageMax ).
\details Description of the parameter imageMax is: <BLOCKQUOTE>\copydoc imageMax </BLOCKQUOTE>
\see imageMax for more information */
/*! \copydoc imageMax */
inline virtual double getImageMax() const
{
return this->imageMax;
}
/*! \brief sets the property autoImageRange ( \copybrief autoImageRange ) to the specified \a __value.
\details Description of the parameter autoImageRange is: <BLOCKQUOTE>\copydoc autoImageRange </BLOCKQUOTE>
\see autoImageRange for more information */
/*! \copydoc autoImageRange */
inline virtual void setAutoImageRange(bool __value)
{
this->autoImageRange = __value;
}
/*! \brief returns the property autoImageRange ( \copybrief autoImageRange ).
\details Description of the parameter autoImageRange is: <BLOCKQUOTE>\copydoc autoImageRange </BLOCKQUOTE>
\see autoImageRange for more information */
/*! \copydoc autoImageRange */
inline virtual bool getAutoImageRange() const
{
return this->autoImageRange;
}
/*! \brief sets the property imageName ( \copybrief imageName ) to the specified \a __value.
\details Description of the parameter imageName is: <BLOCKQUOTE>\copydoc imageName </BLOCKQUOTE>
\see imageName for more information */
/*! \copydoc imageName */
inline virtual void setImageName(const QString & __value)
{
this->imageName = __value;
}
/*! \brief returns the property imageName ( \copybrief imageName ).
\details Description of the parameter imageName is: <BLOCKQUOTE>\copydoc imageName </BLOCKQUOTE>
\see imageName for more information */
/*! \copydoc imageName */
inline virtual QString getImageName() const
{
return this->imageName;
}
/*! \brief sets the property imageNameFontName ( \copybrief imageNameFontName ) to the specified \a __value.
\details Description of the parameter imageNameFontName is: <BLOCKQUOTE>\copydoc imageNameFontName </BLOCKQUOTE>
\see imageNameFontName for more information */
/*! \copydoc imageNameFontName */
inline virtual void setImageNameFontName(const QString & __value)
{
this->imageNameFontName = __value;
}
/*! \brief returns the property imageNameFontName ( \copybrief imageNameFontName ).
\details Description of the parameter imageNameFontName is: <BLOCKQUOTE>\copydoc imageNameFontName </BLOCKQUOTE>
\see imageNameFontName for more information */
/*! \copydoc imageNameFontName */
inline virtual QString getImageNameFontName() const
{
return this->imageNameFontName;
}
/*! \brief sets the property imageNameFontSize ( \copybrief imageNameFontSize ) to the specified \a __value.
\details Description of the parameter imageNameFontSize is: <BLOCKQUOTE>\copydoc imageNameFontSize </BLOCKQUOTE>
\see imageNameFontSize for more information */
/*! \copydoc imageNameFontSize */
inline virtual void setImageNameFontSize(double __value)
{
this->imageNameFontSize = __value;
}
/*! \brief returns the property imageNameFontSize ( \copybrief imageNameFontSize ).
\details Description of the parameter imageNameFontSize is: <BLOCKQUOTE>\copydoc imageNameFontSize </BLOCKQUOTE>
\see imageNameFontSize for more information */
/*! \copydoc imageNameFontSize */
inline virtual double getImageNameFontSize() const
{
return this->imageNameFontSize;
}
/*! \brief returns the property colorBarRightAxis ( \copybrief colorBarRightAxis ).
\details Description of the parameter colorBarRightAxis is: <BLOCKQUOTE>\copydoc colorBarRightAxis </BLOCKQUOTE>.
\see colorBarRightAxis for more information */
/*! \copydoc colorBarRightAxis */
inline JKQTPVerticalIndependentAxis* getColorBarRightAxis() {
return this->colorBarRightAxis;
}
/*! \brief returns the property colorBarTopAxis ( \copybrief colorBarTopAxis ).
\details Description of the parameter colorBarTopAxis is: <BLOCKQUOTE>\copydoc colorBarTopAxis </BLOCKQUOTE>.
\see colorBarTopAxis for more information */
/*! \copydoc colorBarTopAxis */
inline JKQTPHorizontalIndependentAxis* getColorBarTopAxis() {
return this->colorBarTopAxis;
}
/*! \brief returns the property colorBarRightAxis ( \copybrief colorBarRightAxis ).
\details Description of the parameter colorBarRightAxis is: <BLOCKQUOTE>\copydoc colorBarRightAxis </BLOCKQUOTE>.
\see colorBarRightAxis for more information */
/*! \copydoc colorBarRightAxis */
inline const JKQTPVerticalIndependentAxis* getColorBarRightAxis() const {
return this->colorBarRightAxis;
}
/*! \brief returns the property colorBarTopAxis ( \copybrief colorBarTopAxis ).
\details Description of the parameter colorBarTopAxis is: <BLOCKQUOTE>\copydoc colorBarTopAxis </BLOCKQUOTE>.
\see colorBarTopAxis for more information */
/*! \copydoc colorBarTopAxis */
inline const JKQTPHorizontalIndependentAxis* getColorBarTopAxis() const {
return this->colorBarTopAxis;
}
/*! \brief sets the property colorBarTopVisible ( \copybrief colorBarTopVisible ) to the specified \a __value.
\details Description of the parameter colorBarTopVisible is: <BLOCKQUOTE>\copydoc colorBarTopVisible </BLOCKQUOTE>
\see colorBarTopVisible for more information */
/*! \copydoc colorBarTopVisible */
inline virtual void setColorBarTopVisible(bool __value)
{
this->colorBarTopVisible = __value;
}
/*! \brief returns the property colorBarTopVisible ( \copybrief colorBarTopVisible ).
\details Description of the parameter colorBarTopVisible is: <BLOCKQUOTE>\copydoc colorBarTopVisible </BLOCKQUOTE>
\see colorBarTopVisible for more information */
/*! \copydoc colorBarTopVisible */
inline virtual bool getColorBarTopVisible() const
{
return this->colorBarTopVisible;
}
/*! \brief sets the property colorBarRightVisible ( \copybrief colorBarRightVisible ) to the specified \a __value.
\details Description of the parameter colorBarRightVisible is: <BLOCKQUOTE>\copydoc colorBarRightVisible </BLOCKQUOTE>
\see colorBarRightVisible for more information */
/*! \copydoc colorBarRightVisible */
inline virtual void setColorBarRightVisible(bool __value)
{
this->colorBarRightVisible = __value;
}
/*! \brief returns the property colorBarRightVisible ( \copybrief colorBarRightVisible ).
\details Description of the parameter colorBarRightVisible is: <BLOCKQUOTE>\copydoc colorBarRightVisible </BLOCKQUOTE>
\see colorBarRightVisible for more information */
/*! \copydoc colorBarRightVisible */
inline virtual bool getColorBarRightVisible() const
{
return this->colorBarRightVisible;

View File

@ -827,16 +827,12 @@ class JKQTPMathParser
/** \brief class destructor */
virtual ~JKQTPMathParser();
/*! \brief sets the property data ( \copybrief data ) to the specified \a __value.
\details Description of the parameter data is: <BLOCKQUOTE>\copydoc data </BLOCKQUOTE>
\see data for more information */
/*! \copydoc data */
inline virtual void setData(void* __value)
{
this->data = __value;
}
/*! \brief returns the property data ( \copybrief data ).
\details Description of the parameter data is: <BLOCKQUOTE>\copydoc data </BLOCKQUOTE>
\see data for more information */
/*! \copydoc data */
inline virtual void* getData() const
{
return this->data;

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB