diff --git a/doc/dox/whatsnew.dox b/doc/dox/whatsnew.dox
index d75c7fd76a..8120b1a1b4 100644
--- a/doc/dox/whatsnew.dox
+++ b/doc/dox/whatsnew.dox
@@ -20,6 +20,7 @@ Changes, compared to \ref page_whatsnew_V2019_11 "v2019.11" include:
fixed issue #41: Build error when JKQtPlotter_BUILD_INCLUDE_XITS_FONTS set to OFF , thanks to user:smistad
fixed issue #37: CMake installs things into $PREFIX/doc/*.txt , thanks to user:certik
fixed issue #45: Build error on mac jkqtfastplotter.cpp:342:28: Variable has incomplete type 'QPainterPath', thanks to user:abdedixit
+ renamed/breaking change: renamed JKQTPColorPaletteStyleAndToolsMixin::setPalette() -> JKQTPColorPaletteStyleAndToolsMixin::setColorPalette()
removed/breaking change: removed the usage of some deprecated functions and objects (e.g. QMatrix)
removed/breaking change: removed the overlay elements (derived from JKQTPOverlayElement), which were not very well set up and are more confusing than useful.
improved/breaking change: geometric objects now use an adaptive drawing algorithm to represent curves (before e.g. ellipses were always separated into a fixed number of line-segments)
diff --git a/examples/contourplot/contourplot.cpp b/examples/contourplot/contourplot.cpp
index eadb675287..59a53437d1 100644
--- a/examples/contourplot/contourplot.cpp
+++ b/examples/contourplot/contourplot.cpp
@@ -91,7 +91,7 @@ int main(int argc, char* argv[])
graph->setWidth(w);
graph->setHeight(h);
// color-map is "BlueGreenRed"
- graph->setPalette(JKQTPMathImageBlueGreenRed);
+ graph->setColorPalette(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
diff --git a/examples/imageplot/imageplot.cpp b/examples/imageplot/imageplot.cpp
index af873de518..316a6c7a99 100644
--- a/examples/imageplot/imageplot.cpp
+++ b/examples/imageplot/imageplot.cpp
@@ -72,7 +72,7 @@ int main(int argc, char* argv[])
graph->setWidth(w);
graph->setHeight(h);
// color-map is "MATLAB"
- graph->setPalette(JKQTPMathImageMATLAB);
+ graph->setColorPalette(JKQTPMathImageMATLAB);
// get coordinate axis of color-bar and set its label
graph->getColorBarRightAxis()->setAxisLabel("light intensity [A.U.]");
// determine min/max of data automatically and use it to set the range of the color-scale
diff --git a/examples/imageplot_modifier/imageplot_modifier.cpp b/examples/imageplot_modifier/imageplot_modifier.cpp
index 0789f3ff26..300fceacc0 100644
--- a/examples/imageplot_modifier/imageplot_modifier.cpp
+++ b/examples/imageplot_modifier/imageplot_modifier.cpp
@@ -70,7 +70,7 @@ int main(int argc, char* argv[])
graph->setWidth(NX);
graph->setHeight(NY);
// color-map is "MATLAB"
- graph->setPalette(JKQTPMathImageMATLAB);
+ graph->setColorPalette(JKQTPMathImageMATLAB);
// determine min/max of data automatically and use it to set the range of the color-scale
graph->setAutoImageRange(true);
diff --git a/examples/imageplot_nodatastore/imageplot_nodatastore.cpp b/examples/imageplot_nodatastore/imageplot_nodatastore.cpp
index 63c0177501..e37e3c4069 100644
--- a/examples/imageplot_nodatastore/imageplot_nodatastore.cpp
+++ b/examples/imageplot_nodatastore/imageplot_nodatastore.cpp
@@ -60,7 +60,7 @@ int main(int argc, char* argv[])
graph->setWidth(w);
graph->setHeight(h);
// color-map is "BLUEYELLOW"
- graph->setPalette(JKQTPMathImageBLUEYELLOW);
+ graph->setColorPalette(JKQTPMathImageBLUEYELLOW);
// get coordinate axis of color-bar and set its label
graph->getColorBarRightAxis()->setAxisLabel("light intensity [A.U.]");
// determine min/max of data automatically and use it to set the range of the color-scale
diff --git a/examples/imageplot_userpal/imageplot_userpal.cpp b/examples/imageplot_userpal/imageplot_userpal.cpp
index f656a4b774..85057dd361 100644
--- a/examples/imageplot_userpal/imageplot_userpal.cpp
+++ b/examples/imageplot_userpal/imageplot_userpal.cpp
@@ -123,9 +123,9 @@ int main(int argc, char* argv[])
graph->setWidth(1);
graph->setHeight(1);
// color-map is taken from cmbPalette
- plot->connect(cmbPalette, &JKQTPMathImageColorPaletteComboBox::currentPaletteChanged,[&](JKQTPMathImageColorPalette p) { graph->setPalette(p); plot->redrawPlot(); });
- graph->setPalette(static_cast(userpalette_id));
- cmbPalette->setCurrentColorPalette(graph->getPalette());
+ plot->connect(cmbPalette, &JKQTPMathImageColorPaletteComboBox::currentPaletteChanged,[&](JKQTPMathImageColorPalette p) { graph->setColorPalette(p); plot->redrawPlot(); });
+ graph->setColorPalette(static_cast(userpalette_id));
+ cmbPalette->setCurrentColorPalette(graph->getColorPalette());
// 4. add the graphs to the plot, so it is actually displayed
diff --git a/examples/jkqtplot_test/TestWidgetContourPlots.cpp b/examples/jkqtplot_test/TestWidgetContourPlots.cpp
index dbf6c1d4a8..efb3d48e8f 100644
--- a/examples/jkqtplot_test/TestWidgetContourPlots.cpp
+++ b/examples/jkqtplot_test/TestWidgetContourPlots.cpp
@@ -69,7 +69,7 @@ TestWidgetContourPlots::TestWidgetContourPlots(QWidget *parent) :
densityplot->setHeight(1.1);
densityplot->setNx(histAlexNx);
densityplot->setNy(histAlexNy);
- densityplot->setPalette(JKQTPMathImageINVERTED_OCEAN);
+ densityplot->setColorPalette(JKQTPMathImageINVERTED_OCEAN);
densityplot->setImageColumn(colHist2D);
densityplot->setInfColor(Qt::transparent);
densityplot->setNanColor(Qt::transparent);
@@ -83,7 +83,7 @@ TestWidgetContourPlots::TestWidgetContourPlots(QWidget *parent) :
densityplot->setHeight(1.1);
densityplot->setNx(histAlexNx);
densityplot->setNy(histAlexNy);
- densityplot->setPalette(JKQTPMathImageINVERTED_OCEAN);
+ densityplot->setColorPalette(JKQTPMathImageINVERTED_OCEAN);
densityplot->setImageColumn(colHist2D);
densityplot->setTitle("density plot");
plotContour->addGraph(densityplot);
diff --git a/examples/jkqtplot_test/TestWidgetImages.cpp b/examples/jkqtplot_test/TestWidgetImages.cpp
index f6ade688f2..563970ec03 100644
--- a/examples/jkqtplot_test/TestWidgetImages.cpp
+++ b/examples/jkqtplot_test/TestWidgetImages.cpp
@@ -119,13 +119,13 @@ TestWidgetImages::TestWidgetImages(QWidget *parent) :
void TestWidgetImages::setImgPalette(int index)
{
- pimg3->setPalette(index);
+ pimg3->setColorPalette(index);
plotImg->redrawPlot();
}
void TestWidgetImages::setImgPalette1(int index)
{
- pimg2->setPalette(index);
+ pimg2->setColorPalette(index);
plotImg->redrawPlot();
}
diff --git a/examples/parametriccurve/parametriccurve.cpp b/examples/parametriccurve/parametriccurve.cpp
index b76c5373fd..915f434765 100644
--- a/examples/parametriccurve/parametriccurve.cpp
+++ b/examples/parametriccurve/parametriccurve.cpp
@@ -56,7 +56,7 @@ int main(int argc, char* argv[])
graph2->setXColumn(columnX);
graph2->setYColumn(columnY);
graph2->setColorColumn(columnR);
- graph2->setPalette(JKQTPMathImageMATLAB);
+ graph2->setColorPalette(JKQTPMathImageMATLAB);
graph2->setSymbolType(JKQTPNoSymbol);
graph2->setDrawLine(true);
graph2->setTitle("colored spiral");
diff --git a/examples/paramscatterplot/paramscatterplot.cpp b/examples/paramscatterplot/paramscatterplot.cpp
index 6677c5c985..c2628c9429 100644
--- a/examples/paramscatterplot/paramscatterplot.cpp
+++ b/examples/paramscatterplot/paramscatterplot.cpp
@@ -89,7 +89,7 @@ int main(int argc, char* argv[])
graph2->setXColumn(columnX);
graph2->setYColumn(columnY2);
graph2->setColorColumn(columnC);
- graph2->setPalette(JKQTPMathImageRYGB);
+ graph2->setColorPalette(JKQTPMathImageRYGB);
graph2->setSymbolType(JKQTPFilledRect);
graph2->setDrawLine(true);
graph2->setTitle("2: color");
@@ -129,7 +129,7 @@ int main(int argc, char* argv[])
graph5->setYColumn(columnY5);
graph5->setColorColumn(columnC);
graph5->setSizeColumn(columnS);
- graph5->setPalette(JKQTPMathImageBLUEYELLOW);
+ graph5->setColorPalette(JKQTPMathImageBLUEYELLOW);
graph5->setDrawLine(true);
graph5->setTitle("5: color+size");
graph5->getColorBarRightAxis()->setAxisLabel("color scale for graph5");
@@ -157,7 +157,7 @@ int main(int argc, char* argv[])
graph7->setLinewidthColumn(columnLW);
graph7->setDrawLine(true);
graph7->setColorColumn(columnC);
- graph7->setPalette(JKQTPMathImageBLUEYELLOW);
+ graph7->setColorPalette(JKQTPMathImageBLUEYELLOW);
graph7->setSymbolType(JKQTPNoSymbol);
graph7->setColorBarRightVisible(false);
graph7->setColorBarTopVisible(false);
diff --git a/examples/paramscatterplot_image/paramscatterplot_image.cpp b/examples/paramscatterplot_image/paramscatterplot_image.cpp
index 82419829bf..cca6471b0f 100644
--- a/examples/paramscatterplot_image/paramscatterplot_image.cpp
+++ b/examples/paramscatterplot_image/paramscatterplot_image.cpp
@@ -55,7 +55,7 @@ int main(int argc, char* argv[])
graph1->setSymbolColumn(columnS);
graph1->setSymbolType(JKQTPFilledTriangle);
graph1->setColorColumn(columnG);
- graph1->setPalette(JKQTPMathImageOCEAN);
+ graph1->setColorPalette(JKQTPMathImageOCEAN);
graph1->setDrawLine(false);
graph1->setTitle("");
plot.addGraph(graph1);
diff --git a/lib/jkqtplotter/graphs/jkqtpscatter.cpp b/lib/jkqtplotter/graphs/jkqtpscatter.cpp
index d0c5ce8579..c4ac90f40b 100644
--- a/lib/jkqtplotter/graphs/jkqtpscatter.cpp
+++ b/lib/jkqtplotter/graphs/jkqtpscatter.cpp
@@ -511,7 +511,7 @@ void JKQTPXYParametrizedScatterGraph::drawKeyMarker(JKQTPEnhancedPainter &painte
} else {
QImage img;
double colorval[]={0,1};
- JKQTPImageTools::array2image(colorval, 2, 1, img, getPalette(), double(0.0), double(1.0));
+ JKQTPImageTools::array2image(colorval, 2, 1, img, getColorPalette(), double(0.0), double(1.0));
color1=img.pixel(0,0);
color2=img.pixel(1,0);
}
diff --git a/lib/jkqtplotter/jkqtpimagetools.cpp b/lib/jkqtplotter/jkqtpimagetools.cpp
index 589d6fddb2..0cf48c59c7 100644
--- a/lib/jkqtplotter/jkqtpimagetools.cpp
+++ b/lib/jkqtplotter/jkqtpimagetools.cpp
@@ -320,7 +320,7 @@ QImage JKQTPColorPaletteStyleAndToolsMixin::getPaletteKeyImage(JKQTPMathImageCol
}
-void JKQTPColorPaletteStyleAndToolsMixin::setPalette(int pal) {
+void JKQTPColorPaletteStyleAndToolsMixin::setColorPalette(int pal) {
palette=static_cast(pal);
}
@@ -331,12 +331,12 @@ void JKQTPColorPaletteStyleAndToolsMixin::cbSetParent(JKQTBasePlotter* parent) {
}
-void JKQTPColorPaletteStyleAndToolsMixin::setPalette(const JKQTPMathImageColorPalette &__value)
+void JKQTPColorPaletteStyleAndToolsMixin::setColorPalette(const JKQTPMathImageColorPalette &__value)
{
this->palette = __value;
}
-JKQTPMathImageColorPalette JKQTPColorPaletteStyleAndToolsMixin::getPalette() const
+JKQTPMathImageColorPalette JKQTPColorPaletteStyleAndToolsMixin::getColorPalette() const
{
return this->palette;
}
diff --git a/lib/jkqtplotter/jkqtpimagetools.h b/lib/jkqtplotter/jkqtpimagetools.h
index d1e0aea7c7..fedc0087c6 100644
--- a/lib/jkqtplotter/jkqtpimagetools.h
+++ b/lib/jkqtplotter/jkqtpimagetools.h
@@ -98,11 +98,12 @@ class JKQTPLOTTER_LIB_EXPORT JKQTPColorPaletteStyleAndToolsMixin {
/*! \copydoc palette */
- void setPalette(int pal);
+ void setColorPalette(int pal);
/*! \copydoc palette */
- void setPalette(const JKQTPMathImageColorPalette & __value);
+ void setColorPalette(const JKQTPMathImageColorPalette & __value);
/*! \copydoc palette */
- JKQTPMathImageColorPalette getPalette() const;
+ JKQTPMathImageColorPalette getColorPalette() const;
+
/*! \copydoc rangeMinFailAction */
void setRangeMinFailAction(const JKQTPMathImageColorRangeFailAction & __value);
/*! \copydoc rangeMinFailAction */