diff --git a/appveyor.yml b/appveyor.yml index e01dfa5089..9fc0f549ca 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -47,10 +47,10 @@ install: - echo "BUILD ID Qt%QTVER%_%QTABI%_%APPVEYOR_BUILD_VERSION%_%CONFIGURATION%" build_script: - - dir "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include" - - type "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include\random" - - dir "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" - - type "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\random" +# - dir "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include" +# - type "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include\random" +# - dir "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" +# - type "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\random" - mkdir build - cd build - echo "Call QMake..." diff --git a/examples/jkqtfastplotter_test/jkqtfastplotter_test_testmain.cpp b/examples/jkqtfastplotter_test/jkqtfastplotter_test_testmain.cpp index 7559035a25..f79f325201 100644 --- a/examples/jkqtfastplotter_test/jkqtfastplotter_test_testmain.cpp +++ b/examples/jkqtfastplotter_test/jkqtfastplotter_test_testmain.cpp @@ -32,19 +32,19 @@ TestMain::TestMain(QWidget *parent) : w->setLayout(gl); JKQTFastPlotter* pl1=new JKQTFastPlotter(w); - pl1->set_maintainAspectRatio(true); + pl1->setMaintainAspectRatio(true); gl->addWidget(pl1, 0, 0); JKQTFastPlotter* pl2=new JKQTFastPlotter(w); pl2->setMaximumWidth(100); pl2->set_synchronizeY(pl1); pl2->set_yAxisLabelVisible(false); - pl2->set_plotBorderLeft(10); - pl2->set_plotBorderRight(2); - w->connect(pl1, SIGNAL(replotting()), pl2, SLOT(update_plot())); + pl2->setPlotBorderLeft(10); + pl2->setPlotBorderRight(2); + w->connect(pl1, SIGNAL(replotting()), pl2, SLOT(replotPlot())); gl->addWidget(pl2, 0, 1); JKQTFastPlotter* pl3=new JKQTFastPlotter(w); pl3->set_synchronizeX(pl1); - w->connect(pl1, SIGNAL(replotting()), pl3, SLOT(update_plot())); + w->connect(pl1, SIGNAL(replotting()), pl3, SLOT(replotPlot())); gl->addWidget(pl3, 1, 0); diff --git a/examples/jkqtmathtext_simpletest/README.md b/examples/jkqtmathtext_simpletest/README.md index 517ccbd9a6..d49ddf784a 100644 --- a/examples/jkqtmathtext_simpletest/README.md +++ b/examples/jkqtmathtext_simpletest/README.md @@ -42,7 +42,7 @@ int main(int argc, char* argv[]) // were included in the *.pro-file JKQTMathText mathText; mathText.useXITS(); - mathText.set_fontSize(20); + mathText.setFontSize(20); // 3. now we parse some LaTeX code (the Schroedinger's equation), so // we can draw it onto the QPixmap in the next step diff --git a/examples/jkqtmathtext_simpletest/jkqtmathtext_simpletest.cpp b/examples/jkqtmathtext_simpletest/jkqtmathtext_simpletest.cpp index 3d8fb78de8..211ac451f5 100644 --- a/examples/jkqtmathtext_simpletest/jkqtmathtext_simpletest.cpp +++ b/examples/jkqtmathtext_simpletest/jkqtmathtext_simpletest.cpp @@ -26,7 +26,7 @@ int main(int argc, char* argv[]) // were included in the *.pro-file JKQTMathText mathText; mathText.useXITS(); - mathText.set_fontSize(20); + mathText.setFontSize(20); // 3. now we parse some LaTeX code (the Schroedinger's equation), so // we can draw it onto the QPixmap in the next step diff --git a/examples/jkqtmathtext_test/jkqtmathtext_test.cpp b/examples/jkqtmathtext_test/jkqtmathtext_test.cpp index 17a9c59fa9..82bd09640b 100644 --- a/examples/jkqtmathtext_test/jkqtmathtext_test.cpp +++ b/examples/jkqtmathtext_test/jkqtmathtext_test.cpp @@ -68,7 +68,7 @@ void timingTest(QPainter& painter, QString text, QString name, double fontSize) for (int i=0; i"+mt.toHtml(&okh)+"


"); @@ -141,25 +141,25 @@ int main(int argc, char* argv[]) std::cout<"+mt.toHtml(&okh)+"


"); qDebug()<<"HTML2: ---------------------------------------------\n"<"+mt.toHtml(&okh)+"


"); qDebug()<<"HTML2: ---------------------------------------------\n"<get_decoration())); if (decoN->get_child()) ti->addChild(createTree(decoN->get_child(), ti)); } else if (matrixN) { - int l=matrixN->get_lines(); + int l=matrixN->getLines(); int c=matrixN->get_columns(); name=QString("MTmatrixNode: l*c=%1*%2").arg(l).arg(c); QVector > children=matrixN->get_children(); @@ -235,7 +235,7 @@ QTreeWidgetItem *TestForm::createTree(JKQTMathText::MTnode *node, QTreeWidgetIte name=QString("MTsqrtNode: deg=%1").arg(sqrtN->get_degree()); if (sqrtN->get_child()) ti->addChild(createTree(sqrtN->get_child(), ti)); } else if (braceN) { - name=QString("MTbraceNode: l='%1', r='%2', showR=%3").arg(braceN->get_openbrace()).arg(braceN->get_closebrace()).arg(braceN->get_showRightBrace()); + name=QString("MTbraceNode: l='%1', r='%2', showR=%3").arg(braceN->get_openbrace()).arg(braceN->get_closebrace()).arg(braceN->getShowRightBrace()); if (braceN->get_child()) ti->addChild(createTree(braceN->get_child(), ti)); } else if (superN) { name=QString("MTsuperscriptNode"); @@ -321,12 +321,12 @@ void TestForm::updateMath() ht.start(); - mt.set_fontRoman(ui->cmbUnicodeSerif->currentFont().family()); - mt.set_fontMathRoman(ui->cmbUnicodeSerif->currentFont().family()); - mt.set_fontSans(ui->cmbUnicodeSans->currentFont().family()); - mt.set_fontMathSans(ui->cmbUnicodeSans->currentFont().family()); - mt.set_fontTypewriter(ui->cmbUnicodeFixed->currentFont().family()); - mt.set_fontSymbol(ui->cmbUnicodeSymbol->currentFont().family()); + mt.setFontRoman(ui->cmbUnicodeSerif->currentFont().family()); + mt.setFontMathRoman(ui->cmbUnicodeSerif->currentFont().family()); + mt.setFontSans(ui->cmbUnicodeSans->currentFont().family()); + mt.setFontMathSans(ui->cmbUnicodeSans->currentFont().family()); + mt.setFontTypewriter(ui->cmbUnicodeFixed->currentFont().family()); + mt.setFontSymbol(ui->cmbUnicodeSymbol->currentFont().family()); switch (ui->cmbFont->currentIndex()) { case 1: mt.useXITS(); break; @@ -359,7 +359,7 @@ void TestForm::updateMath() bool ok=true; int size=sl[i].trimmed().toUInt(&ok); if (!ok) size=10+i*5; - mt.set_fontSize(size); + mt.setFontSize(size); double durationSizingMS=0, durationTimingMS=0; Y+=draw(painter, X1, Y, mt, QString("%1, %2, %3pt").arg(ui->cmbTestset->currentText()).arg(ui->cmbFont->currentText()).arg(size), durationSizingMS, durationTimingMS); diff --git a/examples/jkqtplot_test/TestWidgetBarcharts.cpp b/examples/jkqtplot_test/TestWidgetBarcharts.cpp index d1986fc834..bb7a893063 100644 --- a/examples/jkqtplot_test/TestWidgetBarcharts.cpp +++ b/examples/jkqtplot_test/TestWidgetBarcharts.cpp @@ -18,12 +18,12 @@ TestWidgetBarcharts::TestWidgetBarcharts(QWidget *parent) : setLayout(barchartLayout); resize(1000, 800); plotBarchart=new JKQTPlotter(true, this); - plotBarchart->set_doDrawing(false); - plotBarchart->get_plotter()->set_plotLabel(tr("\\textbf{bar charts}")); + plotBarchart->setPlotUpdateEnabled(false); + plotBarchart->getPlotter()->setPlotLabel(tr("\\textbf{bar charts}")); plotBarchart->setObjectName("plotBarchart"); - plotBarchart->get_plotter()->set_userSettigsFilename(QApplication::applicationDirPath()+"/usersettings.ini", "plot_peaks/"); - plotBarchart->get_plotter()->get_xAxis()->set_labelType(JKQTPCALTdate); - plotBarchart->get_plotter()->get_xAxis()->set_tickDateFormat("dd. MMM yyyy"); + plotBarchart->getPlotter()->setUserSettigsFilename(QApplication::applicationDirPath()+"/usersettings.ini", "plot_peaks/"); + plotBarchart->getPlotter()->getXAxis()->set_labelType(JKQTPCALTdate); + plotBarchart->getPlotter()->getXAxis()->set_tickDateFormat("dd. MMM yyyy"); barchartLayout->addWidget(plotBarchart); @@ -47,16 +47,16 @@ TestWidgetBarcharts::TestWidgetBarcharts(QWidget *parent) : size_t bcpy2=plotBarchart->getDatastore()->addCopiedColumn(dataBCY2, "y2"); size_t bcpye2=plotBarchart->getDatastore()->addCopiedColumn(dataBCYE2, "ye2"); - JKQTPBarVerticalErrorGraph* plteBar1=new JKQTPBarVerticalErrorGraph(plotBarchart->get_plotter()); + JKQTPBarVerticalErrorGraph* plteBar1=new JKQTPBarVerticalErrorGraph(plotBarchart->getPlotter()); plteBar1->set_title(tr("bars 1")); plteBar1->set_xColumn(bcpxd); plteBar1->set_yColumn(bcpy1); plteBar1->set_yErrorColumn(bcpye1); plteBar1->set_width(0.45); plteBar1->set_shift(-0.25); - plotBarchart->get_plotter()->addGraph(plteBar1); + plotBarchart->getPlotter()->addGraph(plteBar1); - JKQTPBarVerticalErrorGraph* plteBar2=new JKQTPBarVerticalErrorGraph(plotBarchart->get_plotter()); + JKQTPBarVerticalErrorGraph* plteBar2=new JKQTPBarVerticalErrorGraph(plotBarchart->getPlotter()); plteBar2->set_xColumn(bcpxd); plteBar2->set_yColumn(bcpy2); plteBar2->set_yErrorColumn(bcpye2); @@ -65,33 +65,33 @@ TestWidgetBarcharts::TestWidgetBarcharts(QWidget *parent) : plteBar2->set_shift(0.25); plteBar2->set_baseline(0.5); plteBar2->set_yErrorSymmetric(false); - plotBarchart->get_plotter()->addGraph(plteBar2); + plotBarchart->getPlotter()->addGraph(plteBar2); plteBar2->autoscaleBarWidthAndShift(); - plotBarchart->set_doDrawing(true); + plotBarchart->setPlotUpdateEnabled(true); plotBarchart->zoomToFit(); plotBarchart2=new JKQTPlotter(false, this, plotBarchart->getDatastore()); - plotBarchart2->set_doDrawing(false); - plotBarchart2->get_plotter()->set_plotLabel(tr("\\textbf{bar charts}")); + plotBarchart2->setPlotUpdateEnabled(false); + plotBarchart2->getPlotter()->setPlotLabel(tr("\\textbf{bar charts}")); plotBarchart2->setObjectName("plotBarchart2"); - plotBarchart2->get_plotter()->set_userSettigsFilename(QApplication::applicationDirPath()+"/usersettings.ini", "plot_peaks/"); + plotBarchart2->getPlotter()->setUserSettigsFilename(QApplication::applicationDirPath()+"/usersettings.ini", "plot_peaks/"); barchartLayout->addWidget(plotBarchart2); - JKQTPBarHorizontalErrorGraph* plteBar3=new JKQTPBarHorizontalErrorGraph(plotBarchart2->get_plotter()); + JKQTPBarHorizontalErrorGraph* plteBar3=new JKQTPBarHorizontalErrorGraph(plotBarchart2->getPlotter()); plteBar3->set_title(tr("bars 1")); plteBar3->set_yColumn(bcpx); plteBar3->set_xColumn(bcpy1); plteBar3->set_xErrorColumn(bcpye1); plteBar3->set_width(0.45); plteBar3->set_shift(-0.25); - plotBarchart2->get_plotter()->addGraph(plteBar3); + plotBarchart2->getPlotter()->addGraph(plteBar3); - JKQTPBarHorizontalErrorGraph* plteBar4=new JKQTPBarHorizontalErrorGraph(plotBarchart2->get_plotter()); + JKQTPBarHorizontalErrorGraph* plteBar4=new JKQTPBarHorizontalErrorGraph(plotBarchart2->getPlotter()); plteBar4->set_yColumn(bcpx); plteBar4->set_xColumn(bcpy2); plteBar4->set_xErrorColumn(bcpye2); @@ -99,10 +99,10 @@ TestWidgetBarcharts::TestWidgetBarcharts(QWidget *parent) : plteBar4->set_width(0.45); plteBar4->set_shift(0.25); plteBar4->set_xErrorSymmetric(false); - plotBarchart2->get_plotter()->addGraph(plteBar4); + plotBarchart2->getPlotter()->addGraph(plteBar4); plteBar4->autoscaleBarWidthAndShift(0.9, 1); - plotBarchart2->set_doDrawing(true); + plotBarchart2->setPlotUpdateEnabled(true); plotBarchart2->zoomToFit(); chkBarLog=new QCheckBox(tr("log-log plots"), this); @@ -134,22 +134,22 @@ TestWidgetBarcharts::TestWidgetBarcharts(QWidget *parent) : void TestWidgetBarcharts::setBarchartLogLog(bool checked) { - plotBarchart->get_xAxis()->set_logAxis(checked); - plotBarchart->get_yAxis()->set_logAxis(checked); + plotBarchart->getXAxis()->set_logAxis(checked); + plotBarchart->getYAxis()->set_logAxis(checked); plotBarchart->zoomToFit(); - plotBarchart2->get_xAxis()->set_logAxis(checked); - plotBarchart2->get_yAxis()->set_logAxis(checked); + plotBarchart2->getXAxis()->set_logAxis(checked); + plotBarchart2->getYAxis()->set_logAxis(checked); plotBarchart2->zoomToFit(); } void TestWidgetBarcharts::setBarchartAngele(int angle) { - plotBarchart->get_xAxis()->set_tickLabelAngle(angle); - plotBarchart->get_xAxis()->set_drawMode2(JKQTPCADMcomplete); + plotBarchart->getXAxis()->set_tickLabelAngle(angle); + plotBarchart->getXAxis()->set_drawMode2(JKQTPCADMcomplete); } void TestWidgetBarcharts::setBarchartAngele2(int angle) { - plotBarchart->get_yAxis()->set_tickLabelAngle(angle); - plotBarchart->get_yAxis()->set_drawMode2(JKQTPCADMcomplete); + plotBarchart->getYAxis()->set_tickLabelAngle(angle); + plotBarchart->getYAxis()->set_drawMode2(JKQTPCADMcomplete); } diff --git a/examples/jkqtplot_test/TestWidgetContourPlots.cpp b/examples/jkqtplot_test/TestWidgetContourPlots.cpp index 60011cc58d..a1d0886d4b 100644 --- a/examples/jkqtplot_test/TestWidgetContourPlots.cpp +++ b/examples/jkqtplot_test/TestWidgetContourPlots.cpp @@ -17,18 +17,18 @@ TestWidgetContourPlots::TestWidgetContourPlots(QWidget *parent) : QHBoxLayout* layoutContour=new QHBoxLayout(this); setLayout(layoutContour); JKQTPlotter* plotContour=new JKQTPlotter(true, this); - plotContour->set_doDrawing(false); - plotContour->get_plotter()->set_plotLabel(tr("\\textbf{hist contour plot}")); + plotContour->setPlotUpdateEnabled(false); + plotContour->getPlotter()->setPlotLabel(tr("\\textbf{hist contour plot}")); plotContour->setObjectName("contour"); - plotContour->get_plotter()->set_userSettigsFilename(QApplication::applicationDirPath()+"/usersettings.ini", "contour/"); + plotContour->getPlotter()->setUserSettigsFilename(QApplication::applicationDirPath()+"/usersettings.ini", "contour/"); layoutContour->addWidget(plotContour); JKQTPlotter* plotDensity=new JKQTPlotter(true, this); - plotContour->set_doDrawing(false); - plotContour->get_plotter()->set_plotLabel(tr("\\textbf{2D histogram plot with contours}")); - plotDensity->get_plotter()->set_plotLabel(tr("\\textbf{2D histogram}")); + plotContour->setPlotUpdateEnabled(false); + plotContour->getPlotter()->setPlotLabel(tr("\\textbf{2D histogram plot with contours}")); + plotDensity->getPlotter()->setPlotLabel(tr("\\textbf{2D histogram}")); plotContour->setObjectName("density"); - plotContour->get_plotter()->set_userSettigsFilename(QApplication::applicationDirPath()+"/usersettings.ini", "density/"); + plotContour->getPlotter()->setUserSettigsFilename(QApplication::applicationDirPath()+"/usersettings.ini", "density/"); layoutContour->addWidget(plotDensity); QVector histAlex; @@ -50,19 +50,19 @@ TestWidgetContourPlots::TestWidgetContourPlots(QWidget *parent) : histAlexNx=(uint)sqrt(histAlex.size()); histAlexNy=histAlexNx; - auto ds=plotDensity->get_plotter()->getDatastore(); - plotContour->get_plotter()->useExternalDatastore(ds); + auto ds=plotDensity->getPlotter()->getDatastore(); + plotContour->getPlotter()->useExternalDatastore(ds); // empty datastore and grid - plotDensity->get_plotter()->clearGraphs(true); + plotDensity->getPlotter()->clearGraphs(true); ds->clear(); plotDensity->setGrid(false); - plotDensity->get_plotter()->get_xAxis()->set_axisLabel("X"); - plotDensity->get_plotter()->get_yAxis()->set_axisLabel("Y"); + plotDensity->getPlotter()->getXAxis()->setAxisLabel("X"); + plotDensity->getPlotter()->getYAxis()->setAxisLabel("Y"); size_t colHist2D=ds->addCopiedImageAsColumn(histAlex.data(), histAlexNx, histAlexNy, tr("2Dhist")); // size_t colContour=plotContour->getDatastore()->addCopiedImageAsColumnTranspose(histAlex.data(), histAlexNx, histAlexNy, tr("2Dhist")); - JKQTPColumnMathImage* densityplot=new JKQTPColumnMathImage(plotDensity->get_plotter()); + JKQTPColumnMathImage* densityplot=new JKQTPColumnMathImage(plotDensity->getPlotter()); densityplot->set_x(-0.1); densityplot->set_y(-0.1); densityplot->set_width(1.1); @@ -76,7 +76,7 @@ TestWidgetContourPlots::TestWidgetContourPlots(QWidget *parent) : densityplot->set_title("density plot"); plotDensity->addGraph(densityplot); - densityplot=new JKQTPColumnMathImage(plotContour->get_plotter()); + densityplot=new JKQTPColumnMathImage(plotContour->getPlotter()); densityplot->set_x(-0.1); densityplot->set_y(-0.1); densityplot->set_width(1.1); @@ -93,7 +93,7 @@ TestWidgetContourPlots::TestWidgetContourPlots(QWidget *parent) : QList levels; // levels<<5<<10<<25; // levels<<5.1<<10.1; levels<<4<<5<<9<<14; - JKQTPContour* cp=new JKQTPContour(plotContour->get_plotter()); + JKQTPContour* cp=new JKQTPContour(plotContour->getPlotter()); cp->set_x(-0.1); cp->set_y(-0.1); cp->set_width(1.1); @@ -107,8 +107,8 @@ TestWidgetContourPlots::TestWidgetContourPlots(QWidget *parent) : plotContour->addGraph(cp); plotContour->zoom(-0.1,1.1,-0.1,1.1); - plotContour->set_doDrawing(true); - plotContour->update_plot(); + plotContour->setPlotUpdateEnabled(true); + plotContour->replotPlot(); diff --git a/examples/jkqtplot_test/TestWidgetEmptyPlot.cpp b/examples/jkqtplot_test/TestWidgetEmptyPlot.cpp index 6e3002eff7..8ba0a9adaa 100644 --- a/examples/jkqtplot_test/TestWidgetEmptyPlot.cpp +++ b/examples/jkqtplot_test/TestWidgetEmptyPlot.cpp @@ -15,7 +15,7 @@ TestWidgetEmptyPlot::TestWidgetEmptyPlot(QWidget *parent) : #define NEMPTY 500 JKQTPlotter* plotEmpty=new JKQTPlotter(true, this); - JKQTPXYLineGraph* efunc=new JKQTPXYLineGraph(plotEmpty->get_plotter()); + JKQTPXYLineGraph* efunc=new JKQTPXYLineGraph(plotEmpty->getPlotter()); double xef[NEMPTY], efy[NEMPTY]; for (int i=0; iset_xColumn(plotEmpty->getDatastore()->addCopiedColumn(xef, NEMPTY, "x")); efunc->set_yColumn(plotEmpty->getDatastore()->addCopiedColumn(efy, NEMPTY, "y")); plotEmpty->addGraph(efunc); - plotEmpty->get_yAxis()->set_logAxis(true); + plotEmpty->getYAxis()->set_logAxis(true); plotEmpty->zoomToFit(); plotEmpty->setY(0,0); diff --git a/examples/jkqtplot_test/TestWidgetFunctionPlots.cpp b/examples/jkqtplot_test/TestWidgetFunctionPlots.cpp index e3aafd8768..6ce25d5da7 100644 --- a/examples/jkqtplot_test/TestWidgetFunctionPlots.cpp +++ b/examples/jkqtplot_test/TestWidgetFunctionPlots.cpp @@ -18,13 +18,13 @@ TestWidgetFunctionPlots::TestWidgetFunctionPlots(QWidget *parent) : setLayout(plotFuncLayout); plotFuncPlt=new JKQTPlotter(true, this); plotFuncLayout->addWidget(plotFuncPlt); - pfunc=new JKQTPXParsedFunctionLineGraph(plotFuncPlt->get_plotter()); + pfunc=new JKQTPXParsedFunctionLineGraph(plotFuncPlt->getPlotter()); pfunc->set_function("x^2/10+sin(x*pi*10)"); pfunc->set_errorFunction("x^2/20"); pfunc->set_drawErrorPolygons(true); pfunc->set_style(Qt::DashLine); plotFuncPlt->addGraph(pfunc); - plotFuncPlt->update_plot(); + plotFuncPlt->replotPlot(); pfuncErrorStyle=new JKQTPErrorPlotstyleComboBox(this); pfuncErrorStyle->setCurrentIndex(3); @@ -69,11 +69,11 @@ TestWidgetFunctionPlots::TestWidgetFunctionPlots(QWidget *parent) : connect(edtPFunc, SIGNAL(currentIndexChanged(QString)), this, SLOT(setPFuncE(QString))); QCheckBox* chkFLogX=new QCheckBox(tr("x-axis: log-scale")); chkFLogX->setChecked(false); - connect(chkFLogX, SIGNAL(toggled(bool)), plotFuncPlt->get_xAxis(), SLOT(set_logAxis(bool))); + connect(chkFLogX, SIGNAL(toggled(bool)), plotFuncPlt->getXAxis(), SLOT(set_logAxis(bool))); plotFuncLayout->addWidget(chkFLogX); QCheckBox* chkFLogY=new QCheckBox(tr("y-axis: log-scale")); chkFLogY->setChecked(false); - connect(chkFLogY, SIGNAL(toggled(bool)), plotFuncPlt->get_yAxis(), SLOT(set_logAxis(bool))); + connect(chkFLogY, SIGNAL(toggled(bool)), plotFuncPlt->getYAxis(), SLOT(set_logAxis(bool))); plotFuncLayout->addWidget(chkFLogY); @@ -88,29 +88,29 @@ void TestWidgetFunctionPlots::setPFuncStyle() if (pfuncErrorStyle->getErrorStyle()==JKQTPErrorPolygons) pfunc->set_drawErrorPolygons(true); pfunc->set_drawLine(chkPFuncDrawLine->isChecked()); pfunc->set_displaySamplePoints(chkPFuncDrawSamples->isChecked()); - plotFuncPlt->update_plot(); + plotFuncPlt->replotPlot(); } void TestWidgetFunctionPlots::setPFuncMinPoint(int value) { pfunc->set_minSamples(value); - plotFuncPlt->update_plot(); + plotFuncPlt->replotPlot(); } void TestWidgetFunctionPlots::setPFuncMaxRefine(int value) { pfunc->set_maxRefinementDegree(value); - plotFuncPlt->update_plot(); + plotFuncPlt->replotPlot(); } void TestWidgetFunctionPlots::setPFunc(const QString &expression) { pfunc->set_function(expression); - plotFuncPlt->update_plot(); + plotFuncPlt->replotPlot(); } void TestWidgetFunctionPlots::setPFuncE(const QString &expression) { pfunc->set_errorFunction(expression); - plotFuncPlt->update_plot(); + plotFuncPlt->replotPlot(); } diff --git a/examples/jkqtplot_test/TestWidgetGeometry.cpp b/examples/jkqtplot_test/TestWidgetGeometry.cpp index eef13824db..58587116a9 100644 --- a/examples/jkqtplot_test/TestWidgetGeometry.cpp +++ b/examples/jkqtplot_test/TestWidgetGeometry.cpp @@ -16,37 +16,37 @@ TestWidgetGeometry::TestWidgetGeometry(QWidget *parent) : setLayout(layout1); resize(1000, 800); JKQTPlotter* plotGeo=new JKQTPlotter(true, this); - plotGeo->set_doDrawing(false); + plotGeo->setPlotUpdateEnabled(false); plotGeo->setObjectName("plotGeo"); layout1->addWidget(plotGeo); plotGeo->setXY(0,1,0,1); - plotGeo->get_plotter()->get_xAxis()->set_axisLabel("$x$ [mm]"); - plotGeo->get_plotter()->get_yAxis()->set_axisLabel("$y$ [mm]"); - /*plotGeo->get_plotter()->get_xAxis()->set_linkedAxis(plotGeo->get_plotter()->get_yAxis()); - plotGeo->get_plotter()->get_xAxis()->set_changeWidthToAspectRatio(true);*/ - plotGeo->get_plotter()->set_maintainAspectRatio(true); - plotGeo->get_plotter()->set_aspectRatio(1); - plotGeo->get_plotter()->set_maintainAxisAspectRatio(true); - plotGeo->get_plotter()->set_axisAspectRatio(1); + plotGeo->getPlotter()->getXAxis()->setAxisLabel("$x$ [mm]"); + plotGeo->getPlotter()->getYAxis()->setAxisLabel("$y$ [mm]"); + /*plotGeo->getPlotter()->getXAxis()->set_linkedAxis(plotGeo->getPlotter()->getYAxis()); + plotGeo->getPlotter()->getXAxis()->set_changeWidthToAspectRatio(true);*/ + plotGeo->getPlotter()->setMaintainAspectRatio(true); + plotGeo->getPlotter()->setAspectRatio(1); + plotGeo->getPlotter()->setMaintainAxisAspectRatio(true); + plotGeo->getPlotter()->setAxisAspectRatio(1); -// JKQTPGeoLine* line1=new JKQTPGeoLine(plotGeo->get_plotter(), -1, -2, 2, 1.5); - //plotGeo->get_plotter()->addGraph(line1); -// JKQTPGeoLine* line2=new JKQTPGeoLine(plotGeo->get_plotter(), 1, -5, 4, 3, QColor("blue"), 4); - //plotGeo->get_plotter()->addGraph(line2); +// JKQTPGeoLine* line1=new JKQTPGeoLine(plotGeo->getPlotter(), -1, -2, 2, 1.5); + //plotGeo->getPlotter()->addGraph(line1); +// JKQTPGeoLine* line2=new JKQTPGeoLine(plotGeo->getPlotter(), 1, -5, 4, 3, QColor("blue"), 4); + //plotGeo->getPlotter()->addGraph(line2); - JKQTPGeoRectangle* rect1=new JKQTPGeoRectangle(plotGeo->get_plotter(), 1,1,2,2, QColor("blue"),2, Qt::SolidLine, QColor("lightblue")); + JKQTPGeoRectangle* rect1=new JKQTPGeoRectangle(plotGeo->getPlotter(), 1,1,2,2, QColor("blue"),2, Qt::SolidLine, QColor("lightblue")); rect1->set_angle(30); - //plotGeo->get_plotter()->addGraph(rect1); - JKQTPGeoRectangle* rect2=new JKQTPGeoRectangle(plotGeo->get_plotter(), 1,1,2,2, QColor("red"),2); + //plotGeo->getPlotter()->addGraph(rect1); + JKQTPGeoRectangle* rect2=new JKQTPGeoRectangle(plotGeo->getPlotter(), 1,1,2,2, QColor("red"),2); rect2->set_angle(45); - //plotGeo->get_plotter()->addGraph(rect2); - JKQTPGeoRectangle* rect3=new JKQTPGeoRectangle(plotGeo->get_plotter(), 1,1,2,4, QColor("green"),2); + //plotGeo->getPlotter()->addGraph(rect2); + JKQTPGeoRectangle* rect3=new JKQTPGeoRectangle(plotGeo->getPlotter(), 1,1,2,4, QColor("green"),2); rect3->set_angle(-30); - //plotGeo->get_plotter()->addGraph(rect3); - JKQTPGeoEllipse* ell3=new JKQTPGeoEllipse(plotGeo->get_plotter(), 1,1,2,4, QColor("green"),2, Qt::SolidLine, QColor("lightgreen"), Qt::CrossPattern); + //plotGeo->getPlotter()->addGraph(rect3); + JKQTPGeoEllipse* ell3=new JKQTPGeoEllipse(plotGeo->getPlotter(), 1,1,2,4, QColor("green"),2, Qt::SolidLine, QColor("lightgreen"), Qt::CrossPattern); ell3->set_angle(-30); - //plotGeo->get_plotter()->addGraph(ell3); + //plotGeo->getPlotter()->addGraph(ell3); QVector p; p.append(QPointF(4,1)); @@ -55,42 +55,42 @@ TestWidgetGeometry::TestWidgetGeometry(QWidget *parent) : p.append(QPointF(0,-2)); p.append(QPointF(M_PI,5.5)); -// JKQTPGeoPolygon* poly=new JKQTPGeoPolygon(plotGeo->get_plotter(), p, QColor("black"), 1.5, Qt::SolidLine, QColor(128,128,0,128)); - //plotGeo->get_plotter()->addGraph(poly); -// JKQTPGeoPolyLines* lines=new JKQTPGeoPolyLines(plotGeo->get_plotter(), p, QColor(255,255,0), 3); - //plotGeo->get_plotter()->addGraph(lines); +// JKQTPGeoPolygon* poly=new JKQTPGeoPolygon(plotGeo->getPlotter(), p, QColor("black"), 1.5, Qt::SolidLine, QColor(128,128,0,128)); + //plotGeo->getPlotter()->addGraph(poly); +// JKQTPGeoPolyLines* lines=new JKQTPGeoPolyLines(plotGeo->getPlotter(), p, QColor(255,255,0), 3); + //plotGeo->getPlotter()->addGraph(lines); - JKQTPGeoEllipse* ell1=new JKQTPGeoEllipse(plotGeo->get_plotter(), 0,0,2,4, QColor("black"),1.5, Qt::DotLine); - plotGeo->get_plotter()->addGraph(ell1); -// JKQTPGeoArc* arc=new JKQTPGeoArc(plotGeo->get_plotter(), 0,0,2,4,0, 135, QColor("blue"),3, Qt::SolidLine); - //plotGeo->get_plotter()->addGraph(arc); -// JKQTPGeoPie* pie=new JKQTPGeoPie(plotGeo->get_plotter(), 0,0,2,4,35, 98, QColor("blue"),3, Qt::SolidLine, QColor(0,0,255,127)); - //plotGeo->get_plotter()->addGraph(pie); -// JKQTPGeoChord* chord=new JKQTPGeoChord(plotGeo->get_plotter(), 0,0,2,4,35, 98, QColor("blue"),3, Qt::SolidLine, QColor(0,0,255,127)); - //plotGeo->get_plotter()->addGraph(chord); + JKQTPGeoEllipse* ell1=new JKQTPGeoEllipse(plotGeo->getPlotter(), 0,0,2,4, QColor("black"),1.5, Qt::DotLine); + plotGeo->getPlotter()->addGraph(ell1); +// JKQTPGeoArc* arc=new JKQTPGeoArc(plotGeo->getPlotter(), 0,0,2,4,0, 135, QColor("blue"),3, Qt::SolidLine); + //plotGeo->getPlotter()->addGraph(arc); +// JKQTPGeoPie* pie=new JKQTPGeoPie(plotGeo->getPlotter(), 0,0,2,4,35, 98, QColor("blue"),3, Qt::SolidLine, QColor(0,0,255,127)); + //plotGeo->getPlotter()->addGraph(pie); +// JKQTPGeoChord* chord=new JKQTPGeoChord(plotGeo->getPlotter(), 0,0,2,4,35, 98, QColor("blue"),3, Qt::SolidLine, QColor(0,0,255,127)); + //plotGeo->getPlotter()->addGraph(chord); - JKQTPGeoInfiniteLine* iline=new JKQTPGeoInfiniteLine(plotGeo->get_plotter(), 0.5,1,1,1, QColor("blue"), 3); - plotGeo->get_plotter()->addGraph(iline); - JKQTPGeoInfiniteLine* iline1=new JKQTPGeoInfiniteLine(plotGeo->get_plotter(), 0.5,1,-1,0, QColor("red"), 3); - plotGeo->get_plotter()->addGraph(iline1); - JKQTPGeoInfiniteLine* iline2=new JKQTPGeoInfiniteLine(plotGeo->get_plotter(), 0.5,1,0,1, QColor("red"), 3); - plotGeo->get_plotter()->addGraph(iline2); - JKQTPGeoInfiniteLine* iline3=new JKQTPGeoInfiniteLine(plotGeo->get_plotter(), 0.5,1,-1,0.5, QColor("green"), 3); + JKQTPGeoInfiniteLine* iline=new JKQTPGeoInfiniteLine(plotGeo->getPlotter(), 0.5,1,1,1, QColor("blue"), 3); + plotGeo->getPlotter()->addGraph(iline); + JKQTPGeoInfiniteLine* iline1=new JKQTPGeoInfiniteLine(plotGeo->getPlotter(), 0.5,1,-1,0, QColor("red"), 3); + plotGeo->getPlotter()->addGraph(iline1); + JKQTPGeoInfiniteLine* iline2=new JKQTPGeoInfiniteLine(plotGeo->getPlotter(), 0.5,1,0,1, QColor("red"), 3); + plotGeo->getPlotter()->addGraph(iline2); + JKQTPGeoInfiniteLine* iline3=new JKQTPGeoInfiniteLine(plotGeo->getPlotter(), 0.5,1,-1,0.5, QColor("green"), 3); iline3->set_two_sided(true); - plotGeo->get_plotter()->addGraph(iline3); + plotGeo->getPlotter()->addGraph(iline3); - JKQTPGeoText* text=new JKQTPGeoText(plotGeo->get_plotter(), -1, -1, "Test $f(x)=\\sqrt{\\sin(x^2)}$ \\textbf{bold}", 12, QColor("red")); - plotGeo->get_plotter()->addGraph(text); + JKQTPGeoText* text=new JKQTPGeoText(plotGeo->getPlotter(), -1, -1, "Test $f(x)=\\sqrt{\\sin(x^2)}$ \\textbf{bold}", 12, QColor("red")); + plotGeo->getPlotter()->addGraph(text); - plotGeo->set_doDrawing(true); - plotGeo->get_plotter()->zoomToFit(); - plotGeo->get_plotter()->set_keyAutosize(true); + plotGeo->setPlotUpdateEnabled(true); + plotGeo->getPlotter()->zoomToFit(); + plotGeo->getPlotter()->setKeyAutosize(true); QCheckBox* chkAspect=new QCheckBox("keep aspect ratio", this); - chkAspect->setChecked(plotGeo->get_plotter()->get_maintainAxisAspectRatio()); - connect(chkAspect, SIGNAL(toggled(bool)), plotGeo->get_plotter(), SLOT(set_maintainAspectRatio(bool))); - connect(chkAspect, SIGNAL(toggled(bool)), plotGeo->get_plotter(), SLOT(set_maintainAxisAspectRatio(bool))); + chkAspect->setChecked(plotGeo->getPlotter()->doesMaintainAxisAspectRatio()); + connect(chkAspect, SIGNAL(toggled(bool)), plotGeo->getPlotter(), SLOT(setMaintainAspectRatio(bool))); + connect(chkAspect, SIGNAL(toggled(bool)), plotGeo->getPlotter(), SLOT(setMaintainAxisAspectRatio(bool))); layout1->addWidget(chkAspect); } diff --git a/examples/jkqtplot_test/TestWidgetGraphs.cpp b/examples/jkqtplot_test/TestWidgetGraphs.cpp index 2ea91991d3..65cc468d67 100644 --- a/examples/jkqtplot_test/TestWidgetGraphs.cpp +++ b/examples/jkqtplot_test/TestWidgetGraphs.cpp @@ -20,21 +20,21 @@ TestWidgetGraphs::TestWidgetGraphs(QWidget *parent) : plot=new JKQTPlotter(true, this); - plot->set_doDrawing(false); + plot->setPlotUpdateEnabled(false); plotBot=new JKQTPlotter(false, this, plot->getDatastore()); plotBot2=new JKQTPlotter(false, this, plot->getDatastore()); - ovl1=new JKQTPOverlayVerticalLine(0.0, tr("test"), plot->get_plotter()); - plot->get_plotter()->addOverlayElement(ovl1); + ovl1=new JKQTPOverlayVerticalLine(0.0, tr("test"), plot->getPlotter()); + plot->getPlotter()->addOverlayElement(ovl1); plot->setObjectName("plot"); plotBot->setObjectName("plotBot"); plotBot2->setObjectName("plotBot2"); - plot->get_plotter()->set_plotLabel("Plot Label $1.\\alpha$"); - plot->get_plotter()->set_userSettigsFilename(QApplication::applicationDirPath()+"/usersettings.ini", "plot/"); - plotBot->get_plotter()->set_userSettigsFilename(QApplication::applicationDirPath()+"/usersettings.ini", "plot/"); - plotBot2->get_plotter()->set_userSettigsFilename(QApplication::applicationDirPath()+"/usersettings.ini", "plot/"); + plot->getPlotter()->setPlotLabel("Plot Label $1.\\alpha$"); + plot->getPlotter()->setUserSettigsFilename(QApplication::applicationDirPath()+"/usersettings.ini", "plot/"); + plotBot->getPlotter()->setUserSettigsFilename(QApplication::applicationDirPath()+"/usersettings.ini", "plot/"); + plotBot2->getPlotter()->setUserSettigsFilename(QApplication::applicationDirPath()+"/usersettings.ini", "plot/"); QListView* listPlots=new QListView(this); - listPlots->setModel(plot->get_plotter()->getPlotsModel()); + listPlots->setModel(plot->getPlotter()->getPlotsModel()); listPlots->setMaximumWidth(256); QVBoxLayout* layout=new QVBoxLayout(this); QGridLayout* layout_grid=new QGridLayout(this); @@ -49,21 +49,21 @@ TestWidgetGraphs::TestWidgetGraphs(QWidget *parent) : plotBot->synchronizeToMaster(plot, true, false); connect(plot, SIGNAL(zoomChangedLocally(double,double,double,double,JKQTPlotter*)), plotBot, SLOT(synchronizeXAxis(double,double,double,double,JKQTPlotter*))); - plot->get_plotter()->set_gridPrinting(true); - plot->get_plotter()->addGridPrintingPlotter(0,1,plotBot->get_plotter()); - plot->get_plotter()->addGridPrintingPlotter(0,2,plotBot2->get_plotter()); + plot->getPlotter()->setGridPrinting(true); + plot->getPlotter()->addGridPrintingPlotter(0,1,plotBot->getPlotter()); + plot->getPlotter()->addGridPrintingPlotter(0,2,plotBot2->getPlotter()); - plot->get_plotter()->get_xAxis()->set_axisLabel("$x$ axis with greek letters $\\sqrt{\\alpha\\cdot\\beta}$"); - plot->get_plotter()->get_yAxis()->set_axisLabel("$y$-axis label $f(x)=\\sin\\left(x^2\\right)$ [unit]"); + plot->getPlotter()->getXAxis()->setAxisLabel("$x$ axis with greek letters $\\sqrt{\\alpha\\cdot\\beta}$"); + plot->getPlotter()->getYAxis()->setAxisLabel("$y$-axis label $f(x)=\\sin\\left(x^2\\right)$ [unit]"); - plotBot->get_plotter()->get_xAxis()->set_axisLabel(plot->get_plotter()->get_xAxis()->get_axisLabel()); - plotBot->get_plotter()->get_yAxis()->set_axisLabel("$y$-axis 2 [unit]"); - plotBot2->get_plotter()->get_xAxis()->set_axisLabel(plot->get_plotter()->get_xAxis()->get_axisLabel()); - plotBot2->get_plotter()->get_yAxis()->set_axisLabel("$y$-axis 3 [unit]"); - plotBot2->get_plotter()->get_xAxis()->addAxisTickLabel(2.5, "tick 1"); - plotBot2->get_plotter()->get_xAxis()->addAxisTickLabel(7.5, "tick 2"); - plotBot2->get_plotter()->get_xAxis()->addAxisTickLabel(12.5, "tick 3"); - plotBot2->get_plotter()->get_xAxis()->addAxisTickLabel(17.5, "tick 4"); + plotBot->getPlotter()->getXAxis()->setAxisLabel(plot->getPlotter()->getXAxis()->getAxisLabel()); + plotBot->getPlotter()->getYAxis()->setAxisLabel("$y$-axis 2 [unit]"); + plotBot2->getPlotter()->getXAxis()->setAxisLabel(plot->getPlotter()->getXAxis()->getAxisLabel()); + plotBot2->getPlotter()->getYAxis()->setAxisLabel("$y$-axis 3 [unit]"); + plotBot2->getPlotter()->getXAxis()->addAxisTickLabel(2.5, "tick 1"); + plotBot2->getPlotter()->getXAxis()->addAxisTickLabel(7.5, "tick 2"); + plotBot2->getPlotter()->getXAxis()->addAxisTickLabel(12.5, "tick 3"); + plotBot2->getPlotter()->getXAxis()->addAxisTickLabel(17.5, "tick 4"); for (unsigned int i=0; iget_plotter()->getDatastore(); + JKQTPDatastore* ds=plot->getPlotter()->getDatastore(); //size_t cx1=ds->addColumn(x1, N1, "x1"); //size_t cy11=ds->addColumn(y11, N1, "y11"); @@ -104,19 +104,19 @@ TestWidgetGraphs::TestWidgetGraphs(QWidget *parent) : size_t cy21re=ds->addColumn(y21re, N2, "y21re"); - size_t id=plot->get_plotter()->addGraph(cx2, cy21, "$5\\cdot\\sin(x)$", JKQTPFilledCurveX); - JKQTPFilledCurveXGraph* fcxgr=qobject_cast(plot->get_plotter()->getGraph(id)); + size_t id=plot->getPlotter()->addGraph(cx2, cy21, "$5\\cdot\\sin(x)$", JKQTPFilledCurveX); + JKQTPFilledCurveXGraph* fcxgr=qobject_cast(plot->getPlotter()->getGraph(id)); if (fcxgr) { fcxgr->set_baseline(2); } - size_t yeb=plot->get_plotter()->addGraphWithXYError(cx2, cy21, cy22, cy22, "sine with errors", JKQTPFilledCurveX); - plteErrors=plot->get_plotter()->getGraph(yeb); + size_t yeb=plot->getPlotter()->addGraphWithXYError(cx2, cy21, cy22, cy22, "sine with errors", JKQTPFilledCurveX); + plteErrors=plot->getPlotter()->getGraph(yeb); setErrorStyle(0); - yeb=plot->get_plotter()->addGraph(cx2, cy21, "$5\\cdot\\sin(x)$", JKQTPLinesPoints); - plteSymbols=plot->get_plotter()->getGraph(yeb); + yeb=plot->getPlotter()->addGraph(cx2, cy21, "$5\\cdot\\sin(x)$", JKQTPLinesPoints); + plteSymbols=plot->getPlotter()->getGraph(yeb); - pltePlot2=new JKQTPXYLineErrorGraph(plotBot->get_plotter()); + pltePlot2=new JKQTPXYLineErrorGraph(plotBot->getPlotter()); pltePlot2->set_xColumn(cx2r); pltePlot2->set_yColumn(cy21r); pltePlot2->set_title(tr("random numbers")); @@ -124,7 +124,7 @@ TestWidgetGraphs::TestWidgetGraphs(QWidget *parent) : pltePlot2->set_yErrorColumn(cy21re); pltePlot2->set_yErrorStyle(JKQTPErrorBarsPolygons); pltePlot2->set_symbol(JKQTPFilledStar); - plotBot->get_plotter()->addGraph(pltePlot2); + plotBot->getPlotter()->addGraph(pltePlot2); plotBot->zoomToFit(); @@ -142,8 +142,8 @@ TestWidgetGraphs::TestWidgetGraphs(QWidget *parent) : b2[i]=1.5+cos(i+M_PI/8.0); b3[i]=1.5+sin(i); - //plot->get_xAxis()->addAxisTickLabel(i+1, QString("$\\pi_{%1}\\cdot 10^{%2}$").arg(i+1).arg(i+1-N3)); - //plot->get_yAxis()->addAxisTickLabel(i+1, QString("$\\pi_{%1}\\cdot 10^{%2}$").arg(i+1).arg(i+1-N3)); + //plot->getXAxis()->addAxisTickLabel(i+1, QString("$\\pi_{%1}\\cdot 10^{%2}$").arg(i+1).arg(i+1-N3)); + //plot->getYAxis()->addAxisTickLabel(i+1, QString("$\\pi_{%1}\\cdot 10^{%2}$").arg(i+1).arg(i+1-N3)); } size_t cbp=ds->addLinearColumn(N3, 2, N3+2, "boxplot_x"); @@ -162,23 +162,23 @@ TestWidgetGraphs::TestWidgetGraphs(QWidget *parent) : cb.push_back(ds->addColumn(b3, N3, "b3")); QStringList ts; ts<<"bars 1"<<"bars 2"<<"bars 3"; - plot->get_plotter()->addVerticalBargraph(cb, cbp, ts); + plot->getPlotter()->addVerticalBargraph(cb, cbp, ts); - JKQTPVerticalRange* r1=new JKQTPVerticalRange(plot->get_plotter()); + JKQTPVerticalRange* r1=new JKQTPVerticalRange(plot->getPlotter()); r1->set_rangeMin(5); r1->set_rangeMax(10); r1->set_rangeCenter(7.5); r1->set_title("vert. range"); - plot->get_plotter()->addGraph(r1); + plot->getPlotter()->addGraph(r1); - JKQTPHorizontalRange* r2=new JKQTPHorizontalRange(plot->get_plotter()); + JKQTPHorizontalRange* r2=new JKQTPHorizontalRange(plot->getPlotter()); r2->set_rangeMin(5); r2->set_rangeMax(10); r2->set_rangeCenter(7.5); r2->set_title("hor. range"); - plot->get_plotter()->addGraph(r2); + plot->getPlotter()->addGraph(r2); - JKQTPBoxplotVerticalGraph* box=new JKQTPBoxplotVerticalGraph(plotBot2->get_plotter()); + JKQTPBoxplotVerticalGraph* box=new JKQTPBoxplotVerticalGraph(plotBot2->getPlotter()); box->set_posColumn(cbxbox); box->set_medianColumn(cbmed); box->set_meanColumn(cbmean); @@ -192,7 +192,7 @@ TestWidgetGraphs::TestWidgetGraphs(QWidget *parent) : /*JKQTPYFunctionLineGraph* g=new JKQTPYFunctionLineGraph(&plot); g->set_title("function 1"); - g->set_plotFunction(f1); + g->setPlotFunction(f1); g->set_errorFunction(f1e); g->set_drawErrorLines(true); g->set_drawErrorPolygons(false); @@ -201,7 +201,7 @@ TestWidgetGraphs::TestWidgetGraphs(QWidget *parent) : /*JKQTPXFunctionLineGraph* g=new JKQTPXFunctionLineGraph(&plot); g->set_title("function 2"); - g->set_plotFunction(f2); + g->setPlotFunction(f2); plot->addGraph(g);*/ /*JKQTPStepVerticalGraph* g=new JKQTPStepVerticalGraph(&plot); @@ -212,22 +212,22 @@ TestWidgetGraphs::TestWidgetGraphs(QWidget *parent) : plot->addGraph(g); plot->addGraph(cy11, cx1, "$\\sin(x)$", JKQTPPoints);*/ - plot->set_doDrawing(true); - plot->get_plotter()->zoomToFit(true, false);//, true); - plot->get_plotter()->set_keyAutosize(true); + plot->setPlotUpdateEnabled(true); + plot->getPlotter()->zoomToFit(true, false);//, true); + plot->getPlotter()->setKeyAutosize(true); QCheckBox* chklogX=new QCheckBox("logarithmic X-axis", this); QCheckBox* chklogY=new QCheckBox("logarithmic Y-axis", this); - connect(chklogX, SIGNAL(toggled(bool)), plot->get_plotter()->get_xAxis(), SLOT(set_logAxis(bool))); - connect(chklogY, SIGNAL(toggled(bool)), plot->get_plotter()->get_yAxis(), SLOT(set_logAxis(bool))); - connect(chklogX, SIGNAL(toggled(bool)), plotBot2->get_plotter()->get_xAxis(), SLOT(set_logAxis(bool))); - connect(chklogY, SIGNAL(toggled(bool)), plotBot2->get_plotter()->get_yAxis(), SLOT(set_logAxis(bool))); + connect(chklogX, SIGNAL(toggled(bool)), plot->getPlotter()->getXAxis(), SLOT(set_logAxis(bool))); + connect(chklogY, SIGNAL(toggled(bool)), plot->getPlotter()->getYAxis(), SLOT(set_logAxis(bool))); + connect(chklogX, SIGNAL(toggled(bool)), plotBot2->getPlotter()->getXAxis(), SLOT(set_logAxis(bool))); + connect(chklogY, SIGNAL(toggled(bool)), plotBot2->getPlotter()->getYAxis(), SLOT(set_logAxis(bool))); layout->addWidget(chklogX); layout->addWidget(chklogY); QCheckBox* chkInvertX=new QCheckBox("invert X-axis", this); QCheckBox* chkInvertY=new QCheckBox("invert Y-axis", this); - connect(chkInvertX, SIGNAL(toggled(bool)), plot->get_plotter()->get_xAxis(), SLOT(set_inverted(bool))); - connect(chkInvertY, SIGNAL(toggled(bool)), plot->get_plotter()->get_yAxis(), SLOT(set_inverted(bool))); + connect(chkInvertX, SIGNAL(toggled(bool)), plot->getPlotter()->getXAxis(), SLOT(set_inverted(bool))); + connect(chkInvertY, SIGNAL(toggled(bool)), plot->getPlotter()->getYAxis(), SLOT(set_inverted(bool))); layout->addWidget(chkInvertX); layout->addWidget(chkInvertY); layout->addWidget(chkInvertX); @@ -312,7 +312,7 @@ void TestWidgetGraphs::setErrorStyle(int /*index*/) if (ey) { ey->set_yErrorStyle(String2JKQTPErrorPlotstyle(cmb->itemData(cmb->currentIndex()).toString())); } - plot->update_plot(); + plot->replotPlot(); } } @@ -325,7 +325,7 @@ void TestWidgetGraphs::setESSymbol(int /*index*/) exy->set_symbol(String2JKQTPGraphSymbols(cmb->itemData(cmb->currentIndex()).toString())); } - plot->update_plot(); + plot->replotPlot(); } } @@ -335,25 +335,25 @@ void TestWidgetGraphs::setSortOrder2(int index) if (index==0) pltePlot2->set_sortData(JKQTPXYGraph::Unsorted); if (index==1) pltePlot2->set_sortData(JKQTPXYLineGraph::SortedX); if (index==2) pltePlot2->set_sortData(JKQTPXYLineGraph::SortedY); - plotBot->update_plot(); + plotBot->replotPlot(); } void TestWidgetGraphs::setKeyLayout2(JKQTPKeyLayout layout) { - plot->get_plotter()->set_keyLayout(layout); - plotBot->get_plotter()->set_keyLayout(layout); - plotBot2->get_plotter()->set_keyLayout(layout); - plot->update_plot(); - plotBot->update_plot(); - plotBot2->update_plot(); + plot->getPlotter()->setKeyLayout(layout); + plotBot->getPlotter()->setKeyLayout(layout); + plotBot2->getPlotter()->setKeyLayout(layout); + plot->replotPlot(); + plotBot->replotPlot(); + plotBot2->replotPlot(); } void TestWidgetGraphs::setKeyPos2(JKQTPKeyPosition layout) { - plot->get_plotter()->set_keyPosition(layout); - plotBot->get_plotter()->set_keyPosition(layout); - plotBot2->get_plotter()->set_keyPosition(layout); - plot->update_plot(); - plotBot->update_plot(); - plotBot2->update_plot(); + plot->getPlotter()->setKeyPosition(layout); + plotBot->getPlotter()->setKeyPosition(layout); + plotBot2->getPlotter()->setKeyPosition(layout); + plot->replotPlot(); + plotBot->replotPlot(); + plotBot2->replotPlot(); } diff --git a/examples/jkqtplot_test/TestWidgetImages.cpp b/examples/jkqtplot_test/TestWidgetImages.cpp index 0b863d99ad..9864745124 100644 --- a/examples/jkqtplot_test/TestWidgetImages.cpp +++ b/examples/jkqtplot_test/TestWidgetImages.cpp @@ -20,27 +20,27 @@ TestWidgetImages::TestWidgetImages(QWidget *parent) : setLayout(layouti); resize(1000, 800); plotImg=new JKQTPlotter(true, this); - plotImg->set_doDrawing(false); - plotImg->get_plotter()->set_plotLabel(tr("\\textbf{image plot}")); + plotImg->setPlotUpdateEnabled(false); + plotImg->getPlotter()->setPlotLabel(tr("\\textbf{image plot}")); plotImg->setObjectName("plotImg"); - plotImg->get_plotter()->set_userSettigsFilename(QApplication::applicationDirPath()+"/usersettings.ini", "plot_img/"); + plotImg->getPlotter()->setUserSettigsFilename(QApplication::applicationDirPath()+"/usersettings.ini", "plot_img/"); - plotImg->get_plotter()->set_maintainAspectRatio(true); - plotImg->get_plotter()->set_aspectRatio(3.0/2.0); - plotImg->get_plotter()->set_maintainAxisAspectRatio(true); - plotImg->get_plotter()->set_axisAspectRatio(4.0); - /*plotImg->get_plotter()->get_xAxis()->set_linkedAxis(plotImg->get_plotter()->get_yAxis()); - plotImg->get_plotter()->get_xAxis()->set_changeWidthToAspectRatio(true); - plotImg->get_plotter()->get_xAxis()->set_aspectRatio(1.0);*/ + plotImg->getPlotter()->setMaintainAspectRatio(true); + plotImg->getPlotter()->setAspectRatio(3.0/2.0); + plotImg->getPlotter()->setMaintainAxisAspectRatio(true); + plotImg->getPlotter()->setAxisAspectRatio(4.0); + /*plotImg->getPlotter()->getXAxis()->set_linkedAxis(plotImg->getPlotter()->getYAxis()); + plotImg->getPlotter()->getXAxis()->set_changeWidthToAspectRatio(true); + plotImg->getPlotter()->getXAxis()->setAspectRatio(1.0);*/ layouti->addWidget(plotImg); plotImg->setXY(0,30,0,20); plotImg->setAbsoluteXY(0,30,0,20); img1=QImage(":/lena.png"); - JKQTPImage* pimg1=new JKQTPImage(0,0,10,20, &img1, plotImg->get_plotter()); + JKQTPImage* pimg1=new JKQTPImage(0,0,10,20, &img1, plotImg->getPlotter()); pimg1->set_title("LENA"); - plotImg->get_plotter()->addGraph(pimg1); + plotImg->getPlotter()->addGraph(pimg1); double* img2=(double*)calloc(100*100,sizeof(double)); int32_t* img2M=(int32_t*)calloc(100*100,sizeof(int32_t)); bool* bimg2=(bool*)calloc(100*100,sizeof(bool)); @@ -51,7 +51,7 @@ TestWidgetImages::TestWidgetImages(QWidget *parent) : bimg2[y*100+x]=static_cast(rand())/static_cast(RAND_MAX)>0.9; } } - pimg2=new JKQTPMathImage(10,0,10,10, JKQTPMathImageBase::DoubleArray, img2, 100, 100, JKQTPMathImageGRAY, plotImg->get_plotter()); + pimg2=new JKQTPMathImage(10,0,10,10, JKQTPMathImageBase::DoubleArray, img2, 100, 100, JKQTPMathImageGRAY, plotImg->getPlotter()); pimg2->set_imageMin(-1); pimg2->set_imageMax(0.5); pimg2->set_imageName("left image"); @@ -59,8 +59,8 @@ TestWidgetImages::TestWidgetImages(QWidget *parent) : pimg2->set_autoImageRange(false); pimg2->set_colorBarTopVisible(true); pimg2->set_colorBarRightVisible(false); - plotImg->get_plotter()->addGraph(pimg2); - pimg3=new JKQTPMathImage(20,0,10,10, JKQTPMathImageBase::DoubleArray, img2, 100, 100, JKQTPMathImageMATLAB, plotImg->get_plotter()); + plotImg->getPlotter()->addGraph(pimg2); + pimg3=new JKQTPMathImage(20,0,10,10, JKQTPMathImageBase::DoubleArray, img2, 100, 100, JKQTPMathImageMATLAB, plotImg->getPlotter()); pimg3->set_colorBarTopVisible(true); pimg3->set_colorBarRightVisible(true); pimg3->set_imageMax(0.5); @@ -73,21 +73,21 @@ TestWidgetImages::TestWidgetImages(QWidget *parent) : pimg3->set_dataModifier(img2M, JKQTPMathImageBase::Int32Array); pimg3->set_modifierMode(JKQTPMathImageBase::ModifyNone); pimg3->set_title("right image"); - plotImg->get_plotter()->addGraph(pimg3); + plotImg->getPlotter()->addGraph(pimg3); QColor ty=QColor("blue"); ty.setAlphaF(0.1); - JKQTPOverlayImage* oimg1=new JKQTPOverlayImage(10,0,10,10, bimg2, 100, 100, QColor("blue"), plotImg->get_plotter()); + JKQTPOverlayImage* oimg1=new JKQTPOverlayImage(10,0,10,10, bimg2, 100, 100, QColor("blue"), plotImg->getPlotter()); oimg1->set_title("overlay"); oimg1->set_falseColor(ty); - plotImg->get_plotter()->addGraph(oimg1); + plotImg->getPlotter()->addGraph(oimg1); - JKQTPOverlayImageEnhanced* oimg2=new JKQTPOverlayImageEnhanced(10,0,10,10, bimg2, 100, 100, QColor("red"), plotImg->get_plotter()); + JKQTPOverlayImageEnhanced* oimg2=new JKQTPOverlayImageEnhanced(10,0,10,10, bimg2, 100, 100, QColor("red"), plotImg->getPlotter()); oimg2->set_title("enhanced overlay"); oimg2->set_drawAsRectangles(false); - plotImg->get_plotter()->addGraph(oimg2); + plotImg->getPlotter()->addGraph(oimg2); - plotImg->set_doDrawing(true); + plotImg->setPlotUpdateEnabled(true); plotImg->zoomToFit(); JKQTPMathImageColorPaletteComboBox* cmbPal=new JKQTPMathImageColorPaletteComboBox(this); @@ -117,17 +117,17 @@ TestWidgetImages::TestWidgetImages(QWidget *parent) : void TestWidgetImages::setImgPalette(int index) { pimg3->set_palette(index); - plotImg->update_plot(); + plotImg->replotPlot(); } void TestWidgetImages::setImgPalette1(int index) { pimg2->set_palette(index); - plotImg->update_plot(); + plotImg->replotPlot(); } void TestWidgetImages::setImgModifier(int index) { pimg3->set_modifierMode(JKQTPMathImage::ModifierMode(index)); - plotImg->update_plot(); + plotImg->replotPlot(); } diff --git a/examples/jkqtplot_test/TestWidgetLogGraphs.cpp b/examples/jkqtplot_test/TestWidgetLogGraphs.cpp index f1ce563da5..c005ede1bc 100644 --- a/examples/jkqtplot_test/TestWidgetLogGraphs.cpp +++ b/examples/jkqtplot_test/TestWidgetLogGraphs.cpp @@ -14,11 +14,11 @@ TestWidgetLogGraphs::TestWidgetLogGraphs(QWidget *parent) : { JKQTPlotter* plotLOG=new JKQTPlotter(this); - plotLOG->set_doDrawing(false); + plotLOG->setPlotUpdateEnabled(false); plotLOG->setObjectName("plotLOG"); - plotLOG->get_plotter()->set_userSettigsFilename(QApplication::applicationDirPath()+"/usersettings.ini", "plotLOG/"); + plotLOG->getPlotter()->setUserSettigsFilename(QApplication::applicationDirPath()+"/usersettings.ini", "plotLOG/"); - JKQTPDatastore* ds=plotLOG->get_plotter()->getDatastore(); + JKQTPDatastore* ds=plotLOG->getPlotter()->getDatastore(); QVector x,y; for (unsigned int i=0; i(i+1)/static_cast(N2)*15.0; @@ -38,73 +38,73 @@ TestWidgetLogGraphs::TestWidgetLogGraphs(QWidget *parent) : resize(1000, 800); - plotLOG->get_plotter()->addGraph(cx2, cy23, "data, $f(x)=5^{x/5}$", JKQTPLines); + plotLOG->getPlotter()->addGraph(cx2, cy23, "data, $f(x)=5^{x/5}$", JKQTPLines); - plotLOG->set_doDrawing(true); - plotLOG->get_plotter()->zoomToFit(true, true);//, true); - plotLOG->get_plotter()->set_keyAutosize(true); + plotLOG->setPlotUpdateEnabled(true); + plotLOG->getPlotter()->zoomToFit(true, true);//, true); + plotLOG->getPlotter()->setKeyAutosize(true); QCheckBox* chklogX=new QCheckBox("logarithmic X-axis", this); QCheckBox* chklogY=new QCheckBox("logarithmic Y-axis", this); - connect(chklogX, SIGNAL(toggled(bool)), plotLOG->get_plotter()->get_xAxis(), SLOT(set_logAxis(bool))); - connect(chklogY, SIGNAL(toggled(bool)), plotLOG->get_plotter()->get_yAxis(), SLOT(set_logAxis(bool))); + connect(chklogX, SIGNAL(toggled(bool)), plotLOG->getPlotter()->getXAxis(), SLOT(set_logAxis(bool))); + connect(chklogY, SIGNAL(toggled(bool)), plotLOG->getPlotter()->getYAxis(), SLOT(set_logAxis(bool))); layWid->addWidget(chklogX); layWid->addWidget(chklogY); QCheckBox* chkXMinorTicks=new QCheckBox("minor X-tick labels", this); QCheckBox* chkYMinorTicks=new QCheckBox("minor Y-tick labels", this); - connect(chkXMinorTicks, SIGNAL(toggled(bool)), plotLOG->get_plotter()->get_xAxis(), SLOT(set_minorTickLabelsEnabled(bool))); - connect(chkYMinorTicks, SIGNAL(toggled(bool)), plotLOG->get_plotter()->get_yAxis(), SLOT(set_minorTickLabelsEnabled(bool))); + connect(chkXMinorTicks, SIGNAL(toggled(bool)), plotLOG->getPlotter()->getXAxis(), SLOT(set_minorTickLabelsEnabled(bool))); + connect(chkYMinorTicks, SIGNAL(toggled(bool)), plotLOG->getPlotter()->getYAxis(), SLOT(set_minorTickLabelsEnabled(bool))); layWid->addWidget(chkXMinorTicks); layWid->addWidget(chkYMinorTicks); QCheckBox* chkFullNumberMinor=new QCheckBox("full minor numbers", this); - connect(chkFullNumberMinor, SIGNAL(toggled(bool)), plotLOG->get_plotter()->get_xAxis(), SLOT(set_minorTickLabelFullNumber(bool))); - connect(chkFullNumberMinor, SIGNAL(toggled(bool)), plotLOG->get_plotter()->get_yAxis(), SLOT(set_minorTickLabelFullNumber(bool))); + connect(chkFullNumberMinor, SIGNAL(toggled(bool)), plotLOG->getPlotter()->getXAxis(), SLOT(set_minorTickLabelFullNumber(bool))); + connect(chkFullNumberMinor, SIGNAL(toggled(bool)), plotLOG->getPlotter()->getYAxis(), SLOT(set_minorTickLabelFullNumber(bool))); layWid->addWidget(chkFullNumberMinor); QComboBox* cmbTickMode=new QComboBox(this); cmbTickMode->addItem("JKQTPLTMLinOrLog"); cmbTickMode->addItem("JKQTPLTMLin"); cmbTickMode->addItem("JKQTPLTMPower"); - connect(cmbTickMode, SIGNAL(currentIndexChanged(int)), plotLOG->get_plotter()->get_xAxis(), SLOT(set_tickMode(int))); + connect(cmbTickMode, SIGNAL(currentIndexChanged(int)), plotLOG->getPlotter()->getXAxis(), SLOT(set_tickMode(int))); layWid->addRow("X-Axis TickMode", cmbTickMode); cmbTickMode=new QComboBox(this); cmbTickMode->addItem("JKQTPLTMLinOrLog"); cmbTickMode->addItem("JKQTPLTMLin"); cmbTickMode->addItem("JKQTPLTMPower"); - connect(cmbTickMode, SIGNAL(currentIndexChanged(int)), plotLOG->get_plotter()->get_yAxis(), SLOT(set_tickMode(int))); + connect(cmbTickMode, SIGNAL(currentIndexChanged(int)), plotLOG->getPlotter()->getYAxis(), SLOT(set_tickMode(int))); layWid->addRow("Y-Axis TickMode", cmbTickMode); cmbTickMode->setCurrentIndex(0); - plotLOG->get_plotter()->get_yAxis()->set_tickMode(JKQTPLTMLinOrPower); - plotLOG->get_plotter()->get_yAxis()->set_minorTicks(1); + plotLOG->getPlotter()->getYAxis()->set_tickMode(JKQTPLTMLinOrPower); + plotLOG->getPlotter()->getYAxis()->set_minorTicks(1); - plotLOG->get_plotter()->get_yAxis()->set_drawMode2(JKQTPCADMcomplete); - plotLOG->get_plotter()->get_xAxis()->set_drawMode2(JKQTPCADMcomplete); + plotLOG->getPlotter()->getYAxis()->set_drawMode2(JKQTPCADMcomplete); + plotLOG->getPlotter()->getXAxis()->set_drawMode2(JKQTPCADMcomplete); QSpinBox* spinMinTicks=new QSpinBox(this); spinMinTicks->setRange(0,999); - connect(spinMinTicks, SIGNAL(valueChanged(int)), plotLOG->get_plotter()->get_xAxis(), SLOT(set_minorTicks(int))); - connect(spinMinTicks, SIGNAL(valueChanged(int)), plotLOG->get_plotter()->get_yAxis(), SLOT(set_minorTicks(int))); + connect(spinMinTicks, SIGNAL(valueChanged(int)), plotLOG->getPlotter()->getXAxis(), SLOT(set_minorTicks(int))); + connect(spinMinTicks, SIGNAL(valueChanged(int)), plotLOG->getPlotter()->getYAxis(), SLOT(set_minorTicks(int))); layWid->addRow("X/Y-axis minor tick count", spinMinTicks); spinMinTicks->setValue(1); QDoubleSpinBox* spinLOGAngle=new QDoubleSpinBox(this); spinLOGAngle->setRange(-90,90); spinLOGAngle->setSuffix(QLatin1String("°")); - connect(spinLOGAngle, SIGNAL(valueChanged(double)), plotLOG->get_plotter()->get_xAxis(), SLOT(set_tickLabelAngle(double))); + connect(spinLOGAngle, SIGNAL(valueChanged(double)), plotLOG->getPlotter()->getXAxis(), SLOT(set_tickLabelAngle(double))); layWid->addRow("X-Axis tick label angle", spinLOGAngle); spinLOGAngle->setValue(0); spinLOGAngle=new QDoubleSpinBox(this); spinLOGAngle->setRange(-90,90); spinLOGAngle->setSuffix(QLatin1String("°")); - connect(spinLOGAngle, SIGNAL(valueChanged(double)), plotLOG->get_plotter()->get_yAxis(), SLOT(set_tickLabelAngle(double))); + connect(spinLOGAngle, SIGNAL(valueChanged(double)), plotLOG->getPlotter()->getYAxis(), SLOT(set_tickLabelAngle(double))); layWid->addRow(tr("Y-axis label angle = "), spinLOGAngle); spinLOGAngle->setValue(0); diff --git a/examples/jkqtplot_test/TestWidgetParamScatterPlots.cpp b/examples/jkqtplot_test/TestWidgetParamScatterPlots.cpp index 5de5bda1f4..7f532d86de 100644 --- a/examples/jkqtplot_test/TestWidgetParamScatterPlots.cpp +++ b/examples/jkqtplot_test/TestWidgetParamScatterPlots.cpp @@ -18,10 +18,10 @@ TestWidgetParamScatterPlots::TestWidgetParamScatterPlots(QWidget *parent) : setLayout(layoutPSP); resize(1000, 800); plotPSP=new JKQTPlotter(true, this); - plotPSP->set_doDrawing(false); - plotPSP->get_plotter()->set_plotLabel(tr("\\textbf{parametrized scatter plots}")); + plotPSP->setPlotUpdateEnabled(false); + plotPSP->getPlotter()->setPlotLabel(tr("\\textbf{parametrized scatter plots}")); plotPSP->setObjectName("plotPSP"); - plotPSP->get_plotter()->set_userSettigsFilename(QApplication::applicationDirPath()+"/usersettings.ini", "plot_peaks/"); + plotPSP->getPlotter()->setUserSettigsFilename(QApplication::applicationDirPath()+"/usersettings.ini", "plot_peaks/"); layoutPSP->addWidget(plotPSP); @@ -50,7 +50,7 @@ TestWidgetParamScatterPlots::TestWidgetParamScatterPlots(QWidget *parent) : int psps=plotPSP->getDatastore()->addCopiedColumn(dataS, "size"); int pspsy=plotPSP->getDatastore()->addCopiedColumn(dataSy, "symbol"); - pltePSPCol=new JKQTPXYParametrizedErrorScatterGraph(plotPSP->get_plotter()); + pltePSPCol=new JKQTPXYParametrizedErrorScatterGraph(plotPSP->getPlotter()); pltePSPCol->set_title(tr("changing color")); pltePSPCol->set_xColumn(pspx); pltePSPCol->set_yColumn(pspy); @@ -59,24 +59,24 @@ TestWidgetParamScatterPlots::TestWidgetParamScatterPlots(QWidget *parent) : pltePSPCol->set_yErrorColumnLower(pspy2); pltePSPCol->set_yErrorSymmetric(true); pltePSPCol->set_drawLine(true); - plotPSP->get_plotter()->addGraph(pltePSPCol); + plotPSP->getPlotter()->addGraph(pltePSPCol); - pltePSPSize=new JKQTPXYParametrizedScatterGraph(plotPSP->get_plotter()); + pltePSPSize=new JKQTPXYParametrizedScatterGraph(plotPSP->getPlotter()); pltePSPSize->set_xColumn(pspx); pltePSPSize->set_yColumn(pspy1); pltePSPSize->set_sizeColumn(psps); pltePSPSize->set_title(tr("changing size")); - plotPSP->get_plotter()->addGraph(pltePSPSize); + plotPSP->getPlotter()->addGraph(pltePSPSize); - pltePSPSymb=new JKQTPXYParametrizedScatterGraph(plotPSP->get_plotter()); + pltePSPSymb=new JKQTPXYParametrizedScatterGraph(plotPSP->getPlotter()); pltePSPSymb->set_xColumn(pspx); pltePSPSymb->set_yColumn(pspy3); pltePSPSymb->set_symbolColumn(pspsy); pltePSPSymb->set_title(tr("changing symbol")); - plotPSP->get_plotter()->addGraph(pltePSPSymb); + plotPSP->getPlotter()->addGraph(pltePSPSymb); - plotPSP->set_doDrawing(true); + plotPSP->setPlotUpdateEnabled(true); plotPSP->zoomToFit(); @@ -96,5 +96,5 @@ TestWidgetParamScatterPlots::TestWidgetParamScatterPlots(QWidget *parent) : void TestWidgetParamScatterPlots::setPSPSymmErrors(bool checked) { pltePSPCol->set_yErrorSymmetric(checked); - plotPSP->update_plot(); + plotPSP->replotPlot(); } diff --git a/examples/jkqtplot_test/TestWidgetPeaksPlots.cpp b/examples/jkqtplot_test/TestWidgetPeaksPlots.cpp index 7df04f7504..bbadd9c098 100644 --- a/examples/jkqtplot_test/TestWidgetPeaksPlots.cpp +++ b/examples/jkqtplot_test/TestWidgetPeaksPlots.cpp @@ -19,10 +19,10 @@ TestWidgetPeaksPlots::TestWidgetPeaksPlots(QWidget *parent) : setLayout(layoutpeaks); resize(1000, 800); plotPeaks=new JKQTPlotter(true, this); - plotPeaks->set_doDrawing(false); - plotPeaks->get_plotter()->set_plotLabel(tr("\\textbf{peaks stream plot}")); + plotPeaks->setPlotUpdateEnabled(false); + plotPeaks->getPlotter()->setPlotLabel(tr("\\textbf{peaks stream plot}")); plotPeaks->setObjectName("plotPeaks"); - plotPeaks->get_plotter()->set_userSettigsFilename(QApplication::applicationDirPath()+"/usersettings.ini", "plot_peaks/"); + plotPeaks->getPlotter()->setUserSettigsFilename(QApplication::applicationDirPath()+"/usersettings.ini", "plot_peaks/"); QCheckBox* chkDrawBaseline=new QCheckBox(tr("draw baseline"), this); chkDrawBaseline->setChecked(true); @@ -44,14 +44,14 @@ TestWidgetPeaksPlots::TestWidgetPeaksPlots(QWidget *parent) : int phot1=plotPeaks->getDatastore()->addCopiedColumn(photons1, "photons 1"); int phot2=plotPeaks->getDatastore()->addCopiedColumn(photons2, "photons 2"); - graphPeakStream1=new JKQTPPeakStreamGraph(phot1, 0.05, 1, QColor("darkgreen"), plotPeaks->get_plotter()); + graphPeakStream1=new JKQTPPeakStreamGraph(phot1, 0.05, 1, QColor("darkgreen"), plotPeaks->getPlotter()); graphPeakStream1->set_title("channel 1"); - plotPeaks->get_plotter()->addGraph(graphPeakStream1); - graphPeakStream2=new JKQTPPeakStreamGraph(phot2, -0.05, -1, QColor("darkred"), plotPeaks->get_plotter()); + plotPeaks->getPlotter()->addGraph(graphPeakStream1); + graphPeakStream2=new JKQTPPeakStreamGraph(phot2, -0.05, -1, QColor("darkred"), plotPeaks->getPlotter()); graphPeakStream2->set_title("channel 2"); - plotPeaks->get_plotter()->addGraph(graphPeakStream2); + plotPeaks->getPlotter()->addGraph(graphPeakStream2); - plotPeaks->set_doDrawing(true); + plotPeaks->setPlotUpdateEnabled(true); plotPeaks->zoomToFit(); @@ -65,12 +65,12 @@ void TestWidgetPeaksPlots::setDrawBaseline(bool checked) { graphPeakStream1->set_drawBaseline(checked); graphPeakStream2->set_drawBaseline(checked); - plotPeaks->update_plot(); + plotPeaks->replotPlot(); } void TestWidgetPeaksPlots::setYPeaks(bool checked) { graphPeakStream1->set_yPeaks(checked); graphPeakStream2->set_yPeaks(checked); - plotPeaks->update_plot(); + plotPeaks->replotPlot(); } diff --git a/examples/jkqtplot_test/TestWidgetRGBImages.cpp b/examples/jkqtplot_test/TestWidgetRGBImages.cpp index 5ca564cbfc..f215163964 100644 --- a/examples/jkqtplot_test/TestWidgetRGBImages.cpp +++ b/examples/jkqtplot_test/TestWidgetRGBImages.cpp @@ -20,15 +20,15 @@ TestWidgetRGBImages::TestWidgetRGBImages(QWidget *parent) : winrgb->setLayout(layoutrgb); winrgb->resize(1000, 800); plotImgRGB=new JKQTPlotter(true, winrgb); - plotImgRGB->set_doDrawing(false); - plotImgRGB->get_plotter()->set_plotLabel(tr("\\textbf{RGB image plot}")); + plotImgRGB->setPlotUpdateEnabled(false); + plotImgRGB->getPlotter()->setPlotLabel(tr("\\textbf{RGB image plot}")); plotImgRGB->setObjectName("plotImgRGB"); - plotImgRGB->get_plotter()->set_userSettigsFilename(QApplication::applicationDirPath()+"/usersettings.ini", "plot_img_rgb/"); + plotImgRGB->getPlotter()->setUserSettigsFilename(QApplication::applicationDirPath()+"/usersettings.ini", "plot_img_rgb/"); - /*plotImgRGB->get_plotter()->set_maintainAspectRatio(true); - plotImgRGB->get_plotter()->set_aspectRatio(1.0); - plotImgRGB->get_plotter()->set_maintainAxisAspectRatio(true); - plotImgRGB->get_plotter()->set_axisAspectRatio(1.0);*/ + /*plotImgRGB->getPlotter()->setMaintainAspectRatio(true); + plotImgRGB->getPlotter()->setAspectRatio(1.0); + plotImgRGB->getPlotter()->setMaintainAxisAspectRatio(true); + plotImgRGB->getPlotter()->setAxisAspectRatio(1.0);*/ QCheckBox* chkColorbars=new QCheckBox(tr("color bars share space"), winrgb); chkColorbars->setChecked(true); @@ -51,7 +51,7 @@ TestWidgetRGBImages::TestWidgetRGBImages(QWidget *parent) : rgb_aimg2[y*100+x]=double(x)/100.0; } } - rgbimg=new JKQTPRGBMathImage(0,0,10,10, JKQTPMathImageBase::DoubleArray, rgb_rimg2, 100, 100, plotImgRGB->get_plotter()); + rgbimg=new JKQTPRGBMathImage(0,0,10,10, JKQTPMathImageBase::DoubleArray, rgb_rimg2, 100, 100, plotImgRGB->getPlotter()); rgbimg->set_imageMin(-1); rgbimg->set_imageMax(0.5); rgbimg->set_imageMinB(-1); @@ -62,12 +62,12 @@ TestWidgetRGBImages::TestWidgetRGBImages(QWidget *parent) : rgbimg->set_data(rgb_rimg2, rgb_gimg2, rgb_bimg2, 100, 100, JKQTPMathImageBase::DoubleArray); rgbimg->set_dataModifier(rgb_aimg2, JKQTPMathImageBase::DoubleArray); rgbimg->set_modifierMode(JKQTPMathImageBase::ModifyNone); - plotImgRGB->get_plotter()->addGraph(rgbimg); + plotImgRGB->getPlotter()->addGraph(rgbimg); rgbimg->set_autoImageRange(false); rgbimg->set_colorBarTopVisible(true); rgbimg->set_colorBarRightVisible(true); rgbimg->set_colorbarsSideBySide(chkColorbars->isChecked()); - rgbimg2=new JKQTPColumnRGBMathImage(10,0,10,10,100,100, plotImgRGB->get_plotter()); + rgbimg2=new JKQTPColumnRGBMathImage(10,0,10,10,100,100, plotImgRGB->getPlotter()); rgbimg2->set_imageMin(-1); rgbimg2->set_imageMax(0.5); rgbimg2->set_imageMinB(-1); @@ -83,13 +83,13 @@ TestWidgetRGBImages::TestWidgetRGBImages(QWidget *parent) : rgbimg2->set_modifierColumn(rgb_cola=plotImgRGB->getDatastore()->addCopiedColumn(rgb_aimg2, 100*100, "alpha")); rgbimg2->set_modifierMode(JKQTPMathImageBase::ModifyNone); //rgbimg2->set_data(rgb_rimg2, rgb_gimg2, rgb_bimg2, 100, 100, JKQTPMathImageBase::DoubleArray); - plotImgRGB->get_plotter()->addGraph(rgbimg2); + plotImgRGB->getPlotter()->addGraph(rgbimg2); rgbimg2->set_autoImageRange(true); rgbimg2->set_colorBarTopVisible(true); rgbimg2->set_colorBarRightVisible(true); rgbimg2->set_colorbarsSideBySide(chkColorbars->isChecked()); plotImgRGB->setAbsoluteXY(0,20,0,10); - plotImgRGB->set_doDrawing(true); + plotImgRGB->setPlotUpdateEnabled(true); //plotImgRGB->zoomToFit(); plotImgRGB->setXY(0,20,0,10); @@ -153,19 +153,19 @@ void TestWidgetRGBImages::setRGBColorBars(bool checked) { rgbimg->set_colorbarsSideBySide(checked); rgbimg2->set_colorbarsSideBySide(checked); - plotImgRGB->update_plot(); + plotImgRGB->replotPlot(); } void TestWidgetRGBImages::setRGBMode1(int mode) { rgbimg->set_rgbMode((JKQTPRGBMathImageRGBMode)mode); - plotImgRGB->update_plot(); + plotImgRGB->replotPlot(); } void TestWidgetRGBImages::setRGBMode2(int mode) { rgbimg2->set_rgbMode((JKQTPRGBMathImageRGBMode)mode); - plotImgRGB->update_plot(); + plotImgRGB->replotPlot(); } void TestWidgetRGBImages::updateRGBChannels() @@ -191,13 +191,13 @@ void TestWidgetRGBImages::updateRGBChannels() rgbimg->set_dataB(nullptr); rgbimg2->set_imageBColumn(-1); } - plotImgRGB->update_plot(); + plotImgRGB->replotPlot(); } void TestWidgetRGBImages::setRGBModifier(int item) { rgbimg->set_modifierMode(JKQTPMathImage::ModifierMode(item)); rgbimg2->set_modifierMode(JKQTPMathImage::ModifierMode(item)); - plotImgRGB->update_plot(); + plotImgRGB->replotPlot(); } diff --git a/examples/jkqtplot_test/jkqtpemfengineadapter.h b/examples/jkqtplot_test/jkqtpemfengineadapter.h index e6887b31fb..a716b808ba 100644 --- a/examples/jkqtplot_test/jkqtpemfengineadapter.h +++ b/examples/jkqtplot_test/jkqtpemfengineadapter.h @@ -6,7 +6,7 @@ #include #include "../../../jkqtpbaseplotter.h" -class JKQTPEmfEngineAdapter : public JKQTBasePlotter::JKQTPPaintDeviceAdapter +class JKQTPEmfEngineAdapter : public JKQTPPaintDeviceAdapter { public: JKQTPEmfEngineAdapter(); diff --git a/examples/simpletest_barchart/README.md b/examples/simpletest_barchart/README.md index 7cf8281869..582114a572 100644 --- a/examples/simpletest_barchart/README.md +++ b/examples/simpletest_barchart/README.md @@ -14,9 +14,9 @@ int main(int argc, char* argv[]) // 1. create a plotter window and get a pointer to the internal datastore (for convenience) JKQTPlotter plot; - plot.get_plotter()->set_useAntiAliasingForGraphs(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForSystem(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForText(true); // nicer (but slower) text rendering + 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 JKQTPDatastore* ds=plot.getDatastore(); // 2. now we create data for three simple barchart @@ -65,19 +65,19 @@ int main(int argc, char* argv[]) // 7. data is grouped into 5 numbere groups (1..5), but we also have string // labels for these groups (stored in L). In order to display these labels, // we have to tell the x-Axis to use these special labels: - plot.get_xAxis()->addAxisTickLabels(X, L, Ndata); + plot.getXAxis()->addAxisTickLabels(X, L, Ndata); // also we can rotate the labels a bit (by 45 degree), so they fit better - plot.get_xAxis()->set_tickLabelAngle(45); - plot.get_xAxis()->set_tickLabelFontSize(12); + plot.getXAxis()->set_tickLabelAngle(45); + plot.getXAxis()->set_tickLabelFontSize(12); // 8. finally we move the plot key/legend to the outside, top-right // and lay it out as a single row // NOTE: plot is a descendent of QWidget, which uses an internal object of // type JKQTBasePlotter, which does the actual plotting. // So many properties of the plot are only available in this internal - // object, which you can access by plot.get_plotter(). - plot.get_plotter()->set_keyPosition(JKQTPKeyOutsideTopRight); - plot.get_plotter()->set_keyLayout(JKQTPKeyLayoutOneRow); + // object, which you can access by plot.getPlotter(). + plot.getPlotter()->setKeyPosition(JKQTPKeyOutsideTopRight); + plot.getPlotter()->setKeyLayout(JKQTPKeyLayoutOneRow); // 9 autoscale the plot so the graph is contained plot.zoomToFit(); diff --git a/examples/simpletest_barchart/jkqtplotter_simpletest_barchart.cpp b/examples/simpletest_barchart/jkqtplotter_simpletest_barchart.cpp index 4cec215a38..5c105ca9fd 100644 --- a/examples/simpletest_barchart/jkqtplotter_simpletest_barchart.cpp +++ b/examples/simpletest_barchart/jkqtplotter_simpletest_barchart.cpp @@ -16,9 +16,9 @@ int main(int argc, char* argv[]) // 1. create a plotter window and get a pointer to the internal datastore (for convenience) JKQTPlotter plot; - plot.get_plotter()->set_useAntiAliasingForGraphs(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForSystem(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForText(true); // nicer (but slower) text rendering + 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 JKQTPDatastore* ds=plot.getDatastore(); // 2. now we create data for three simple barchart @@ -69,19 +69,19 @@ int main(int argc, char* argv[]) // 7. data is grouped into 5 numbere groups (1..5), but we also have string // labels for these groups (stored in L). In order to display these labels, // we have to tell the x-Axis to use these special labels: - plot.get_xAxis()->addAxisTickLabels(X, L, Ndata); + plot.getXAxis()->addAxisTickLabels(X, L, Ndata); // also we can rotate the labels a bit (by 45 degree), so they fit better - plot.get_xAxis()->set_tickLabelAngle(45); - plot.get_xAxis()->set_tickLabelFontSize(12); + plot.getXAxis()->set_tickLabelAngle(45); + plot.getXAxis()->set_tickLabelFontSize(12); // 8. finally we move the plot key/legend to the outside, top-right // and lay it out as a single row // NOTE: plot is a descendent of QWidget, which uses an internal object of // type JKQTBasePlotter, which does the actual plotting. // So many properties of the plot are only available in this internal - // object, which you can access by plot.get_plotter(). - plot.get_plotter()->set_keyPosition(JKQTPKeyOutsideTopRight); - plot.get_plotter()->set_keyLayout(JKQTPKeyLayoutOneRow); + // object, which you can access by plot.getPlotter(). + plot.getPlotter()->setKeyPosition(JKQTPKeyOutsideTopRight); + plot.getPlotter()->setKeyLayout(JKQTPKeyLayoutOneRow); // 9 autoscale the plot so the graph is contained plot.zoomToFit(); diff --git a/examples/simpletest_boxplot/jkqtplotter_simpletest_boxplot.cpp b/examples/simpletest_boxplot/jkqtplotter_simpletest_boxplot.cpp index bdfd50a824..3c7ab663ed 100644 --- a/examples/simpletest_boxplot/jkqtplotter_simpletest_boxplot.cpp +++ b/examples/simpletest_boxplot/jkqtplotter_simpletest_boxplot.cpp @@ -15,9 +15,9 @@ int main(int argc, char* argv[]) // 1. create a plotter window and get a pointer to the internal datastore (for convenience) JKQTPlotter plot; - plot.get_plotter()->set_useAntiAliasingForGraphs(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForSystem(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForText(true); // nicer (but slower) text rendering + 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 JKQTPDatastore* ds=plot.getDatastore(); // 2. now we create data for the boxplots @@ -98,7 +98,7 @@ int main(int argc, char* argv[]) plot.zoomToFit(); // 9. Move key to top-left - plot.get_plotter()->set_keyPosition(JKQTPKeyInsideTopLeft); + plot.getPlotter()->setKeyPosition(JKQTPKeyInsideTopLeft); // show plotter and make it a decent size plot.show(); diff --git a/examples/simpletest_dateaxes/README.md b/examples/simpletest_dateaxes/README.md index d18ff8ae7c..cdf2af47c1 100644 --- a/examples/simpletest_dateaxes/README.md +++ b/examples/simpletest_dateaxes/README.md @@ -81,7 +81,7 @@ On top of that plot, a second plot is added, which draws the average temperature // don't use symbols graphTemperature->set_symbol(JKQTPNoSymbol); // set the line width - graphTemperature->set_lineWidth(1); + graphTemperature->setLineWidth(1); // draw small symbols graphTemperature->set_symbolSize(6); // graph title @@ -94,14 +94,14 @@ Finally the x-axis is formatted to display dates (see [Qt-Documentation of `QDat ```.cpp // 7. format the plot // set the title above the plot, use LaTeX instructions to make text bold - plot.get_plotter()->set_plotLabel("\\textbf{Weather in Gelsenkirchen, 2017-2018}"); + plot.getPlotter()->setPlotLabel("\\textbf{Weather in Gelsenkirchen, 2017-2018}"); // set x-axis date-time-axis - plot.get_xAxis()->set_labelType(JKQTPCALTdatetime); - plot.get_xAxis()->set_axisLabel("Date"); + plot.getXAxis()->set_labelType(JKQTPCALTdatetime); + plot.getXAxis()->setAxisLabel("Date"); // set format string for date axis (e.g. Jan '18), see Documentation of QDateTime::toString() - plot.get_xAxis()->set_tickDateTimeFormat("MMM ''yy"); + plot.getXAxis()->set_tickDateTimeFormat("MMM ''yy"); // set y-axis temperature axis - plot.get_yAxis()->set_axisLabel("Average Daily Temperature [{\\degree}C]"); + plot.getYAxis()->setAxisLabel("Average Daily Temperature [{\\degree}C]"); ``` The result looks like this: @@ -153,14 +153,14 @@ Axis formating for this example is done like this: ```.cpp // 7. format the plot // set the title above the plot, use LaTeX instructions to make text bold - plot.get_plotter()->set_plotLabel("\\textbf{Weather in Heidelberg, 14^{th} Oct 2018}"); + plot.getPlotter()->setPlotLabel("\\textbf{Weather in Heidelberg, 14^{th} Oct 2018}"); // set x-axis date-time-axis - plot.get_xAxis()->set_labelType(JKQTPCALTtime); - plot.get_xAxis()->set_axisLabel("Time of Day"); + plot.getXAxis()->set_labelType(JKQTPCALTtime); + plot.getXAxis()->setAxisLabel("Time of Day"); // set format string for time axis with 24-hour and minute only, // see QDateTime::toString() documentation for details on format strings - plot.get_xAxis()->set_tickTimeFormat("HH:mm"); + plot.getXAxis()->set_tickTimeFormat("HH:mm"); // set y-axis temperature axis - plot.get_yAxis()->set_axisLabel("Temperature [{\\degree}C]"); + plot.getYAxis()->setAxisLabel("Temperature [{\\degree}C]"); ``` diff --git a/examples/simpletest_dateaxes/jkqtplotter_simpletest_dateaxes.cpp b/examples/simpletest_dateaxes/jkqtplotter_simpletest_dateaxes.cpp index e0085b543e..57e36435d2 100644 --- a/examples/simpletest_dateaxes/jkqtplotter_simpletest_dateaxes.cpp +++ b/examples/simpletest_dateaxes/jkqtplotter_simpletest_dateaxes.cpp @@ -69,7 +69,7 @@ void drawWithDateAxis(JKQTPlotter& plot) { // don't use symbols graphTemperature->set_symbol(JKQTPNoSymbol); // set the line width - graphTemperature->set_lineWidth(1); + graphTemperature->setLineWidth(1); // draw small symbols graphTemperature->set_symbolSize(6); // graph title @@ -80,14 +80,14 @@ void drawWithDateAxis(JKQTPlotter& plot) { // 7. format the plot // set the title above the plot, use LaTeX instructions to make text bold - plot.get_plotter()->set_plotLabel("\\textbf{Weather in Gelsenkirchen, 2017-2018}"); + plot.getPlotter()->setPlotLabel("\\textbf{Weather in Gelsenkirchen, 2017-2018}"); // set x-axis date-time-axis - plot.get_xAxis()->set_labelType(JKQTPCALTdatetime); - plot.get_xAxis()->set_axisLabel("Date"); + plot.getXAxis()->set_labelType(JKQTPCALTdatetime); + plot.getXAxis()->setAxisLabel("Date"); // set format string for date axis (e.g. Jan '18), see Documentation of QDateTime::toString() - plot.get_xAxis()->set_tickDateTimeFormat("MMM ''yy"); + plot.getXAxis()->set_tickDateTimeFormat("MMM ''yy"); // set y-axis temperature axis - plot.get_yAxis()->set_axisLabel("Average Daily Temperature [{\\degree}C]"); + plot.getYAxis()->setAxisLabel("Average Daily Temperature [{\\degree}C]"); // 8. autoscale the plot so the graph is contained plot.zoomToFit(); @@ -136,7 +136,7 @@ void drawWithTimeAxis(JKQTPlotter& plot) { // don't use symbols graphTemperature->set_symbol(JKQTPCross); // set the line width - graphTemperature->set_lineWidth(1); + graphTemperature->setLineWidth(1); // draw small symbols graphTemperature->set_symbolSize(6); // graph title @@ -147,15 +147,15 @@ void drawWithTimeAxis(JKQTPlotter& plot) { // 7. format the plot // set the title above the plot, use LaTeX instructions to make text bold - plot.get_plotter()->set_plotLabel("\\textbf{Weather in Heidelberg, 14^{th} Oct 2018}"); + plot.getPlotter()->setPlotLabel("\\textbf{Weather in Heidelberg, 14^{th} Oct 2018}"); // set x-axis date-time-axis - plot.get_xAxis()->set_labelType(JKQTPCALTtime); - plot.get_xAxis()->set_axisLabel("Time of Day"); + plot.getXAxis()->set_labelType(JKQTPCALTtime); + plot.getXAxis()->setAxisLabel("Time of Day"); // set format string for time axis with 24-hour and minute only, // see QDateTime::toString() documentation for details on format strings - plot.get_xAxis()->set_tickTimeFormat("HH:mm"); + plot.getXAxis()->set_tickTimeFormat("HH:mm"); // set y-axis temperature axis - plot.get_yAxis()->set_axisLabel("Temperature [{\\degree}C]"); + plot.getYAxis()->setAxisLabel("Temperature [{\\degree}C]"); // 8. autoscale the plot so the graph is contained plot.zoomToFit(); diff --git a/examples/simpletest_errorbarstyles/README.md b/examples/simpletest_errorbarstyles/README.md index 9e99a091d4..493e6e721f 100644 --- a/examples/simpletest_errorbarstyles/README.md +++ b/examples/simpletest_errorbarstyles/README.md @@ -57,7 +57,7 @@ First some data is added to the internal datastore (mostly, like explained in se // set width of symbol lines graph->set_symbolWidth(1); // set width of graph line - graph->set_lineWidth(1); + graph->setLineWidth(1); // graph title is made from symbol+errorStylestyle, we use the LaTeX instruction \verb around the // result of JKQTPErrorPlotstyle2String(), because it contains underscores that would otherwise @@ -94,12 +94,12 @@ There are more properties that you can find in the documentation of the mix-in c In addition the plot key is moved outside the pot and the grid in the plot is switched off: ```.cpp // 6. change locaion of key (outside top-right) - plot.get_plotter()->set_keyPosition(JKQTPKeyOutsideRightTop); + plot.getPlotter()->setKeyPosition(JKQTPKeyOutsideRightTop); // ... and switch off the grid - plot.get_xAxis()->set_drawGrid(false); - plot.get_xAxis()->set_drawMinorGrid(false); - plot.get_yAxis()->set_drawGrid(false); - plot.get_yAxis()->set_drawMinorGrid(false); + plot.getXAxis()->set_drawGrid(false); + plot.getXAxis()->set_drawMinorGrid(false); + plot.getYAxis()->set_drawGrid(false); + plot.getYAxis()->set_drawMinorGrid(false); ``` The result looks like this: diff --git a/examples/simpletest_errorbarstyles/jkqtplotter_simpletest_errorbarstyles.cpp b/examples/simpletest_errorbarstyles/jkqtplotter_simpletest_errorbarstyles.cpp index 7bde017f75..2490b6a902 100644 --- a/examples/simpletest_errorbarstyles/jkqtplotter_simpletest_errorbarstyles.cpp +++ b/examples/simpletest_errorbarstyles/jkqtplotter_simpletest_errorbarstyles.cpp @@ -86,7 +86,7 @@ int main(int argc, char* argv[]) // set width of symbol lines graph->set_symbolWidth(1); // set width of graph line - graph->set_lineWidth(1); + graph->setLineWidth(1); // graph title is made from symbol+errorStylestyle, we use the LaTeX instruction \verb around the // result of JKQTPErrorPlotstyle2String(), because it contains underscores that would otherwise @@ -101,12 +101,12 @@ int main(int argc, char* argv[]) plot.zoomToFit(); // 6. change locaion of key (outside top-right) - plot.get_plotter()->set_keyPosition(JKQTPKeyOutsideRightTop); + plot.getPlotter()->setKeyPosition(JKQTPKeyOutsideRightTop); // ... and switch off the grid - plot.get_xAxis()->set_drawGrid(false); - plot.get_xAxis()->set_drawMinorGrid(false); - plot.get_yAxis()->set_drawGrid(false); - plot.get_yAxis()->set_drawMinorGrid(false); + plot.getXAxis()->set_drawGrid(false); + plot.getXAxis()->set_drawMinorGrid(false); + plot.getYAxis()->set_drawGrid(false); + plot.getYAxis()->set_drawMinorGrid(false); // 7. show plotter and make it a decent size plot.show(); diff --git a/examples/simpletest_filledgraphs/jkqtplotter_simpletest_filledgraphs.cpp b/examples/simpletest_filledgraphs/jkqtplotter_simpletest_filledgraphs.cpp index 49ab077879..6f55a551bb 100644 --- a/examples/simpletest_filledgraphs/jkqtplotter_simpletest_filledgraphs.cpp +++ b/examples/simpletest_filledgraphs/jkqtplotter_simpletest_filledgraphs.cpp @@ -70,9 +70,9 @@ int main(int argc, char* argv[]) col.setAlphaF(0.25); graphG->set_fillColor(col); col=QColor("blue"); graphB->set_color(col); col.setAlphaF(0.25); graphB->set_fillColor(col); - graphR->set_lineWidth(1); - graphG->set_lineWidth(1); - graphB->set_lineWidth(1); + graphR->setLineWidth(1); + graphG->setLineWidth(1); + graphB->setLineWidth(1); // set data graphR->set_xColumn(columnX); graphR->set_yColumn(columnR); @@ -86,8 +86,8 @@ int main(int argc, char* argv[]) plot.addGraph(graphR); // 5. set axis labels - plot.get_xAxis()->set_axisLabel("R/G/B-value"); - plot.get_yAxis()->set_axisLabel("normalized frequency [%]"); + plot.getXAxis()->setAxisLabel("R/G/B-value"); + plot.getYAxis()->setAxisLabel("normalized frequency [%]"); // 4. set the maximum size of the plot to 0..100% and 0..256 diff --git a/examples/simpletest_functionplot/README.md b/examples/simpletest_functionplot/README.md index 23adf13f18..26165ca5da 100644 --- a/examples/simpletest_functionplot/README.md +++ b/examples/simpletest_functionplot/README.md @@ -6,7 +6,7 @@ This project (see `./examples/simpletest_functionplot/`) demonstrates how to plo The first example shows how to plot a C++ inline function: ```.cpp JKQTPXFunctionLineGraph* func1=new JKQTPXFunctionLineGraph(plot); - func1->set_plotFunction([](double x) { return 0.2*x*x-0.015*x*x*x; }); + func1->setPlotFunction([](double x) { return 0.2*x*x-0.015*x*x*x; }); func1->set_title("C++-inline function $0.2x^2-0.015x^3$"); plot->addGraph(func1); ``` @@ -15,7 +15,7 @@ The first example shows how to plot a C++ inline function: In any such plot function, you can also use parameters, provided via the second parameter. Usually these are "internal parameters", defined by `func2->set_paramsV(p0, p1, ...)`: ```.cpp JKQTPXFunctionLineGraph* func2=new JKQTPXFunctionLineGraph(plot); - func2->set_plotFunction([](double x, void* params) { + func2->setPlotFunction([](double x, void* params) { QVector* p=static_cast*>(params); return p->at(0)*sin(2.0*M_PI*x*p->at(1)); }); @@ -28,7 +28,7 @@ In any such plot function, you can also use parameters, provided via the second ... but generally any pointer can be used as parameter (the set by `set_parameter(static_cast(myDataObject))`): ```.cpp JKQTPXFunctionLineGraph* func3=new JKQTPXFunctionLineGraph(plot); - func3->set_plotFunction([](double x, void* params) { + func3->setPlotFunction([](double x, void* params) { QMap* p=static_cast*>(params); return p->value("amplitude")*sin(2.0*M_PI*x*p->value("frequency")); }); @@ -57,7 +57,7 @@ You can also use C++ functors (or function objects): // ... JKQTPXFunctionLineGraph* func4=new JKQTPXFunctionLineGraph(plot); - func4->set_plotFunction(SincSqr(-8)); + func4->setPlotFunction(SincSqr(-8)); func4->set_title("C++ functor $-8*\\sin^2(x)/x^2$"); plot->addGraph(func4); ``` @@ -72,7 +72,7 @@ You can also plot simple static C functions: // ... JKQTPXFunctionLineGraph* func5=new JKQTPXFunctionLineGraph(plot); - func5->set_plotFunction(&sinc); + func5->setPlotFunction(&sinc); func5->set_title("static C function $10*\\sin(x)/x$"); plot->addGraph(func5); ``` diff --git a/examples/simpletest_functionplot/jkqtplotter_simpletest_functionplot.cpp b/examples/simpletest_functionplot/jkqtplotter_simpletest_functionplot.cpp index a3238d8c06..a126968c8b 100644 --- a/examples/simpletest_functionplot/jkqtplotter_simpletest_functionplot.cpp +++ b/examples/simpletest_functionplot/jkqtplotter_simpletest_functionplot.cpp @@ -39,7 +39,7 @@ int main(int argc, char* argv[]) // 2. now we add a JKQTPXFunctionLineGraph object, which will draw a simple function // the function is defined as C++ inline function JKQTPXFunctionLineGraph* func1=new JKQTPXFunctionLineGraph(plot); - func1->set_plotFunction([](double x) { return 0.2*x*x-0.015*x*x*x; }); + func1->setPlotFunction([](double x) { return 0.2*x*x-0.015*x*x*x; }); func1->set_title("C++-inline function $0.2x^2-0.015x^3$"); plot->addGraph(func1); @@ -47,7 +47,7 @@ int main(int argc, char* argv[]) // the function is again defined as C++ inline function, but now uses internal // parameters (handed over to the function as a pointer to QVector JKQTPXFunctionLineGraph* func2=new JKQTPXFunctionLineGraph(plot); - func2->set_plotFunction([](double x, void* params) { + func2->setPlotFunction([](double x, void* params) { QVector* p=static_cast*>(params); return p->at(0)*sin(2.0*M_PI*x*p->at(1)); }); @@ -60,7 +60,7 @@ int main(int argc, char* argv[]) // the function is again defined as C++ inline function, but now uses external // parameters, which may have any type (here QMapset_plotFunction([](double x, void* params) { + func3->setPlotFunction([](double x, void* params) { QMap* p=static_cast*>(params); return p->value("amplitude")*sin(2.0*M_PI*x*p->value("frequency")); }); @@ -74,14 +74,14 @@ int main(int argc, char* argv[]) // 5. of course the function may also be any C+ funtor object: JKQTPXFunctionLineGraph* func4=new JKQTPXFunctionLineGraph(plot); - func4->set_plotFunction(SincSqr(-8)); + func4->setPlotFunction(SincSqr(-8)); func4->set_title("C++ functor $-8*\\sin^2(x)/x^2$"); plot->addGraph(func4); // 6. now we use a JKQTPXFunctionLineGraph to draw a static C function JKQTPXFunctionLineGraph* func5=new JKQTPXFunctionLineGraph(plot); - func5->set_plotFunction(&sinc); + func5->setPlotFunction(&sinc); func5->set_title("static C function $10*\\sin(x)/x$"); plot->addGraph(func5); @@ -107,9 +107,9 @@ int main(int argc, char* argv[]) // 8. set some axis properties (we use LaTeX for nice equation rendering) - plot->get_xAxis()->set_axisLabel(QObject::tr("x-axis")); - plot->get_yAxis()->set_axisLabel(QObject::tr("y-axis")); - plot->get_plotter()->set_keyPosition(JKQTPKeyOutsideBottomLeft); + plot->getXAxis()->setAxisLabel(QObject::tr("x-axis")); + plot->getYAxis()->setAxisLabel(QObject::tr("y-axis")); + plot->getPlotter()->setKeyPosition(JKQTPKeyOutsideBottomLeft); // 4. scale the plot so the graph is contained diff --git a/examples/simpletest_geometric/jkqtplotter_simpletest_geometric.cpp b/examples/simpletest_geometric/jkqtplotter_simpletest_geometric.cpp index ab25d1d603..5ae160c285 100644 --- a/examples/simpletest_geometric/jkqtplotter_simpletest_geometric.cpp +++ b/examples/simpletest_geometric/jkqtplotter_simpletest_geometric.cpp @@ -20,13 +20,13 @@ int main(int argc, char* argv[]) // 2.1 set the graph scales manually plot.setXY(0,3.05,0,3.05); // 2.2 set the asxpect ratio to 1 - plot.get_plotter()->set_maintainAspectRatio(true); - plot.get_plotter()->set_aspectRatio(1); - plot.get_plotter()->set_maintainAxisAspectRatio(true); - plot.get_plotter()->set_axisAspectRatio(1); + plot.getPlotter()->setMaintainAspectRatio(true); + plot.getPlotter()->setAspectRatio(1); + plot.getPlotter()->setMaintainAxisAspectRatio(true); + plot.getPlotter()->setAxisAspectRatio(1); // 2.3 set the asxpect ratio to 1 - plot.get_xAxis()->set_drawGrid(false); - plot.get_yAxis()->set_drawGrid(false); + plot.getXAxis()->set_drawGrid(false); + plot.getYAxis()->set_drawGrid(false); // 3. add some geometric plots diff --git a/examples/simpletest_imageplot/README.md b/examples/simpletest_imageplot/README.md index 28e03f94ba..2ac3cbbc5f 100644 --- a/examples/simpletest_imageplot/README.md +++ b/examples/simpletest_imageplot/README.md @@ -19,9 +19,9 @@ int main(int argc, char* argv[]) JKQTPlotter plot; // 1. create a plotter window and get a pointer to the internal datastore (for convenience) - plot.get_plotter()->set_useAntiAliasingForGraphs(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForSystem(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForText(true); // nicer (but slower) text rendering + 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 JKQTPDatastore* ds=plot.getDatastore(); // 2. now we create data for the charts (taken from https://commons.wikimedia.org/wiki/File:Energiemix_Deutschland.svg) @@ -77,7 +77,7 @@ int main(int argc, char* argv[]) // color-map is "MATLAB" graph->set_palette(JKQTPMathImageMATLAB); // get coordinate axis of color-bar and set its label - graph->get_colorBarRightAxis()->set_axisLabel("light intensity [A.U.]"); + graph->get_colorBarRightAxis()->setAxisLabel("light intensity [A.U.]"); // determine min/max of data automatically and use it to set the range of the color-scale graph->set_autoImageRange(true); @@ -88,13 +88,13 @@ int main(int argc, char* argv[]) // 6. set axis labels - plot.get_xAxis()->set_axisLabel("x [{\\mu}m]"); - plot.get_yAxis()->set_axisLabel("y [{\\mu}m]"); + plot.getXAxis()->setAxisLabel("x [{\\mu}m]"); + plot.getYAxis()->setAxisLabel("y [{\\mu}m]"); // 7. fix axis and plot aspect ratio to 1 - plot.get_plotter()->set_maintainAspectRatio(true); - plot.get_plotter()->set_maintainAxisAspectRatio(true); + plot.getPlotter()->setMaintainAspectRatio(true); + plot.getPlotter()->setMaintainAxisAspectRatio(true); // 8 autoscale the plot so the graph is contained plot.zoomToFit(); diff --git a/examples/simpletest_imageplot/jkqtplotter_simpletest_imageplot.cpp b/examples/simpletest_imageplot/jkqtplotter_simpletest_imageplot.cpp index 33e5a01613..c49277cce0 100644 --- a/examples/simpletest_imageplot/jkqtplotter_simpletest_imageplot.cpp +++ b/examples/simpletest_imageplot/jkqtplotter_simpletest_imageplot.cpp @@ -20,9 +20,9 @@ int main(int argc, char* argv[]) JKQTPlotter plot; // 1. create a plotter window and get a pointer to the internal datastore (for convenience) - plot.get_plotter()->set_useAntiAliasingForGraphs(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForSystem(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForText(true); // nicer (but slower) text rendering + 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 JKQTPDatastore* ds=plot.getDatastore(); // 2. now we create data for the charts (taken from https://commons.wikimedia.org/wiki/File:Energiemix_Deutschland.svg) @@ -78,7 +78,7 @@ int main(int argc, char* argv[]) // color-map is "MATLAB" graph->set_palette(JKQTPMathImageMATLAB); // get coordinate axis of color-bar and set its label - graph->get_colorBarRightAxis()->set_axisLabel("light intensity [A.U.]"); + graph->get_colorBarRightAxis()->setAxisLabel("light intensity [A.U.]"); // determine min/max of data automatically and use it to set the range of the color-scale graph->set_autoImageRange(true); // you can set the color-scale range manually by using: @@ -92,13 +92,13 @@ int main(int argc, char* argv[]) // 6. set axis labels - plot.get_xAxis()->set_axisLabel("x [{\\mu}m]"); - plot.get_yAxis()->set_axisLabel("y [{\\mu}m]"); + plot.getXAxis()->setAxisLabel("x [{\\mu}m]"); + plot.getYAxis()->setAxisLabel("y [{\\mu}m]"); // 7. fix axis and plot aspect ratio to 1 - plot.get_plotter()->set_maintainAspectRatio(true); - plot.get_plotter()->set_maintainAxisAspectRatio(true); + plot.getPlotter()->setMaintainAspectRatio(true); + plot.getPlotter()->setMaintainAxisAspectRatio(true); // 8 autoscale the plot so the graph is contained plot.zoomToFit(); diff --git a/examples/simpletest_imageplot_modifier/README.md b/examples/simpletest_imageplot_modifier/README.md index 089913f896..3b1d9a1fce 100644 --- a/examples/simpletest_imageplot_modifier/README.md +++ b/examples/simpletest_imageplot_modifier/README.md @@ -19,9 +19,9 @@ int main(int argc, char* argv[]) JKQTPlotter plot; // 1. create a plotter window and get a pointer to the internal datastore (for convenience) - plot.get_plotter()->set_useAntiAliasingForGraphs(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForSystem(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForText(true); // nicer (but slower) text rendering + 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 JKQTPDatastore* ds=plot.getDatastore(); // 2. now we create data for the charts (taken from https://commons.wikimedia.org/wiki/File:Energiemix_Deutschland.svg) @@ -86,13 +86,13 @@ int main(int argc, char* argv[]) // 6. set axis labels - plot.get_xAxis()->set_axisLabel("x [{\\mu}m]"); - plot.get_yAxis()->set_axisLabel("y [{\\mu}m]"); + plot.getXAxis()->setAxisLabel("x [{\\mu}m]"); + plot.getYAxis()->setAxisLabel("y [{\\mu}m]"); // 7. fix axis and plot aspect ratio to 1 - plot.get_plotter()->set_maintainAspectRatio(true); - plot.get_plotter()->set_maintainAxisAspectRatio(true); + plot.getPlotter()->setMaintainAspectRatio(true); + plot.getPlotter()->setMaintainAxisAspectRatio(true); // 8 autoscale the plot so the graph is contained plot.zoomToFit(); diff --git a/examples/simpletest_imageplot_modifier/jkqtplotter_simpletest_imageplot_modifier.cpp b/examples/simpletest_imageplot_modifier/jkqtplotter_simpletest_imageplot_modifier.cpp index e16d3cf0b1..e6efa0ed71 100644 --- a/examples/simpletest_imageplot_modifier/jkqtplotter_simpletest_imageplot_modifier.cpp +++ b/examples/simpletest_imageplot_modifier/jkqtplotter_simpletest_imageplot_modifier.cpp @@ -20,9 +20,9 @@ int main(int argc, char* argv[]) JKQTPlotter plot; // 1. create a plotter window and get a pointer to the internal datastore (for convenience) - plot.get_plotter()->set_useAntiAliasingForGraphs(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForSystem(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForText(true); // nicer (but slower) text rendering + 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 JKQTPDatastore* ds=plot.getDatastore(); // 2. now we create data for the charts (taken from https://commons.wikimedia.org/wiki/File:Energiemix_Deutschland.svg) @@ -87,13 +87,13 @@ int main(int argc, char* argv[]) // 6. set axis labels - plot.get_xAxis()->set_axisLabel("x [{\\mu}m]"); - plot.get_yAxis()->set_axisLabel("y [{\\mu}m]"); + plot.getXAxis()->setAxisLabel("x [{\\mu}m]"); + plot.getYAxis()->setAxisLabel("y [{\\mu}m]"); // 7. fix axis and plot aspect ratio to 1 - plot.get_plotter()->set_maintainAspectRatio(true); - plot.get_plotter()->set_maintainAxisAspectRatio(true); + plot.getPlotter()->setMaintainAspectRatio(true); + plot.getPlotter()->setMaintainAxisAspectRatio(true); // 8 autoscale the plot so the graph is contained plot.zoomToFit(); diff --git a/examples/simpletest_imageplot_nodatastore/README.md b/examples/simpletest_imageplot_nodatastore/README.md index a3d76e5a04..4b44d1d527 100644 --- a/examples/simpletest_imageplot_nodatastore/README.md +++ b/examples/simpletest_imageplot_nodatastore/README.md @@ -19,9 +19,9 @@ int main(int argc, char* argv[]) JKQTPlotter plot; // 1. create a plotter window and get a pointer to the internal datastore (for convenience) - plot.get_plotter()->set_useAntiAliasingForGraphs(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForSystem(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForText(true); // nicer (but slower) text rendering + 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. now we create data for the charts (taken from https://commons.wikimedia.org/wiki/File:Energiemix_Deutschland.svg) const int NX=100; // image dimension in x-direction [pixels] @@ -66,7 +66,7 @@ int main(int argc, char* argv[]) // color-map is "BLUEYELLOW" graph->set_palette(JKQTPMathImageBLUEYELLOW); // get coordinate axis of color-bar and set its label - graph->get_colorBarRightAxis()->set_axisLabel("light intensity [A.U.]"); + graph->get_colorBarRightAxis()->setAxisLabel("light intensity [A.U.]"); // determine min/max of data automatically and use it to set the range of the color-scale graph->set_autoImageRange(true); // you can set the color-scale range manually by using: @@ -80,13 +80,13 @@ int main(int argc, char* argv[]) // 5. set axis labels - plot.get_xAxis()->set_axisLabel("x [{\\mu}m]"); - plot.get_yAxis()->set_axisLabel("y [{\\mu}m]"); + plot.getXAxis()->setAxisLabel("x [{\\mu}m]"); + plot.getYAxis()->setAxisLabel("y [{\\mu}m]"); // 6. fix axis and plot aspect ratio to 1 - plot.get_plotter()->set_maintainAspectRatio(true); - plot.get_plotter()->set_maintainAxisAspectRatio(true); + plot.getPlotter()->setMaintainAspectRatio(true); + plot.getPlotter()->setMaintainAxisAspectRatio(true); // 7. autoscale the plot so the graph is contained plot.zoomToFit(); diff --git a/examples/simpletest_imageplot_nodatastore/jkqtplotter_simpletest_imageplot_nodatastore.cpp b/examples/simpletest_imageplot_nodatastore/jkqtplotter_simpletest_imageplot_nodatastore.cpp index 7f0a3dcb67..331c896d18 100644 --- a/examples/simpletest_imageplot_nodatastore/jkqtplotter_simpletest_imageplot_nodatastore.cpp +++ b/examples/simpletest_imageplot_nodatastore/jkqtplotter_simpletest_imageplot_nodatastore.cpp @@ -20,9 +20,9 @@ int main(int argc, char* argv[]) JKQTPlotter plot; // 1. create a plotter window and get a pointer to the internal datastore (for convenience) - plot.get_plotter()->set_useAntiAliasingForGraphs(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForSystem(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForText(true); // nicer (but slower) text rendering + 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. now we create data for the charts (taken from https://commons.wikimedia.org/wiki/File:Energiemix_Deutschland.svg) const int NX=100; // image dimension in x-direction [pixels] @@ -67,7 +67,7 @@ int main(int argc, char* argv[]) // color-map is "BLUEYELLOW" graph->set_palette(JKQTPMathImageBLUEYELLOW); // get coordinate axis of color-bar and set its label - graph->get_colorBarRightAxis()->set_axisLabel("light intensity [A.U.]"); + graph->get_colorBarRightAxis()->setAxisLabel("light intensity [A.U.]"); // determine min/max of data automatically and use it to set the range of the color-scale graph->set_autoImageRange(true); // you can set the color-scale range manually by using: @@ -81,13 +81,13 @@ int main(int argc, char* argv[]) // 5. set axis labels - plot.get_xAxis()->set_axisLabel("x [{\\mu}m]"); - plot.get_yAxis()->set_axisLabel("y [{\\mu}m]"); + plot.getXAxis()->setAxisLabel("x [{\\mu}m]"); + plot.getYAxis()->setAxisLabel("y [{\\mu}m]"); // 6. fix axis and plot aspect ratio to 1 - plot.get_plotter()->set_maintainAspectRatio(true); - plot.get_plotter()->set_maintainAxisAspectRatio(true); + plot.getPlotter()->setMaintainAspectRatio(true); + plot.getPlotter()->setMaintainAxisAspectRatio(true); // 7. autoscale the plot so the graph is contained plot.zoomToFit(); diff --git a/examples/simpletest_imageplot_opencv/README.md b/examples/simpletest_imageplot_opencv/README.md index d9ac6e79f8..0b3b00cef2 100644 --- a/examples/simpletest_imageplot_opencv/README.md +++ b/examples/simpletest_imageplot_opencv/README.md @@ -26,9 +26,9 @@ int main(int argc, char* argv[]) // 1. create a plotter window and get a pointer to the internal datastore (for convenience) - plot.get_plotter()->set_useAntiAliasingForGraphs(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForSystem(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForText(true); // nicer (but slower) text rendering + 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 JKQTPDatastore* ds=plot.getDatastore(); @@ -82,7 +82,7 @@ int main(int argc, char* argv[]) // color-map is "MATLAB" graph->set_palette(JKQTPMathImageMATLAB); // get coordinate axis of color-bar and set its label - graph->get_colorBarRightAxis()->set_axisLabel("light intensity [A.U.]"); + graph->get_colorBarRightAxis()->setAxisLabel("light intensity [A.U.]"); // determine min/max of data automatically and use it to set the range of the color-scale graph->set_autoImageRange(true); // you can set the color-scale range manually by using: @@ -95,12 +95,12 @@ int main(int argc, char* argv[]) plot.addGraph(graph); // 6. set axis labels - plot.get_xAxis()->set_axisLabel("x [{\\mu}m]"); - plot.get_yAxis()->set_axisLabel("y [{\\mu}m]"); + plot.getXAxis()->setAxisLabel("x [{\\mu}m]"); + plot.getYAxis()->setAxisLabel("y [{\\mu}m]"); // 7. fix axis and plot aspect ratio to 1 - plot.get_plotter()->set_maintainAspectRatio(true); - plot.get_plotter()->set_maintainAxisAspectRatio(true); + plot.getPlotter()->setMaintainAspectRatio(true); + plot.getPlotter()->setMaintainAxisAspectRatio(true); // 8 autoscale the plot so the graph is contained plot.zoomToFit(); diff --git a/examples/simpletest_imageplot_opencv/jkqtplotter_simpletest_imageplot_opencv.cpp b/examples/simpletest_imageplot_opencv/jkqtplotter_simpletest_imageplot_opencv.cpp index 3d36c7a4d1..0b897b6467 100644 --- a/examples/simpletest_imageplot_opencv/jkqtplotter_simpletest_imageplot_opencv.cpp +++ b/examples/simpletest_imageplot_opencv/jkqtplotter_simpletest_imageplot_opencv.cpp @@ -25,9 +25,9 @@ int main(int argc, char* argv[]) // 1. create a plotter window and get a pointer to the internal datastore (for convenience) - plot.get_plotter()->set_useAntiAliasingForGraphs(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForSystem(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForText(true); // nicer (but slower) text rendering + 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 JKQTPDatastore* ds=plot.getDatastore(); @@ -81,7 +81,7 @@ int main(int argc, char* argv[]) // color-map is "MATLAB" graph->set_palette(JKQTPMathImageMATLAB); // get coordinate axis of color-bar and set its label - graph->get_colorBarRightAxis()->set_axisLabel("light intensity [A.U.]"); + graph->get_colorBarRightAxis()->setAxisLabel("light intensity [A.U.]"); // determine min/max of data automatically and use it to set the range of the color-scale graph->set_autoImageRange(true); // you can set the color-scale range manually by using: @@ -94,12 +94,12 @@ int main(int argc, char* argv[]) plot.addGraph(graph); // 6. set axis labels - plot.get_xAxis()->set_axisLabel("x [{\\mu}m]"); - plot.get_yAxis()->set_axisLabel("y [{\\mu}m]"); + plot.getXAxis()->setAxisLabel("x [{\\mu}m]"); + plot.getYAxis()->setAxisLabel("y [{\\mu}m]"); // 7. fix axis and plot aspect ratio to 1 - plot.get_plotter()->set_maintainAspectRatio(true); - plot.get_plotter()->set_maintainAxisAspectRatio(true); + plot.getPlotter()->setMaintainAspectRatio(true); + plot.getPlotter()->setMaintainAxisAspectRatio(true); // 8 autoscale the plot so the graph is contained plot.zoomToFit(); diff --git a/examples/simpletest_impulsesplot/README.md b/examples/simpletest_impulsesplot/README.md index 9867a83c90..a9580c39f7 100644 --- a/examples/simpletest_impulsesplot/README.md +++ b/examples/simpletest_impulsesplot/README.md @@ -25,7 +25,7 @@ Now an impulse graph object is generated and added to the plot: JKQTPImpulsesVerticalGraph* graph=new JKQTPImpulsesVerticalGraph(&plot); graph->set_xColumn(columnX); graph->set_yColumn(columnY); - graph->set_lineWidth(2); + graph->setLineWidth(2); graph->set_color(QColor("red")); graph->set_title(QObject::tr("$\\cos(x)\\cdot\\exp(-x/10)$")); @@ -41,7 +41,7 @@ There is an alternative class `JKQTPImpulsesHorizontalGraph` which draws horizon JKQTPImpulsesHorizontalGraph* graph=new JKQTPImpulsesHorizontalGraph(&plot); graph->set_yColumn(columnX); graph->set_xColumn(columnY); - graph->set_lineWidth(2); + graph->setLineWidth(2); graph->set_color(QColor("blue")); graph->set_title(QObject::tr("$\\cos(x)\\cdot\\exp(-x/10)$")); ``` diff --git a/examples/simpletest_impulsesplot/jkqtplotter_simpletest_impulsesplot.cpp b/examples/simpletest_impulsesplot/jkqtplotter_simpletest_impulsesplot.cpp index 267855852b..614fa048dc 100644 --- a/examples/simpletest_impulsesplot/jkqtplotter_simpletest_impulsesplot.cpp +++ b/examples/simpletest_impulsesplot/jkqtplotter_simpletest_impulsesplot.cpp @@ -35,7 +35,7 @@ int main(int argc, char* argv[]) JKQTPImpulsesVerticalGraph* graph=new JKQTPImpulsesVerticalGraph(&plot); graph->set_xColumn(columnX); graph->set_yColumn(columnY); - graph->set_lineWidth(2); + graph->setLineWidth(2); graph->set_color(QColor("red")); graph->set_title(QObject::tr("$\\cos(x)\\cdot\\exp(-x/10)$")); @@ -43,12 +43,12 @@ int main(int argc, char* argv[]) plot.addGraph(graph); // 6. set some axis properties (we use LaTeX for nice equation rendering) - plot.get_xAxis()->set_axisLabel(QObject::tr("x-axis")); - plot.get_yAxis()->set_axisLabel(QObject::tr("y-axis")); + plot.getXAxis()->setAxisLabel(QObject::tr("x-axis")); + plot.getYAxis()->setAxisLabel(QObject::tr("y-axis")); // 7. switch the grid off - plot.get_xAxis()->set_drawGrid(false); - plot.get_yAxis()->set_drawGrid(false); + plot.getXAxis()->set_drawGrid(false); + plot.getYAxis()->set_drawGrid(false); // 8. autoscale the plot so the graph is contained plot.zoomToFit(); diff --git a/examples/simpletest_logaxes/README.md b/examples/simpletest_logaxes/README.md index 4e41d80bae..b89b1c351d 100644 --- a/examples/simpletest_logaxes/README.md +++ b/examples/simpletest_logaxes/README.md @@ -23,7 +23,7 @@ The source code of the main application can be found in [`jkqtplotter_simpletes // use one of different pens graph->set_style(pens[id%pens.size()]); // set width of graph line - graph->set_lineWidth(1.5); + graph->setLineWidth(1.5); // graph title is made from symbol+penstyle graph->set_title(QString("D=\\delta/\\omega_0=%1").arg(D[id])); @@ -52,32 +52,32 @@ The difference between not using and using `$...$` for the equation can be seen Finally the y-axis is switched to logarithmic scaling and the axis labels are set: ```.cpp -// 5. set y-axis to logarithmic (x-axis would be analogous, but using `plot.get_xAxis()`) - plot.get_yAxis()->set_logAxis(true); +// 5. set y-axis to logarithmic (x-axis would be analogous, but using `plot.getXAxis()`) + plot.getYAxis()->set_logAxis(true); // now we set the number of label ticks to 9 (you give the count if minor between two majors, // so if you want ticks for 1,2,3,...,10,20,30,...,100... you need to use 9: - plot.get_yAxis()->set_minorTicks(9); + plot.getYAxis()->set_minorTicks(9); // the minor grid is not shown by default. You can switch it on: - plot.get_yAxis()->set_drawMinorGrid(true); + plot.getYAxis()->set_drawMinorGrid(true); // usually axis ticks are shown as numbers 0.01, 0.1, 1, 10, ... You can also force the scientific // power-of-10 notation, using: - plot.get_yAxis()->set_labelType(JKQTPCALTexponent); + plot.getYAxis()->set_labelType(JKQTPCALTexponent); // the number of digits in JKQTPCALTexponent determines which labels are drawn in standard-notation, // as compared to power-notation (e.g. if set to 1, the labels 0.1=10^{-1}, 1, 10 are shown in // standard notation, the rest in power-notation. This tweak improves readability) - plot.get_yAxis()->set_labelDigits(0); + plot.getYAxis()->set_labelDigits(0); // minor tick labels are usually not displayed, but you can switch them on, using - //plot.get_yAxis()->set_minorTickLabelsEnabled(true); + //plot.getYAxis()->set_minorTickLabelsEnabled(true); // the axis font sizes can be set with: - plot.get_yAxis()->set_tickLabelFontSize(10); // axis tick labels - plot.get_yAxis()->set_minorTickLabelFontSize(7); // minor axis tick labels - plot.get_yAxis()->set_labelFontSize(14); // axis label size - plot.get_xAxis()->set_tickLabelFontSize(10); // axis tick labels - plot.get_xAxis()->set_minorTickLabelFontSize(7); // minor axis tick labels - plot.get_xAxis()->set_labelFontSize(14); // axis label size + plot.getYAxis()->set_tickLabelFontSize(10); // axis tick labels + plot.getYAxis()->set_minorTickLabelFontSize(7); // minor axis tick labels + plot.getYAxis()->set_labelFontSize(14); // axis label size + plot.getXAxis()->set_tickLabelFontSize(10); // axis tick labels + plot.getXAxis()->set_minorTickLabelFontSize(7); // minor axis tick labels + plot.getXAxis()->set_labelFontSize(14); // axis label size // ... and finally set axis labels (using LaTeX notation and $...$ to improve rendering) - plot.get_yAxis()->set_axisLabel("Amplitude $A/A_{stat}$"); - plot.get_xAxis()->set_axisLabel("relative driving frequency $\\eta=\\omega/\\omega_0$"); + plot.getYAxis()->setAxisLabel("Amplitude $A/A_{stat}$"); + plot.getXAxis()->setAxisLabel("relative driving frequency $\\eta=\\omega/\\omega_0$"); ``` As an alternative `JKQTPCALTexponentCharacter` does not use the power-of-10 notation, but uses the usual unit-characters, e.g. 0.001=1m, 0.000001=1µ, 10000=10k, ... diff --git a/examples/simpletest_logaxes/jkqtplotter_simpletest_logaxes.cpp b/examples/simpletest_logaxes/jkqtplotter_simpletest_logaxes.cpp index 39fa6df106..9d15c99526 100644 --- a/examples/simpletest_logaxes/jkqtplotter_simpletest_logaxes.cpp +++ b/examples/simpletest_logaxes/jkqtplotter_simpletest_logaxes.cpp @@ -53,7 +53,7 @@ int main(int argc, char* argv[]) // use one of different pens graph->set_style(pens[id%pens.size()]); // set width of graph line - graph->set_lineWidth(1.5); + graph->setLineWidth(1.5); // graph title is made from symbol+penstyle graph->set_title(QString("$D=\\delta/\\omega_0=%1$").arg(D[id])); @@ -73,32 +73,32 @@ int main(int argc, char* argv[]) // high-quality math rendering. plot.addGraph(new JKQTPGeoText(&plot, 1.25, 10, "$\\frac{A}{A_{stat}}=\\frac{1}{\\sqrt{\\left(1-\\eta^2\\right)^2+\\left(2{\\eta}D\\right)^2}}$", 15)); - // 5. set y-axis to logarithmic (x-axis would be analogous, but using `plot.get_xAxis()`) - plot.get_yAxis()->set_logAxis(true); + // 5. set y-axis to logarithmic (x-axis would be analogous, but using `plot.getXAxis()`) + plot.getYAxis()->set_logAxis(true); // now we set the number of label ticks to 9 (you give the count if minor between two majors, // so if you want ticks for 1,2,3,...,10,20,30,...,100... you need to use 9: - plot.get_yAxis()->set_minorTicks(9); + plot.getYAxis()->set_minorTicks(9); // the minor grid is not shown by default. You can switch it on: - plot.get_yAxis()->set_drawMinorGrid(true); + plot.getYAxis()->set_drawMinorGrid(true); // usually axis ticks are shown as numbers 0.01, 0.1, 1, 10, ... You can also force the scientific // power-of-10 notation, using: - plot.get_yAxis()->set_labelType(JKQTPCALTexponent); + plot.getYAxis()->set_labelType(JKQTPCALTexponent); // the number of digits in JKQTPCALTexponent determines which labels are drawn in standard-notation, // as compared to power-notation (e.g. if set to 1, the labels 0.1=10^{-1}, 1, 10 are shown in // standard notation, the rest in power-notation. This tweak improves readability) - plot.get_yAxis()->set_labelDigits(0); + plot.getYAxis()->set_labelDigits(0); // minor tick labels are usually not displayed, but you can switch them on, using - //plot.get_yAxis()->set_minorTickLabelsEnabled(true); + //plot.getYAxis()->set_minorTickLabelsEnabled(true); // the axis font sizes can be set with: - plot.get_yAxis()->set_tickLabelFontSize(10); // axis tick labels - plot.get_yAxis()->set_minorTickLabelFontSize(7); // minor axis tick labels - plot.get_yAxis()->set_labelFontSize(14); // axis label size - plot.get_xAxis()->set_tickLabelFontSize(10); // axis tick labels - plot.get_xAxis()->set_minorTickLabelFontSize(7); // minor axis tick labels - plot.get_xAxis()->set_labelFontSize(14); // axis label size + plot.getYAxis()->set_tickLabelFontSize(10); // axis tick labels + plot.getYAxis()->set_minorTickLabelFontSize(7); // minor axis tick labels + plot.getYAxis()->set_labelFontSize(14); // axis label size + plot.getXAxis()->set_tickLabelFontSize(10); // axis tick labels + plot.getXAxis()->set_minorTickLabelFontSize(7); // minor axis tick labels + plot.getXAxis()->set_labelFontSize(14); // axis label size // ... and finally set axis labels (using LaTeX notation and $...$ to improve rendering) - plot.get_yAxis()->set_axisLabel("Amplitude $A/A_{stat}$"); - plot.get_xAxis()->set_axisLabel("relative driving frequency $\\eta=\\omega/\\omega_0$"); + plot.getYAxis()->setAxisLabel("Amplitude $A/A_{stat}$"); + plot.getXAxis()->setAxisLabel("relative driving frequency $\\eta=\\omega/\\omega_0$"); // 6. autoscale the plot so the graph is contained diff --git a/examples/simpletest_parametriccurve/README.md b/examples/simpletest_parametriccurve/README.md index 41c03dd1e5..fcea7f3688 100644 --- a/examples/simpletest_parametriccurve/README.md +++ b/examples/simpletest_parametriccurve/README.md @@ -43,7 +43,7 @@ If you use `JKQTPXYParametrizedScatterGraph` instead of `JKQTPXYLineGraph`, you graph2->set_symbol(JKQTPNoSymbol); graph2->set_drawLine(true); graph2->set_title("colored spiral"); - graph2->get_colorBarRightAxis()->set_axisLabel("color scale radius $r(\\phi)$"); + graph2->get_colorBarRightAxis()->setAxisLabel("color scale radius $r(\\phi)$"); plot2.addGraph(graph2); ``` diff --git a/examples/simpletest_parametriccurve/jkqtplotter_simpletest_parametriccurve.cpp b/examples/simpletest_parametriccurve/jkqtplotter_simpletest_parametriccurve.cpp index ab1f28c7ca..964ab50516 100644 --- a/examples/simpletest_parametriccurve/jkqtplotter_simpletest_parametriccurve.cpp +++ b/examples/simpletest_parametriccurve/jkqtplotter_simpletest_parametriccurve.cpp @@ -60,26 +60,26 @@ int main(int argc, char* argv[]) graph2->set_symbol(JKQTPNoSymbol); graph2->set_drawLine(true); graph2->set_title("colored spiral"); - graph2->get_colorBarRightAxis()->set_axisLabel("color scale radius $r(\\phi)$"); + graph2->get_colorBarRightAxis()->setAxisLabel("color scale radius $r(\\phi)$"); plot2.addGraph(graph2); // 4. set the axis scale aspect ratios to 1, // autoscale the plot so the graph is contained // and format the coordinate system and key - plot.get_plotter()->set_maintainAspectRatio(true); - plot.get_plotter()->set_aspectRatio(1); - plot.get_xAxis()->set_axisLabel("x-axis"); - plot.get_yAxis()->set_axisLabel("y-axis"); - plot.get_xAxis()->set_drawGrid(false); - plot.get_yAxis()->set_drawGrid(false); + plot.getPlotter()->setMaintainAspectRatio(true); + plot.getPlotter()->setAspectRatio(1); + plot.getXAxis()->setAxisLabel("x-axis"); + plot.getYAxis()->setAxisLabel("y-axis"); + plot.getXAxis()->set_drawGrid(false); + plot.getYAxis()->set_drawGrid(false); plot.setXY(-15,15,-15,15); - plot2.get_plotter()->set_maintainAspectRatio(true); - plot2.get_plotter()->set_aspectRatio(1); - plot2.get_xAxis()->set_axisLabel("x-axis"); - plot2.get_yAxis()->set_axisLabel("y-axis"); - plot2.get_xAxis()->set_drawGrid(false); - plot2.get_yAxis()->set_drawGrid(false); + plot2.getPlotter()->setMaintainAspectRatio(true); + plot2.getPlotter()->setAspectRatio(1); + plot2.getXAxis()->setAxisLabel("x-axis"); + plot2.getYAxis()->setAxisLabel("y-axis"); + plot2.getXAxis()->set_drawGrid(false); + plot2.getYAxis()->set_drawGrid(false); plot2.setXY(-15,15,-15,15); diff --git a/examples/simpletest_paramscatterplot/README.md b/examples/simpletest_paramscatterplot/README.md index a37a4f88e5..4c94d90475 100644 --- a/examples/simpletest_paramscatterplot/README.md +++ b/examples/simpletest_paramscatterplot/README.md @@ -40,7 +40,7 @@ The next two code snippets show how to modify the size of the symbols and the li JKQTPXYParametrizedScatterGraph* graph6=new JKQTPXYParametrizedScatterGraph(&plot); graph6->set_xColumn(columnX); graph6->set_yColumn(columnY6); - graph6->set_linewidthColumn(columnLW); + graph6->setLinewidthColumn(columnLW); graph6->set_drawLine(true); graph6->set_symbol(JKQTPNoSymbol); graph6->set_title("6: line width"); @@ -83,7 +83,7 @@ The second variant for setting the color of each datapoint is by mapping the val graph2->set_symbol(JKQTPFilledRect); graph2->set_drawLine(true); graph2->set_title("2: color"); - graph2->get_colorBarRightAxis()->set_axisLabel("color scale for graph2"); + graph2->get_colorBarRightAxis()->setAxisLabel("color scale for graph2"); plot.addGraph(graph2); ``` Note: If you want to set the range manually, use `ste_imageMin()` and `set_imageMax()` after setting `set_autoImageRange(false)`. @@ -99,7 +99,7 @@ Note also that it is possible to combine any of parametrizations above in a sing graph5->set_palette(JKQTPMathImageBLUEYELLOW); graph5->set_drawLine(true); graph5->set_title("5: color+size"); - graph5->get_colorBarRightAxis()->set_axisLabel("color scale for graph5"); + graph5->get_colorBarRightAxis()->setAxisLabel("color scale for graph5"); plot.addGraph(graph5); ``` diff --git a/examples/simpletest_paramscatterplot/jkqtplotter_simpletest_paramscatterplot.cpp b/examples/simpletest_paramscatterplot/jkqtplotter_simpletest_paramscatterplot.cpp index cd4a30580b..8e42fecbcd 100644 --- a/examples/simpletest_paramscatterplot/jkqtplotter_simpletest_paramscatterplot.cpp +++ b/examples/simpletest_paramscatterplot/jkqtplotter_simpletest_paramscatterplot.cpp @@ -79,7 +79,7 @@ int main(int argc, char* argv[]) graph2->set_symbol(JKQTPFilledRect); graph2->set_drawLine(true); graph2->set_title("2: color"); - graph2->get_colorBarRightAxis()->set_axisLabel("color scale for graph2"); + graph2->get_colorBarRightAxis()->setAxisLabel("color scale for graph2"); plot.addGraph(graph2); // 3.3 for graph3, we use dataset X/Y3 @@ -118,7 +118,7 @@ int main(int argc, char* argv[]) graph5->set_palette(JKQTPMathImageBLUEYELLOW); graph5->set_drawLine(true); graph5->set_title("5: color+size"); - graph5->get_colorBarRightAxis()->set_axisLabel("color scale for graph5"); + graph5->get_colorBarRightAxis()->setAxisLabel("color scale for graph5"); plot.addGraph(graph5); // 3.6 for graph2, we use dataset X/Y6 @@ -126,7 +126,7 @@ int main(int argc, char* argv[]) JKQTPXYParametrizedScatterGraph* graph6=new JKQTPXYParametrizedScatterGraph(&plot); graph6->set_xColumn(columnX); graph6->set_yColumn(columnY6); - graph6->set_linewidthColumn(columnLW); + graph6->setLinewidthColumn(columnLW); graph6->set_drawLine(true); graph6->set_symbol(JKQTPNoSymbol); graph6->set_title("6: line width"); @@ -137,7 +137,7 @@ int main(int argc, char* argv[]) JKQTPXYParametrizedScatterGraph* graph7=new JKQTPXYParametrizedScatterGraph(&plot); graph7->set_xColumn(columnX); graph7->set_yColumn(columnY7); - graph7->set_linewidthColumn(columnLW); + graph7->setLinewidthColumn(columnLW); graph7->set_drawLine(true); graph7->set_colorColumn(columnC); graph7->set_palette(JKQTPMathImageBLUEYELLOW); @@ -148,12 +148,12 @@ int main(int argc, char* argv[]) plot.addGraph(graph7); // 4. autoscale the plot so the graph is contained and format the coordinate system and key - plot.get_plotter()->set_keyPosition(JKQTPKeyOutsideBottomLeft); - plot.get_plotter()->set_keyLayout(JKQTPKeyLayoutOneRow); - plot.get_xAxis()->set_axisLabel("x-axis"); - plot.get_yAxis()->set_axisLabel("y-axis"); - plot.get_xAxis()->set_drawGrid(false); - plot.get_yAxis()->set_drawGrid(false); + plot.getPlotter()->setKeyPosition(JKQTPKeyOutsideBottomLeft); + plot.getPlotter()->setKeyLayout(JKQTPKeyLayoutOneRow); + plot.getXAxis()->setAxisLabel("x-axis"); + plot.getYAxis()->setAxisLabel("y-axis"); + plot.getXAxis()->set_drawGrid(false); + plot.getYAxis()->set_drawGrid(false); plot.zoomToFit(); // 5. show plotter and make it a decent size diff --git a/examples/simpletest_paramscatterplot_image/README.md b/examples/simpletest_paramscatterplot_image/README.md index 9e3888838a..fb96ca2595 100644 --- a/examples/simpletest_paramscatterplot_image/README.md +++ b/examples/simpletest_paramscatterplot_image/README.md @@ -59,18 +59,18 @@ For illustrative purposes, the original image is shown at the bottom-left: Finally the plot is styled and the axis aspect ratios are fixed: ```.cpp // scale the plot so the graph is contained and format the coordinate system - plot.get_xAxis()->set_axisLabel("x-axis"); - plot.get_yAxis()->set_axisLabel("y-axis"); - plot.get_xAxis()->set_drawGrid(false); - plot.get_yAxis()->set_drawGrid(false); + plot.getXAxis()->setAxisLabel("x-axis"); + plot.getYAxis()->setAxisLabel("y-axis"); + plot.getXAxis()->set_drawGrid(false); + plot.getYAxis()->set_drawGrid(false); // max. size is the size of the image plot.setXY(0,image.width()-1,0,image.height()-1); plot.setAbsoluteXY(0,image.width()-1,0,image.height()-1); // ensure that axis aspect ration and coordinate system aspect ratio are maintained - plot.get_plotter()->set_maintainAspectRatio(true); - plot.get_plotter()->set_aspectRatio(1); - plot.get_plotter()->set_maintainAxisAspectRatio(true); - plot.get_plotter()->set_axisAspectRatio(1); + plot.getPlotter()->setMaintainAspectRatio(true); + plot.getPlotter()->setAspectRatio(1); + plot.getPlotter()->setMaintainAxisAspectRatio(true); + plot.getPlotter()->setAxisAspectRatio(1); ``` The full test appication combines all these variants and the result looks like this: diff --git a/examples/simpletest_paramscatterplot_image/jkqtplotter_simpletest_paramscatterplot_image.cpp b/examples/simpletest_paramscatterplot_image/jkqtplotter_simpletest_paramscatterplot_image.cpp index 596f47a867..b24d527ac6 100644 --- a/examples/simpletest_paramscatterplot_image/jkqtplotter_simpletest_paramscatterplot_image.cpp +++ b/examples/simpletest_paramscatterplot_image/jkqtplotter_simpletest_paramscatterplot_image.cpp @@ -71,18 +71,18 @@ int main(int argc, char* argv[]) // 4. scale the plot so the graph is contained and format the coordinate system - plot.get_xAxis()->set_axisLabel("x-axis"); - plot.get_yAxis()->set_axisLabel("y-axis"); - plot.get_xAxis()->set_drawGrid(false); - plot.get_yAxis()->set_drawGrid(false); + plot.getXAxis()->setAxisLabel("x-axis"); + plot.getYAxis()->setAxisLabel("y-axis"); + plot.getXAxis()->set_drawGrid(false); + plot.getYAxis()->set_drawGrid(false); // max. size is the size of the image plot.setXY(0,image.width()-1,0,image.height()-1); plot.setAbsoluteXY(0,image.width()-1,0,image.height()-1); // ensure that axis aspect ration and coordinate system aspect ratio are maintained - plot.get_plotter()->set_maintainAspectRatio(true); - plot.get_plotter()->set_aspectRatio(1); - plot.get_plotter()->set_maintainAxisAspectRatio(true); - plot.get_plotter()->set_axisAspectRatio(1); + plot.getPlotter()->setMaintainAspectRatio(true); + plot.getPlotter()->setAspectRatio(1); + plot.getPlotter()->setMaintainAxisAspectRatio(true); + plot.getPlotter()->setAxisAspectRatio(1); // 5. show plotter and make it a decent size plot.show(); diff --git a/examples/simpletest_parsedfunctionplot/README.md b/examples/simpletest_parsedfunctionplot/README.md index 9282d5c870..d2acfd1a6d 100644 --- a/examples/simpletest_parsedfunctionplot/README.md +++ b/examples/simpletest_parsedfunctionplot/README.md @@ -31,7 +31,7 @@ In the example in [`test/simpletest_parsedfunctionplot/simpletest_parsedfunction [=]() { parsedFunc->set_title("user function: \\verb{"+edit->text()+"}"); parsedFunc->set_function(edit->text()); - plot->update_plot(); + plot->replotPlot(); }; QObject::connect(edit, &QLineEdit::returnPressed, updateGraphFunctor); QObject::connect(edit, &QLineEdit::editingFinished, updateGraphFunctor); diff --git a/examples/simpletest_parsedfunctionplot/jkqtplotter_simpletest_parsedfunctionplot.cpp b/examples/simpletest_parsedfunctionplot/jkqtplotter_simpletest_parsedfunctionplot.cpp index ec18190e86..d19cc6e60e 100644 --- a/examples/simpletest_parsedfunctionplot/jkqtplotter_simpletest_parsedfunctionplot.cpp +++ b/examples/simpletest_parsedfunctionplot/jkqtplotter_simpletest_parsedfunctionplot.cpp @@ -56,7 +56,7 @@ int main(int argc, char* argv[]) parsedFunc->set_function(edit->text()); parsedFunc->set_paramsV(spinP1->value(), spinP2->value()); parsedFunc->set_displaySamplePoints(check->isChecked()); - plot->update_plot(); + plot->replotPlot(); }; QObject::connect(edit, &QLineEdit::returnPressed, updateGraphFunctor); QObject::connect(edit, &QLineEdit::editingFinished, updateGraphFunctor); @@ -68,8 +68,8 @@ int main(int argc, char* argv[]) // 3. set some axis properties (we use LaTeX for nice equation rendering) - plot->get_xAxis()->set_axisLabel(QObject::tr("x-axis")); - plot->get_yAxis()->set_axisLabel(QObject::tr("y-axis")); + plot->getXAxis()->setAxisLabel(QObject::tr("x-axis")); + plot->getYAxis()->setAxisLabel(QObject::tr("y-axis")); // 4. scale the plot so the graph is contained diff --git a/examples/simpletest_rgbimageplot_opencv/README.md b/examples/simpletest_rgbimageplot_opencv/README.md index f02ac0efec..b08c71ea63 100644 --- a/examples/simpletest_rgbimageplot_opencv/README.md +++ b/examples/simpletest_rgbimageplot_opencv/README.md @@ -24,9 +24,9 @@ int main(int argc, char* argv[]) // 1. create a plotter window and get a pointer to the internal datastore (for convenience) - plot.get_plotter()->set_useAntiAliasingForGraphs(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForSystem(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForText(true); // nicer (but slower) text rendering + 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 JKQTPDatastore* ds=plot.getDatastore(); @@ -73,12 +73,12 @@ int main(int argc, char* argv[]) plot.addGraph(graph); // 6. set axis labels - plot.get_xAxis()->set_axisLabel("x [pixels]"); - plot.get_yAxis()->set_axisLabel("y [pixels]"); + plot.getXAxis()->setAxisLabel("x [pixels]"); + plot.getYAxis()->setAxisLabel("y [pixels]"); // 7. fix axis aspect ratio to width/height, so pixels are square - plot.get_plotter()->set_maintainAspectRatio(true); - plot.get_plotter()->set_aspectRatio(double(picture.cols)/double(picture.rows)); + plot.getPlotter()->setMaintainAspectRatio(true); + plot.getPlotter()->setAspectRatio(double(picture.cols)/double(picture.rows)); // 8. autoscale the plot so the graph is contained plot.zoomToFit(); diff --git a/examples/simpletest_rgbimageplot_opencv/jkqtplotter_simpletest_rgbimageplot_opencv.cpp b/examples/simpletest_rgbimageplot_opencv/jkqtplotter_simpletest_rgbimageplot_opencv.cpp index b9ed81bf10..78d8495316 100644 --- a/examples/simpletest_rgbimageplot_opencv/jkqtplotter_simpletest_rgbimageplot_opencv.cpp +++ b/examples/simpletest_rgbimageplot_opencv/jkqtplotter_simpletest_rgbimageplot_opencv.cpp @@ -22,9 +22,9 @@ int main(int argc, char* argv[]) // 1. create a plotter window and get a pointer to the internal datastore (for convenience) - plot.get_plotter()->set_useAntiAliasingForGraphs(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForSystem(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForText(true); // nicer (but slower) text rendering + 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 JKQTPDatastore* ds=plot.getDatastore(); @@ -71,12 +71,12 @@ int main(int argc, char* argv[]) plot.addGraph(graph); // 6. set axis labels - plot.get_xAxis()->set_axisLabel("x [pixels]"); - plot.get_yAxis()->set_axisLabel("y [pixels]"); + plot.getXAxis()->setAxisLabel("x [pixels]"); + plot.getYAxis()->setAxisLabel("y [pixels]"); // 7. fix axis aspect ratio to width/height, so pixels are square - plot.get_plotter()->set_maintainAspectRatio(true); - plot.get_plotter()->set_aspectRatio(double(picture.cols)/double(picture.rows)); + plot.getPlotter()->setMaintainAspectRatio(true); + plot.getPlotter()->setAspectRatio(double(picture.cols)/double(picture.rows)); // 8. autoscale the plot so the graph is contained plot.zoomToFit(); diff --git a/examples/simpletest_rgbimageplot_qt/jkqtplotter_simpletest_rgbimageplot_qt.cpp b/examples/simpletest_rgbimageplot_qt/jkqtplotter_simpletest_rgbimageplot_qt.cpp index 4e523f0842..ab37d34be3 100644 --- a/examples/simpletest_rgbimageplot_qt/jkqtplotter_simpletest_rgbimageplot_qt.cpp +++ b/examples/simpletest_rgbimageplot_qt/jkqtplotter_simpletest_rgbimageplot_qt.cpp @@ -20,9 +20,9 @@ int main(int argc, char* argv[]) // 1. create a plotter window and get a pointer to the internal datastore (for convenience) - plot.get_plotter()->set_useAntiAliasingForGraphs(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForSystem(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForText(true); // nicer (but slower) text rendering + 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. now we open a BMP-file and load it into an OpenCV cv::Mat @@ -49,12 +49,12 @@ int main(int argc, char* argv[]) plot.addGraph(graph); // 5. set axis labels - plot.get_xAxis()->set_axisLabel("x [pixels]"); - plot.get_yAxis()->set_axisLabel("y [pixels]"); + plot.getXAxis()->setAxisLabel("x [pixels]"); + plot.getYAxis()->setAxisLabel("y [pixels]"); // 6. fix axis aspect ratio to width/height, so pixels are square - plot.get_plotter()->set_maintainAspectRatio(true); - plot.get_plotter()->set_aspectRatio(double(image.width())/double(image.height())); + plot.getPlotter()->setMaintainAspectRatio(true); + plot.getPlotter()->setAspectRatio(double(image.width())/double(image.height())); // 7. autoscale the plot so the graph is contained plot.zoomToFit(); diff --git a/examples/simpletest_speed/README.md b/examples/simpletest_speed/README.md index d762a9627e..6e48de77c8 100644 --- a/examples/simpletest_speed/README.md +++ b/examples/simpletest_speed/README.md @@ -37,7 +37,7 @@ void SpeedTestPlot::plotNewData() // set new x-range and replot setX(X[0], X[NDATA-1]); - update_plot(); + replotPlot(); // calculate and update FPS-rate in window title auto tlastalst=t_lastplot; @@ -57,9 +57,9 @@ There are different facor affecting the replot speed: 1. *Anti-Aliasing:* If `JKQTPlotter` uses Anti-Aliasing for plotting, the plots are much nicer, but also about a factor of 3-4 slower. This is due to the increased amount of calculations, necessary in the drawing sub-system of Qt. You can configrue anti-aliasing with these calls: ```.cpp - plot.get_plotter()->set_useAntiAliasingForGraphs(false); - plot.get_plotter()->set_useAntiAliasingForSystem(false); - plot.get_plotter()->set_useAntiAliasingForText(false); + plot.getPlotter()->setUseAntiAliasingForGraphs(false); + plot.getPlotter()->setUseAntiAliasingForSystem(false); + plot.getPlotter()->setUseAntiAliasingForText(false); ``` 2. *Number of Graphs:* The number of plots (and also ther type and complexity) is a major imapct factor in the plotting speed. You can switch off a plot with the context menu:
![contextmenu_graph_visibility](../../screenshots/contextmenu_graph_visibility.png) 3. *Axis Scales and Plot Appearance:* Replotting is done in two steps: First the plot with the axes, labels etc. is drawn. Then the graphs are draw on top. Therefore a replot is faster, if only the graphs change, because the background (plot) does not have to be replotted. diff --git a/examples/simpletest_speed/speedtestplot.cpp b/examples/simpletest_speed/speedtestplot.cpp index 4f6922ecdf..4601a7af5b 100644 --- a/examples/simpletest_speed/speedtestplot.cpp +++ b/examples/simpletest_speed/speedtestplot.cpp @@ -13,9 +13,9 @@ SpeedTestPlot::SpeedTestPlot(): { // 1. optimize JKQTPlotter for speed (by switching off anti-aliasing) - get_plotter()->set_useAntiAliasingForGraphs(false); - get_plotter()->set_useAntiAliasingForSystem(false); - get_plotter()->set_useAntiAliasingForText(false); + getPlotter()->setUseAntiAliasingForGraphs(false); + getPlotter()->setUseAntiAliasingForSystem(false); + getPlotter()->setUseAntiAliasingForText(false); // 2. now we create data for a simple plot (a sine curve + random[-0.5,0.5]) @@ -40,14 +40,14 @@ SpeedTestPlot::SpeedTestPlot(): graph->set_xColumn(columnX); graph->set_yColumn(columnY); graph->set_title(QObject::tr("live sin() graph")); - graph->set_lineWidth(1); + graph->setLineWidth(1); addGraph(graph); JKQTPXYLineGraph* graph2=new JKQTPXYLineGraph(this); graph2->set_xColumn(columnX); graph2->set_yColumn(columnY2); graph2->set_title(QObject::tr("live cos() graph")); - graph2->set_lineWidth(1); + graph2->setLineWidth(1); addGraph(graph2); // 6. scale the plot so the graph is contained @@ -92,7 +92,7 @@ void SpeedTestPlot::plotNewData() // set new x-range and replot setX(X[0], X[NDATA-1]); - update_plot(); + replotPlot(); // calculate and update FPS-rate in window title auto tlastalst=t_lastplot; diff --git a/examples/simpletest_stackedbars/README.md b/examples/simpletest_stackedbars/README.md index 2a68b2f1aa..fb40ddc7c6 100644 --- a/examples/simpletest_stackedbars/README.md +++ b/examples/simpletest_stackedbars/README.md @@ -14,9 +14,9 @@ int main(int argc, char* argv[]) // 1. create a plotter window and get a pointer to the internal datastore (for convenience) JKQTPlotter plot; - plot.get_plotter()->set_useAntiAliasingForGraphs(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForSystem(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForText(true); // nicer (but slower) text rendering + 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 JKQTPDatastore* ds=plot.getDatastore(); // 2. now we create data for the charts (taken from https://commons.wikimedia.org/wiki/File:Energiemix_Deutschland.svg) @@ -80,17 +80,17 @@ int main(int argc, char* argv[]) plot.addGraphs(graphs); // 6. set axis labels - plot.get_xAxis()->set_axisLabel("year"); - plot.get_yAxis()->set_axisLabel("fraction of energy production in Germany [%]"); + plot.getXAxis()->setAxisLabel("year"); + plot.getYAxis()->setAxisLabel("fraction of energy production in Germany [%]"); // 7. finally we move the plot key/legend to the outside, top-right // and lay it out as a single row // NOTE: plot is a descendent of QWidget, which uses an internal object of // type JKQTBasePlotter, which does the actual plotting. // So many properties of the plot are only available in this internal - // object, which you can access by plot.get_plotter(). - plot.get_plotter()->set_keyPosition(JKQTPKeyOutsideTopRight); - plot.get_plotter()->set_keyLayout(JKQTPKeyLayoutOneRow); + // object, which you can access by plot.getPlotter(). + plot.getPlotter()->setKeyPosition(JKQTPKeyOutsideTopRight); + plot.getPlotter()->setKeyLayout(JKQTPKeyLayoutOneRow); // 8 autoscale the plot so the graph is contained plot.zoomToFit(); diff --git a/examples/simpletest_stackedbars/jkqtplotter_simpletest_stackedbars.cpp b/examples/simpletest_stackedbars/jkqtplotter_simpletest_stackedbars.cpp index 3aeed85bf5..031ad3bcd5 100644 --- a/examples/simpletest_stackedbars/jkqtplotter_simpletest_stackedbars.cpp +++ b/examples/simpletest_stackedbars/jkqtplotter_simpletest_stackedbars.cpp @@ -13,9 +13,9 @@ template void addGraph(JKQTPlotter& plot, bool swapXY) { // 1. create a plotter window and get a pointer to the internal datastore (for convenience) - plot.get_plotter()->set_useAntiAliasingForGraphs(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForSystem(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForText(true); // nicer (but slower) text rendering + 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 JKQTPDatastore* ds=plot.getDatastore(); // 2. now we create data for the charts (taken from https://commons.wikimedia.org/wiki/File:Energiemix_Deutschland.svg) @@ -79,17 +79,17 @@ void addGraph(JKQTPlotter& plot, bool swapXY) { plot.addGraphs(graphs); // 6. set axis labels - plot.get_xAxis()->set_axisLabel("year"); - plot.get_yAxis()->set_axisLabel("fraction of energy production in Germany [%]"); + plot.getXAxis()->setAxisLabel("year"); + plot.getYAxis()->setAxisLabel("fraction of energy production in Germany [%]"); // 7. finally we move the plot key/legend to the outside, top-right // and lay it out as a single row // NOTE: plot is a descendent of QWidget, which uses an internal object of // type JKQTBasePlotter, which does the actual plotting. // So many properties of the plot are only available in this internal - // object, which you can access by plot.get_plotter(). - plot.get_plotter()->set_keyPosition(JKQTPKeyOutsideTopRight); - plot.get_plotter()->set_keyLayout(JKQTPKeyLayoutOneRow); + // object, which you can access by plot.getPlotter(). + plot.getPlotter()->setKeyPosition(JKQTPKeyOutsideTopRight); + plot.getPlotter()->setKeyLayout(JKQTPKeyLayoutOneRow); // 8 autoscale the plot so the graph is contained plot.zoomToFit(); diff --git a/examples/simpletest_stepplots/README.md b/examples/simpletest_stepplots/README.md index d3f833c7db..3495e54670 100644 --- a/examples/simpletest_stepplots/README.md +++ b/examples/simpletest_stepplots/README.md @@ -19,7 +19,7 @@ The source code of the main application can be found in [`jkqtplotter_simpletes // set step style graph->set_stepType(JKQTPStepLeft); - graph->set_lineWidth(1); + graph->setLineWidth(1); graph->set_fillCurve(true); graph->set_drawLine(true); graph->set_title("JKQTPStepLeft, filled"); @@ -43,7 +43,7 @@ Finally the `JKQTPXYLineGraph` is configured: plot.addGraph(graphL); ``` -In addition to the symbol type and line style, you can also alter the size of the symbols (`graph->set_symbolSize(14)`), the line-width used to draw them (`graph->set_symbolWidth(1.5)`) and the line width of the graph line (`graph->set_lineWidth(1)`). If you want to switch off the line altogether, use `graph->set_drawLine(false`. +In addition to the symbol type and line style, you can also alter the size of the symbols (`graph->set_symbolSize(14)`), the line-width used to draw them (`graph->set_symbolWidth(1.5)`) and the line width of the graph line (`graph->setLineWidth(1)`). If you want to switch off the line altogether, use `graph->set_drawLine(false`. The result looks like this: diff --git a/examples/simpletest_stepplots/jkqtplotter_simpletest_stepplots.cpp b/examples/simpletest_stepplots/jkqtplotter_simpletest_stepplots.cpp index 0dd126a948..a89b09a247 100644 --- a/examples/simpletest_stepplots/jkqtplotter_simpletest_stepplots.cpp +++ b/examples/simpletest_stepplots/jkqtplotter_simpletest_stepplots.cpp @@ -49,7 +49,7 @@ int main(int argc, char* argv[]) // set step style graph->set_stepType(JKQTPStepLeft); - graph->set_lineWidth(1); + graph->setLineWidth(1); graph->set_fillCurve(true); graph->set_drawLine(true); graph->set_title("JKQTPStepLeft, filled"); @@ -76,7 +76,7 @@ int main(int argc, char* argv[]) // set step style graph->set_stepType(JKQTPStepCenter); - graph->set_lineWidth(1); + graph->setLineWidth(1); graph->set_fillCurve(false); graph->set_drawLine(true); graph->set_title("JKQTPStepCenter"); @@ -103,7 +103,7 @@ int main(int argc, char* argv[]) // set step style graph->set_stepType(JKQTPStepRight); - graph->set_lineWidth(1); + graph->setLineWidth(1); graph->set_fillCurve(false); graph->set_drawLine(true); graph->set_title("JKQTPStepRight"); diff --git a/examples/simpletest_symbols_and_errors/README.md b/examples/simpletest_symbols_and_errors/README.md index fa5585ba3b..481e09decd 100644 --- a/examples/simpletest_symbols_and_errors/README.md +++ b/examples/simpletest_symbols_and_errors/README.md @@ -48,16 +48,16 @@ int main(int argc, char* argv[]) plot.addGraph(graph1); // 6. hide 0-lines - plot.get_xAxis()->set_showZeroAxis(false); - plot.get_yAxis()->set_showZeroAxis(false); + plot.getXAxis()->setShowZeroAxis(false); + plot.getYAxis()->setShowZeroAxis(false); // 7. set some axis properties (we use LaTeX for nice equation rendering) - plot.get_xAxis()->set_axisLabel(QObject::tr("x-axis $x$ [mm]")); - plot.get_yAxis()->set_axisLabel(QObject::tr("\\textbf{\\color{red}{y-axis} $\\left(y=\\sin(x)\\pm(0.2+0.25\\cdot x)\\right)$ [A.U.]}")); - plot.get_xAxis()->set_labelFont("Arial"); - plot.get_yAxis()->set_labelFont("Times New Roman"); - plot.get_yAxis()->set_labelFontSize(12); // large x-axis label - plot.get_yAxis()->set_tickLabelFontSize(10); // and larger y-axis tick labels + plot.getXAxis()->setAxisLabel(QObject::tr("x-axis $x$ [mm]")); + plot.getYAxis()->setAxisLabel(QObject::tr("\\textbf{\\color{red}{y-axis} $\\left(y=\\sin(x)\\pm(0.2+0.25\\cdot x)\\right)$ [A.U.]}")); + plot.getXAxis()->set_labelFont("Arial"); + plot.getYAxis()->set_labelFont("Times New Roman"); + plot.getYAxis()->set_labelFontSize(12); // large x-axis label + plot.getYAxis()->set_tickLabelFontSize(10); // and larger y-axis tick labels // 8. autoscale the plot so the graph is contained plot.zoomToFit(); diff --git a/examples/simpletest_symbols_and_errors/jkqtplotter_simpletest_symbols_and_errors.cpp b/examples/simpletest_symbols_and_errors/jkqtplotter_simpletest_symbols_and_errors.cpp index 2c3af3aac9..d63270a6a5 100644 --- a/examples/simpletest_symbols_and_errors/jkqtplotter_simpletest_symbols_and_errors.cpp +++ b/examples/simpletest_symbols_and_errors/jkqtplotter_simpletest_symbols_and_errors.cpp @@ -50,16 +50,16 @@ int main(int argc, char* argv[]) plot.addGraph(graph1); // 6. hide 0-lines - plot.get_xAxis()->set_showZeroAxis(false); - plot.get_yAxis()->set_showZeroAxis(false); + plot.getXAxis()->setShowZeroAxis(false); + plot.getYAxis()->setShowZeroAxis(false); // 7. set some axis properties (we use LaTeX for nice equation rendering) - plot.get_xAxis()->set_axisLabel(QObject::tr("x-axis $x$ [mm]")); - plot.get_yAxis()->set_axisLabel(QObject::tr("\\textbf{\\color{red}{y-axis} $\\left(y=\\sin(x)\\pm(0.2+0.25\\cdot x)\\right)$ [A.U.]}")); - plot.get_xAxis()->set_labelFont("Arial"); - plot.get_yAxis()->set_labelFont("Times New Roman"); - plot.get_yAxis()->set_labelFontSize(12); // large x-axis label - plot.get_yAxis()->set_tickLabelFontSize(10); // and larger y-axis tick labels + plot.getXAxis()->setAxisLabel(QObject::tr("x-axis $x$ [mm]")); + plot.getYAxis()->setAxisLabel(QObject::tr("\\textbf{\\color{red}{y-axis} $\\left(y=\\sin(x)\\pm(0.2+0.25\\cdot x)\\right)$ [A.U.]}")); + plot.getXAxis()->set_labelFont("Arial"); + plot.getYAxis()->set_labelFont("Times New Roman"); + plot.getYAxis()->set_labelFontSize(12); // large x-axis label + plot.getYAxis()->set_tickLabelFontSize(10); // and larger y-axis tick labels // 8. autoscale the plot so the graph is contained plot.zoomToFit(); diff --git a/examples/simpletest_symbols_and_styles/README.md b/examples/simpletest_symbols_and_styles/README.md index f46ca767b9..e152e44d21 100644 --- a/examples/simpletest_symbols_and_styles/README.md +++ b/examples/simpletest_symbols_and_styles/README.md @@ -27,7 +27,7 @@ The source code of the main application can be found in [`jkqtplotter_simpletes // set width of symbol lines graph->set_symbolWidth(1.5); // set width of graph line - graph->set_lineWidth(1); + graph->setLineWidth(1); // graph title is made from symbol+penstyle graph->set_title(JKQTPGraphSymbols2NameString(static_cast(graph->get_symbol()))+QString(", ")+jkqtp_QPenStyle2String(graph->get_style())); @@ -40,7 +40,7 @@ The source code of the main application can be found in [`jkqtplotter_simpletes } ``` -In addition to the symbol type and line style, you can also alter the size of the symbols (`graph->set_symbolSize(14)`), the line-width used to draw them (`graph->set_symbolWidth(1.5)`) and the line width of the graph line (`graph->set_lineWidth(1)`). If you want to switch off the line altogether, use `graph->set_drawLine(false`. +In addition to the symbol type and line style, you can also alter the size of the symbols (`graph->set_symbolSize(14)`), the line-width used to draw them (`graph->set_symbolWidth(1.5)`) and the line width of the graph line (`graph->setLineWidth(1)`). If you want to switch off the line altogether, use `graph->set_drawLine(false`. The result looks like this: diff --git a/examples/simpletest_symbols_and_styles/jkqtplotter_simpletest_symbols_and_styles.cpp b/examples/simpletest_symbols_and_styles/jkqtplotter_simpletest_symbols_and_styles.cpp index 418d06d1c9..0bc1e915d7 100644 --- a/examples/simpletest_symbols_and_styles/jkqtplotter_simpletest_symbols_and_styles.cpp +++ b/examples/simpletest_symbols_and_styles/jkqtplotter_simpletest_symbols_and_styles.cpp @@ -58,7 +58,7 @@ int main(int argc, char* argv[]) // set width of symbol lines graph->set_symbolWidth(1.5); // set width of graph line - graph->set_lineWidth(1); + graph->setLineWidth(1); // graph title is made from symbol+penstyle graph->set_title(JKQTPGraphSymbols2NameString(static_cast(graph->get_symbol()))+QString(", ")+lname); diff --git a/examples/simpletest_ui/README.md b/examples/simpletest_ui/README.md index 93182decb1..04b6a5e2a6 100644 --- a/examples/simpletest_ui/README.md +++ b/examples/simpletest_ui/README.md @@ -101,7 +101,7 @@ Then three slots react to user interactions. First two interactions set the x- o ```.cpp void FormWithJKQTPlotter::on_chkLogX_toggled(bool checked) { - ui->plot->get_xAxis()->set_logAxis(checked); + ui->plot->getXAxis()->set_logAxis(checked); if (checked) { ui->plot->setX(1e-3,10); } else { @@ -111,7 +111,7 @@ void FormWithJKQTPlotter::on_chkLogX_toggled(bool checked) void FormWithJKQTPlotter::on_chkLogY_toggled(bool checked) { - ui->plot->get_yAxis()->set_logAxis(checked); + ui->plot->getYAxis()->set_logAxis(checked); if (checked) { ui->plot->setY(1e-3,10); } else { @@ -126,7 +126,7 @@ void FormWithJKQTPlotter::on_btnReplot_clicked() { graph->set_function(ui->edtEquation->text()); graph->set_title(ui->edtEquation->text()); - ui->plot->update_plot(); + ui->plot->replotPlot(); } ``` diff --git a/examples/simpletest_ui/formwithjkqtplotter.cpp b/examples/simpletest_ui/formwithjkqtplotter.cpp index 88ec12db2c..d8812a858d 100644 --- a/examples/simpletest_ui/formwithjkqtplotter.cpp +++ b/examples/simpletest_ui/formwithjkqtplotter.cpp @@ -26,7 +26,7 @@ FormWithJKQTPlotter::~FormWithJKQTPlotter() void FormWithJKQTPlotter::on_chkLogX_toggled(bool checked) { - ui->plot->get_xAxis()->set_logAxis(checked); + ui->plot->getXAxis()->set_logAxis(checked); if (checked) { ui->plot->setX(1e-3,10); } else { @@ -36,7 +36,7 @@ void FormWithJKQTPlotter::on_chkLogX_toggled(bool checked) void FormWithJKQTPlotter::on_chkLogY_toggled(bool checked) { - ui->plot->get_yAxis()->set_logAxis(checked); + ui->plot->getYAxis()->set_logAxis(checked); if (checked) { ui->plot->setY(1e-3,10); } else { @@ -48,5 +48,5 @@ void FormWithJKQTPlotter::on_btnReplot_clicked() { graph->set_function(ui->edtEquation->text()); graph->set_title(ui->edtEquation->text()); - ui->plot->update_plot(); + ui->plot->replotPlot(); } diff --git a/examples/test_distributionplot/README.md b/examples/test_distributionplot/README.md index ea3caff900..68a6d89c04 100644 --- a/examples/test_distributionplot/README.md +++ b/examples/test_distributionplot/README.md @@ -7,9 +7,9 @@ After adding all necessary data to the JKQTDatastore: ```.cpp // 1. create a plotter window and get a pointer to the internal datastore (for convenience) JKQTPlotter plot; - plot.get_plotter()->set_useAntiAliasingForGraphs(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForSystem(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForText(true); // nicer (but slower) text rendering + 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 JKQTPDatastore* ds=plot.getDatastore(); // 2. now we create random values drawn from a gaussian distribution @@ -84,7 +84,7 @@ After adding all necessary data to the JKQTDatastore: // 6. draw the theoretical distribution as function graph: JKQTPXFunctionLineGraph* graphTheoDist=new JKQTPXFunctionLineGraph(&plot); // define the gaussian function used for the random number generator - graphTheoDist->set_plotFunction([&th_mean,&th_std](double x) -> double { + graphTheoDist->setPlotFunction([&th_mean,&th_std](double x) -> double { return 1.0/(th_std*sqrt(2.0*M_PI))*exp(-0.5*(x-th_mean)*(x-th_mean)/th_std/th_std); }); // set title: @@ -123,7 +123,7 @@ After adding all necessary data to the JKQTDatastore: plot.zoomToFit(); // 10. Move key to top-left - plot.get_plotter()->set_keyPosition(JKQTPKeyInsideTopLeft); + plot.getPlotter()->setKeyPosition(JKQTPKeyInsideTopLeft); // 11. show plotter and make it a decent size plot.show(); diff --git a/examples/test_distributionplot/test_distributionplot.cpp b/examples/test_distributionplot/test_distributionplot.cpp index bfe9219648..681beaba72 100644 --- a/examples/test_distributionplot/test_distributionplot.cpp +++ b/examples/test_distributionplot/test_distributionplot.cpp @@ -21,9 +21,9 @@ int main(int argc, char* argv[]) // 1. create a plotter window and get a pointer to the internal datastore (for convenience) JKQTPlotter plot; - plot.get_plotter()->set_useAntiAliasingForGraphs(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForSystem(true); // nicer (but slower) plotting - plot.get_plotter()->set_useAntiAliasingForText(true); // nicer (but slower) text rendering + 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 JKQTPDatastore* ds=plot.getDatastore(); // 2. now we create random values drawn from a gaussian distribution @@ -98,7 +98,7 @@ int main(int argc, char* argv[]) // 6. draw the theoretical distribution as function graph: JKQTPXFunctionLineGraph* graphTheoDist=new JKQTPXFunctionLineGraph(&plot); // define the gaussian function used for the random number generator - graphTheoDist->set_plotFunction([&th_mean,&th_std](double x) -> double { + graphTheoDist->setPlotFunction([&th_mean,&th_std](double x) -> double { return 1.0/(th_std*sqrt(2.0*M_PI))*exp(-0.5*(x-th_mean)*(x-th_mean)/th_std/th_std); }); // set title: @@ -137,7 +137,7 @@ int main(int argc, char* argv[]) plot.setXY(-6,16,-0.1,0.2); // 10. Move key to top-left - plot.get_plotter()->set_keyPosition(JKQTPKeyInsideTopLeft); + plot.getPlotter()->setKeyPosition(JKQTPKeyInsideTopLeft); // 11. show plotter and make it a decent size plot.show(); diff --git a/examples/test_multiplot/README.md b/examples/test_multiplot/README.md index 4856f1332a..9e39820854 100644 --- a/examples/test_multiplot/README.md +++ b/examples/test_multiplot/README.md @@ -38,19 +38,19 @@ With this simple setup, all three plots would be arranged by the QLayout, but th ```.cpp // 3.4 synchronize width/x-axis of plotResid to width/x-axis of plotMain - plotResid->get_plotter()->synchronizeToMaster(plotMain->get_plotter(), true, false, true, true); + plotResid->getPlotter()->synchronizeToMaster(plotMain->getPlotter(), true, false, true, true); // 3.5 synchronize y-axis of width/plotResidHist to y-axis of width/plotResid - plotResidHist->get_plotter()->synchronizeToMaster(plotResid->get_plotter(), false, true, true, true); + plotResidHist->getPlotter()->synchronizeToMaster(plotResid->getPlotter(), false, true, true, true); ``` Finally: When printing or saving an image of the plots, the plotter will no know anything about the arrangement of the plots and the plots cannot be printed/drawn in the same arrangement as in the window. If you want to arrange the plots in the same layout in a printout, as in the window, you will have to tell the main plot, in which arrangement to print the plots: ```.cpp // 3.6 ensure that the plot are printed/exported in whole, when printing in plotMain - plotMain->get_plotter()->set_gridPrinting(true); - plotMain->get_plotter()->addGridPrintingPlotter(0,1,plotResid->get_plotter()); - plotMain->get_plotter()->addGridPrintingPlotter(1,1,plotResidHist->get_plotter()); + plotMain->getPlotter()->setGridPrinting(true); + plotMain->getPlotter()->addGridPrintingPlotter(0,1,plotResid->getPlotter()); + plotMain->getPlotter()->addGridPrintingPlotter(1,1,plotResidHist->getPlotter()); ``` In the first line, grid-printing (i.e. the layouted printing of several graphs) is activated. Then the arrangement of the two slave plots `plotResid` and `plotResidHist` is defined as (`x,y`)-shifts with respect to the master plot `plotMain`. @@ -61,24 +61,24 @@ Finally the axes and plots need a bit of formatting to make them look nicer: ```.cpp // 6.1 axis labels, distributed over the several plots - plotMain->get_yAxis()->set_axisLabel("y axis"); - plotResid->get_xAxis()->set_axisLabel("x axis"); - plotResid->get_yAxis()->set_axisLabel("residuals"); - plotResidHist->get_xAxis()->set_axisLabel("frequency"); + plotMain->getYAxis()->setAxisLabel("y axis"); + plotResid->getXAxis()->setAxisLabel("x axis"); + plotResid->getYAxis()->setAxisLabel("residuals"); + plotResidHist->getXAxis()->setAxisLabel("frequency"); // 6.2 switch off the tick labels on the axes that directly face another plot - plotMain->get_xAxis()->set_drawMode1(JKQTPCADMticks); - plotResidHist->get_yAxis()->set_drawMode1(JKQTPCADMticks); + plotMain->getXAxis()->set_drawMode1(JKQTPCADMticks); + plotResidHist->getYAxis()->set_drawMode1(JKQTPCADMticks); // 6.3 show tick labels on the rhs y-axis of the residual histogram plot - plotResidHist->get_yAxis()->set_drawMode2(JKQTPCADMticksAndLabels); + plotResidHist->getYAxis()->set_drawMode2(JKQTPCADMticksAndLabels); // 6.4 hide keys in all plots but the main plot - plotResid->get_plotter()->set_showKey(false); - plotResidHist->get_plotter()->set_showKey(false); + plotResid->getPlotter()->setShowKey(false); + plotResidHist->getPlotter()->setShowKey(false); // 6.5 hide position label and toolbars in the plots except main plot - plotResid->set_displayToolbar(false); - plotResid->set_displayMousePosition(false); - plotResidHist->set_displayToolbar(false); - plotResidHist->set_displayMousePosition(false); - plotMain->set_toolbarAlwaysOn(true); + plotResid->setToolbarVisible(false); + plotResid->setMousePositionShown(false); + plotResidHist->setToolbarVisible(false); + plotResidHist->setMousePositionShown(false); + plotMain->setToolbarVisible(true); ``` As a last step, the axes are scaled automatically, so the data fills the plots: diff --git a/examples/test_multiplot/test_multiplot.cpp b/examples/test_multiplot/test_multiplot.cpp index 52d5f516fe..847c84c3d7 100644 --- a/examples/test_multiplot/test_multiplot.cpp +++ b/examples/test_multiplot/test_multiplot.cpp @@ -38,15 +38,15 @@ int main(int argc, char* argv[]) layout->addWidget(plotResidHist, 1,1); // 3.3 synchronize width/x-axis of plotResid to width/x-axis of plotMain - plotResid->get_plotter()->synchronizeToMaster(plotMain->get_plotter(), true, false, true, true); + plotResid->getPlotter()->synchronizeToMaster(plotMain->getPlotter(), true, false, true, true); // 3.4 synchronize y-axis of width/plotResidHist to y-axis of width/plotResid - plotResidHist->get_plotter()->synchronizeToMaster(plotResid->get_plotter(), false, true, true, true); + plotResidHist->getPlotter()->synchronizeToMaster(plotResid->getPlotter(), false, true, true, true); // 3.5 ensure that the plot are printed/exported in whole, when printing in plotMain - plotMain->get_plotter()->set_gridPrinting(true); - plotMain->get_plotter()->addGridPrintingPlotter(0,1,plotResid->get_plotter()); - plotMain->get_plotter()->addGridPrintingPlotter(1,1,plotResidHist->get_plotter()); + plotMain->getPlotter()->setGridPrinting(true); + plotMain->getPlotter()->addGridPrintingPlotter(0,1,plotResid->getPlotter()); + plotMain->getPlotter()->addGridPrintingPlotter(1,1,plotResidHist->getPlotter()); // 3.6 set relative sizes of the plots via the layout (small plots have 1/3 the width and height of the large plot layout->setRowStretch(0,3); @@ -113,7 +113,7 @@ int main(int argc, char* argv[]) graphResid->set_symbol(JKQTPPlus); graphResid->set_symbolSize(10); graphResid->set_drawLine(true); - graphResid->set_lineWidth(0.5); + graphResid->setLineWidth(0.5); graphResid->set_title("residuals"); plotResid->addGraph(graphResid); @@ -125,24 +125,24 @@ int main(int argc, char* argv[]) plotResidHist->addGraph(graphResidHist); // 6.1 axis labels, distributed over the several plots - plotMain->get_yAxis()->set_axisLabel("y axis"); - plotResid->get_xAxis()->set_axisLabel("x axis"); - plotResid->get_yAxis()->set_axisLabel("residuals"); - plotResidHist->get_xAxis()->set_axisLabel("frequency"); + plotMain->getYAxis()->setAxisLabel("y axis"); + plotResid->getXAxis()->setAxisLabel("x axis"); + plotResid->getYAxis()->setAxisLabel("residuals"); + plotResidHist->getXAxis()->setAxisLabel("frequency"); // 6.2 switch off the tick labels on the axes that directly face another plot - plotMain->get_xAxis()->set_drawMode1(JKQTPCADMticks); - plotResidHist->get_yAxis()->set_drawMode1(JKQTPCADMticks); + plotMain->getXAxis()->set_drawMode1(JKQTPCADMticks); + plotResidHist->getYAxis()->set_drawMode1(JKQTPCADMticks); // 6.3 show tick labels on the rhs y-axis of the residual histogram plot - plotResidHist->get_yAxis()->set_drawMode2(JKQTPCADMticksAndLabels); + plotResidHist->getYAxis()->set_drawMode2(JKQTPCADMticksAndLabels); // 6.4 hide keys in all plots but the main plot - plotResid->get_plotter()->set_showKey(false); - plotResidHist->get_plotter()->set_showKey(false); + plotResid->getPlotter()->setShowKey(false); + plotResidHist->getPlotter()->setShowKey(false); // 6.5 hide position label and toolbars in the plots except main plot - plotResid->set_displayToolbar(false); - plotResid->set_displayMousePosition(false); - plotResidHist->set_displayToolbar(false); - plotResidHist->set_displayMousePosition(false); - plotMain->set_toolbarAlwaysOn(true); + plotResid->setToolbarVisible(false); + plotResid->setMousePositionShown(false); + plotResidHist->setToolbarVisible(false); + plotResidHist->setMousePositionShown(false); + plotMain->setToolbarVisible(true); // 7. scale plots automatically to data diff --git a/examples/test_user_interaction/test_user_interaction.cpp b/examples/test_user_interaction/test_user_interaction.cpp index db53fd8e3b..4eb1a5309c 100644 --- a/examples/test_user_interaction/test_user_interaction.cpp +++ b/examples/test_user_interaction/test_user_interaction.cpp @@ -30,33 +30,33 @@ TestUserInteraction::TestUserInteraction(QWidget *parent) : // Some of the are also available in the context menu and toolbar of the JKQTPlotter // others are not QMenu* menuPlot=menuBar()->addMenu("Plot-Menu"); - menuPlot->addAction(plot->get_plotter()->get_actPrint()); + menuPlot->addAction(plot->getPlotter()->getActionPrint()); QMenu* menuPlotS=menuPlot->addMenu("Save ..."); - menuPlotS->addAction(plot->get_plotter()->get_actSaveData()); - menuPlotS->addAction(plot->get_plotter()->get_actSavePDF()); // not available from JKQTPlotter by default - menuPlotS->addAction(plot->get_plotter()->get_actSavePlot()); + menuPlotS->addAction(plot->getPlotter()->getActionSaveData()); + menuPlotS->addAction(plot->getPlotter()->getActionSavePDF()); // not available from JKQTPlotter by default + menuPlotS->addAction(plot->getPlotter()->getActionSavePlot()); QMenu* menuPlotZ=menuPlot->addMenu("Zoom ..."); - menuPlotZ->addAction(plot->get_plotter()->get_actZoomAll()); - menuPlotZ->addAction(plot->get_plotter()->get_actZoomIn()); - menuPlotZ->addAction(plot->get_plotter()->get_actZoomOut()); + menuPlotZ->addAction(plot->getPlotter()->getActionZoomAll()); + menuPlotZ->addAction(plot->getPlotter()->getActionZoomIn()); + menuPlotZ->addAction(plot->getPlotter()->getActionZoomOut()); // add a checkbox to show and hide the position display label in the plot chkPositionDisplay=new QCheckBox(tr("show mouse cursor position"), this); - chkPositionDisplay->setChecked(plot->get_displayMousePosition()); - connect(chkPositionDisplay, SIGNAL(toggled(bool)), plot, SLOT(set_displayMousePosition(bool))); + chkPositionDisplay->setChecked(plot->isMousePositionShown()); + connect(chkPositionDisplay, SIGNAL(toggled(bool)), plot, SLOT(setMousePositionShown(bool))); layChk->addWidget(chkPositionDisplay); // add a checkbox to en-/disable the toolbar of the JKQTPlotter chkShowToolbar=new QCheckBox(tr("enable toolbar"), this); - chkShowToolbar->setChecked(plot->get_displayToolbar()); - connect(chkShowToolbar, SIGNAL(toggled(bool)), plot, SLOT(set_displayToolbar(bool))); + chkShowToolbar->setChecked(plot->isToolbarVisible()); + connect(chkShowToolbar, SIGNAL(toggled(bool)), plot, SLOT(setToolbarVisible(bool))); layChk->addWidget(chkShowToolbar); // add a checkbox to switch the toolbar between always visible and the hiding mode, // where it only appears, when the mouse hovers over its designated area chkToolbarAlwaysOn=new QCheckBox(tr("toolbar 'always on'"), this); - chkToolbarAlwaysOn->setChecked(plot->get_toolbarAlwaysOn()); - connect(chkToolbarAlwaysOn, SIGNAL(toggled(bool)), plot, SLOT(set_toolbarAlwaysOn(bool))); + chkToolbarAlwaysOn->setChecked(plot->isToolbarAlwaysOn()); + connect(chkToolbarAlwaysOn, SIGNAL(toggled(bool)), plot, SLOT(setToolbarAlwaysOn(bool))); layChk->addWidget(chkToolbarAlwaysOn); // add a checkbox to switch the grid on and off @@ -109,5 +109,5 @@ void TestUserInteraction::initPlot() // 6. autoscale the plot so the graph is contained plot->zoomToFit(); - plot->get_plotter()->set_plotLabel("Sine Plots - User-Interaction Example"); + plot->getPlotter()->setPlotLabel("Sine Plots - User-Interaction Example"); } diff --git a/lib/jkqtfastplotter/jkqtfastplotter.cpp b/lib/jkqtfastplotter/jkqtfastplotter.cpp index ff8257ebeb..37dcb4008d 100644 --- a/lib/jkqtfastplotter/jkqtfastplotter.cpp +++ b/lib/jkqtfastplotter/jkqtfastplotter.cpp @@ -127,7 +127,7 @@ JKQTFastPlotter::JKQTFastPlotter(QWidget *parent) : connect(actCopyImage, SIGNAL(triggered()), this, SLOT(copyImage())); addAction(actCopyImage); setContextMenuPolicy(Qt::ActionsContextMenu); - update_plot(); + replotPlot(); setMouseTracking(true); } @@ -138,14 +138,14 @@ void JKQTFastPlotter::clearPlots(bool remove) { } } plots.clear(); - update_plot(); + replotPlot(); } void JKQTFastPlotter::addPlot(JKQTFPPlot* g) { g->setParent(this); plots.append(g); - update_plot(); + replotPlot(); } @@ -153,7 +153,7 @@ void JKQTFastPlotter::deletePlot(int i, bool remove) { if (i>=0 && i=0 && iaccept(); updateGeometry(); } @@ -553,7 +553,7 @@ void JKQTFastPlotter::draw(QPainter* painter, QColor background, QSize* size) { backgroundColor=oldb; } -void JKQTFastPlotter::update_plot() { +void JKQTFastPlotter::replotPlot() { calcPlotScaling(); if (!doDrawing) { doFullRepaint=true; @@ -572,7 +572,7 @@ void JKQTFastPlotter::update_plot() { update_data(); } -void JKQTFastPlotter::update_plot_immediate() { +void JKQTFastPlotter::replotPlot_immediate() { calcPlotScaling(); if (!doDrawing) { doFullRepaint=true; @@ -593,7 +593,7 @@ void JKQTFastPlotter::update_plot_immediate() { void JKQTFastPlotter::update_data() { if (doFullRepaint) { // as doFullRepaint is set false in updtae_plot() this is NO endles loop!!!!!!! - update_plot(); + replotPlot(); return; } if (!doDrawing) return; @@ -618,7 +618,7 @@ void JKQTFastPlotter::update_data() { void JKQTFastPlotter::update_data_immediate() { if (doFullRepaint) { // as doFullRepaint is set false in updtae_plot() this is NO endles loop!!!!!!! - update_plot_immediate(); + replotPlot_immediate(); return; } if (!doDrawing) return; @@ -728,16 +728,16 @@ void JKQTFastPlotter::calcPlotScaling() { internalPlotBorderRight=synchronizeX->get_internalPlotBorderRight(); xMin=synchronizeX->get_xMin(); xMax=synchronizeX->get_xMax(); - xAxisLog=synchronizeX->get_xAxisLog(); - xAxisLabel=synchronizeX->get_xAxisLabel(); + xAxisLog=synchronizeX->getXAxisLog(); + xAxisLabel=synchronizeX->getXAxisLabel(); } if (synchronizeY!=nullptr) { internalPlotBorderTop=synchronizeY->get_internalPlotBorderTop(); internalPlotBorderBottom=synchronizeY->get_internalPlotBorderBottom(); yMin=synchronizeY->get_yMin(); yMax=synchronizeY->get_yMax(); - yAxisLog=synchronizeY->get_yAxisLog(); - yAxisLabel=synchronizeY->get_yAxisLabel(); + yAxisLog=synchronizeY->getYAxisLog(); + yAxisLabel=synchronizeY->getYAxisLabel(); } @@ -782,7 +782,7 @@ void JKQTFastPlotter::setXRange(double min, double max, bool logarithmic) { xMax=max; xAxisLog=logarithmic; calcPlotScaling(); - update_plot(); + replotPlot(); } void JKQTFastPlotter::setYRange(double min, double max, bool logarithmic) { @@ -790,7 +790,7 @@ void JKQTFastPlotter::setYRange(double min, double max, bool logarithmic) { yMax=max; yAxisLog=logarithmic; calcPlotScaling(); - update_plot(); + replotPlot(); } void JKQTFastPlotter::setXYRange(double xmin, double xmax, double ymin, double ymax, bool xlogarithmic, bool ylogarithmic) { @@ -801,7 +801,7 @@ void JKQTFastPlotter::setXYRange(double xmin, double xmax, double ymin, double y yMax=ymax; yAxisLog=ylogarithmic; calcPlotScaling(); - update_plot(); + replotPlot(); } /* @@ -810,12 +810,12 @@ void JKQTFastPlotter::synchronizeX(JKQTFastPlotter* toWhere) { doDrawing=false; xMin=toWhere->get_xMin(); xMax=toWhere->get_xMax(); - xAxisLog=toWhere->get_xAxisLog(); + xAxisLog=toWhere->getXAxisLog(); plotBorderLeft=toWhere->get_internalPlotBorderLeft(); plotBorderRight=toWhere->get_internalPlotBorderRight(); std::cout<<"syncX: xMin="<get_yMin(); yMax=toWhere->get_yMax(); - yAxisLog=toWhere->get_yAxisLog(); + yAxisLog=toWhere->getYAxisLog(); plotBorderTop=toWhere->get_internalPlotBorderTop(); plotBorderBottom=toWhere->get_internalPlotBorderBottom(); std::cout<<"syncY: yMin="<get_yAxisLog()) { + if (!parent->getYAxisLog()) { if (datatype==JKQTFPLPPointer) { for (unsigned int i=0; ix2p(x[i]); @@ -1071,7 +1071,7 @@ void JKQTFPVBarPlot::drawGraph(QPainter& painter) { } } } else { - double starty=parent->get_internalPlotBorderTop()+parent->get_plotHeight(); + double starty=parent->get_internalPlotBorderTop()+parent->getPlotHeight(); if (datatype==JKQTFPLPPointer) { for (unsigned int i=0; iy2p(y[i]); @@ -1111,7 +1111,7 @@ JKQTFPXRangePlot::JKQTFPXRangePlot(JKQTFastPlotter* parent, double xmin, double } void JKQTFPXRangePlot::drawGraph(QPainter& painter) { - QRectF r(QPointF(parent->x2p(xmin), parent->get_internalPlotBorderTop()), QPointF(parent->x2p(xmax), parent->get_internalPlotBorderTop()+parent->get_plotHeight())); + QRectF r(QPointF(parent->x2p(xmin), parent->get_internalPlotBorderTop()), QPointF(parent->x2p(xmax), parent->get_internalPlotBorderTop()+parent->getPlotHeight())); QBrush b(fillStyle); b.setColor(fillColor); QPen p(color); @@ -1120,7 +1120,7 @@ void JKQTFPXRangePlot::drawGraph(QPainter& painter) { painter.setPen(p); painter.fillRect(r, b); if (showCenterline) { - painter.drawLine(parent->x2p(centerline), parent->get_internalPlotBorderTop(), parent->x2p(centerline), parent->get_internalPlotBorderTop()+parent->get_plotHeight()); + painter.drawLine(parent->x2p(centerline), parent->get_internalPlotBorderTop(), parent->x2p(centerline), parent->get_internalPlotBorderTop()+parent->getPlotHeight()); } painter.drawRect(r); } @@ -1275,13 +1275,13 @@ void JKQTFPimagePlot::drawGraph(QPainter& painter) { if (dx>0 && dy>0) painter.drawImage(QRectF(pxmin, pymax, dx, dy), img.transformed(trans)); - if (drawColorBar && parent->get_plotHeight()>3) { + if (drawColorBar && parent->getPlotHeight()>3) { uint8_t d[200]; for (int i=0; i<200; i++) d[i]=i; QImage b(1, 200, QImage::Format_ARGB32); JKQTFPimagePlot_array2image(d, 1, 200, b, palette, 0, 199); //std::cout<<"bar.width="<get_internalPlotBorderLeft()+parent->get_plotWidth()+parent->get_tickLength()*2, parent->get_internalPlotBorderTop()+parent->get_plotHeight()*0.15, colorBarWidth, parent->get_plotHeight()*0.8); + QRectF r(parent->get_internalPlotBorderLeft()+parent->getPlotWidth()+parent->get_tickLength()*2, parent->get_internalPlotBorderTop()+parent->getPlotHeight()*0.15, colorBarWidth, parent->getPlotHeight()*0.8); //std::cout<<"r.left="<get_internalPlotBorderLeft(), parent->get_internalPlotBorderTop()), QPointF(parent->get_internalPlotBorderLeft()+parent->get_plotWidth(), parent->get_internalPlotBorderTop()+parent->get_plotHeight())); + QRectF r(QPointF(parent->get_internalPlotBorderLeft(), parent->get_internalPlotBorderTop()), QPointF(parent->get_internalPlotBorderLeft()+parent->getPlotWidth(), parent->get_internalPlotBorderTop()+parent->getPlotHeight())); double borderfraction=0.1; - int yDistance=(double)parent->get_plotHeight()*borderfraction; + int yDistance=(double)parent->getPlotHeight()*borderfraction; QPen p(color); p.setWidthF(qMax(JKQTFASTPLOTTER_ABS_MIN_LINEWIDTH, lineWidth)); @@ -1461,7 +1461,7 @@ void JKQTFPQScaleBarXPlot::drawGraph(QPainter& painter) { QFontMetrics fm=painter.fontMetrics(); painter.drawText(xx1+(xx2-xx1)/2-fm.width(s)/2, yy1+3*lineWidth+fm.ascent(), s); } else if (position==JKQTFPQScaleBarXPlot::BottomLeft) { - yy1=parent->get_internalPlotBorderTop()+parent->get_plotHeight()-yDistance; + yy1=parent->get_internalPlotBorderTop()+parent->getPlotHeight()-yDistance; yy2=yy1; x1=parent->get_xMin()+borderfraction*(parent->get_xMax()-parent->get_xMin()); x2=x1+width; @@ -1472,7 +1472,7 @@ void JKQTFPQScaleBarXPlot::drawGraph(QPainter& painter) { QFontMetrics fm=painter.fontMetrics(); painter.drawText(xx1+(xx2-xx1)/2-fm.width(s)/2, yy1-3*lineWidth-fm.descent(), s); } else if (position==JKQTFPQScaleBarXPlot::BottomRight) { - yy1=parent->get_internalPlotBorderTop()+parent->get_plotHeight()-yDistance; + yy1=parent->get_internalPlotBorderTop()+parent->getPlotHeight()-yDistance; yy2=yy1; x2=parent->get_xMax()-borderfraction*(parent->get_xMax()-parent->get_xMin()); x1=x2-width; @@ -1525,7 +1525,7 @@ void JKQTFPQOverlayLinearGridPlot::drawGraph(QPainter& painter) { while (x<=xmax && cntr<1000) { if (xmin<=x && x<=xmax) { gridPath.moveTo(parent->x2p(x), parent->get_internalPlotBorderTop()); - gridPath.lineTo(parent->x2p(x), parent->get_internalPlotBorderTop()+parent->get_plotHeight()); + gridPath.lineTo(parent->x2p(x), parent->get_internalPlotBorderTop()+parent->getPlotHeight()); } x+=width; cntr++; @@ -1535,7 +1535,7 @@ void JKQTFPQOverlayLinearGridPlot::drawGraph(QPainter& painter) { while (y<=ymax && cntr<1000) { if (ymin<=y && y<=ymax) { gridPath.moveTo(parent->get_internalPlotBorderLeft(), parent->y2p(y)); - gridPath.lineTo(parent->get_internalPlotBorderLeft()+parent->get_plotWidth(), parent->y2p(y)); + gridPath.lineTo(parent->get_internalPlotBorderLeft()+parent->getPlotWidth(), parent->y2p(y)); } y+=width; cntr++; @@ -1778,7 +1778,7 @@ JKQTFPYRangePlot::JKQTFPYRangePlot(JKQTFastPlotter *parent, double xmin, double } void JKQTFPYRangePlot::drawGraph(QPainter& painter) { - QRectF r(QPointF(parent->get_internalPlotBorderLeft(), parent->y2p(ymin)), QPointF(parent->get_internalPlotBorderLeft()+parent->get_plotWidth(), parent->y2p(ymax))); + QRectF r(QPointF(parent->get_internalPlotBorderLeft(), parent->y2p(ymin)), QPointF(parent->get_internalPlotBorderLeft()+parent->getPlotWidth(), parent->y2p(ymax))); QBrush b(fillStyle); b.setColor(fillColor); QPen p(color); @@ -1787,7 +1787,7 @@ void JKQTFPYRangePlot::drawGraph(QPainter& painter) { painter.setPen(p); painter.fillRect(r, b); if (showCenterline) { - painter.drawLine(parent->get_internalPlotBorderLeft(), parent->y2p(centerline), parent->get_internalPlotBorderLeft()+parent->get_plotWidth(), parent->y2p(centerline)); + painter.drawLine(parent->get_internalPlotBorderLeft(), parent->y2p(centerline), parent->get_internalPlotBorderLeft()+parent->getPlotWidth(), parent->y2p(centerline)); } painter.drawRect(r); } diff --git a/lib/jkqtfastplotter/jkqtfastplotter.h b/lib/jkqtfastplotter/jkqtfastplotter.h index 2df26ce30f..f8d87988df 100644 --- a/lib/jkqtfastplotter/jkqtfastplotter.h +++ b/lib/jkqtfastplotter/jkqtfastplotter.h @@ -82,7 +82,7 @@ class JKQTFPPlot; plot selections ... over the plot, without having to replot the plots. - The definition of the coordinate system as well as the definition the system ticks ... is reduced to the absolute minimum. - - The method set_doDrawing() allows to prevent replotting of the class contents, e.g. when you want to set + - The method setPlotUpdateEnabled() allows to prevent replotting of the class contents, e.g. when you want to set a multitude of parameters without triggering a replot every time. . @@ -479,94 +479,94 @@ class LIB_EXPORT JKQTFastPlotter : public JKQTFASTPLOTTER_BASEWIDGET { /*! \brief sets the property plotBorderLeft to the specified \a __value. \details Description of the parameter plotBorderLeft is:
\copydoc JKQTFastPlotter::plotBorderLeft
\see plotBorderLeft for more information */ - inline virtual void set_plotBorderLeft(int __value) + inline virtual void setPlotBorderLeft(int __value) { if (this->plotBorderLeft != __value) { this->plotBorderLeft = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property plotBorderLeft. \details Description of the parameter plotBorderLeft is:
\copydoc JKQTFastPlotter::plotBorderLeft
\see plotBorderLeft for more information */ - inline virtual int get_plotBorderLeft() const + inline virtual int getPlotBorderLeft() const { return this->plotBorderLeft; } /*! \brief sets the property plotBorderBottom to the specified \a __value. \details Description of the parameter plotBorderBottom is:
\copydoc JKQTFastPlotter::plotBorderBottom
\see plotBorderBottom for more information */ - inline virtual void set_plotBorderBottom(int __value) + inline virtual void setPlotBorderBottom(int __value) { if (this->plotBorderBottom != __value) { this->plotBorderBottom = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property plotBorderBottom. \details Description of the parameter plotBorderBottom is:
\copydoc JKQTFastPlotter::plotBorderBottom
\see plotBorderBottom for more information */ - inline virtual int get_plotBorderBottom() const + inline virtual int getPlotBorderBottom() const { return this->plotBorderBottom; } /*! \brief sets the property plotBorderRight to the specified \a __value. \details Description of the parameter plotBorderRight is:
\copydoc JKQTFastPlotter::plotBorderRight
\see plotBorderRight for more information */ - inline virtual void set_plotBorderRight(int __value) + inline virtual void setPlotBorderRight(int __value) { if (this->plotBorderRight != __value) { this->plotBorderRight = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property plotBorderRight. \details Description of the parameter plotBorderRight is:
\copydoc JKQTFastPlotter::plotBorderRight
\see plotBorderRight for more information */ - inline virtual int get_plotBorderRight() const + inline virtual int getPlotBorderRight() const { return this->plotBorderRight; } /*! \brief sets the property plotBorderTop to the specified \a __value. \details Description of the parameter plotBorderTop is:
\copydoc JKQTFastPlotter::plotBorderTop
\see plotBorderTop for more information */ - inline virtual void set_plotBorderTop(int __value) + inline virtual void setPlotBorderTop(int __value) { if (this->plotBorderTop != __value) { this->plotBorderTop = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property plotBorderTop. \details Description of the parameter plotBorderTop is:
\copydoc JKQTFastPlotter::plotBorderTop
\see plotBorderTop for more information */ - inline virtual int get_plotBorderTop() const + inline virtual int getPlotBorderTop() const { return this->plotBorderTop; } /*! \brief returns the property plotWidth. \details Description of the parameter plotWidth is:
\copydoc JKQTFastPlotter::plotWidth
. \see plotWidth for more information */ - inline int get_plotWidth() const { + inline int getPlotWidth() const { return this->plotWidth; } /*! \brief returns the property plotHeight. \details Description of the parameter plotHeight is:
\copydoc JKQTFastPlotter::plotHeight
. \see plotHeight for more information */ - inline int get_plotHeight() const { + inline int getPlotHeight() const { return this->plotHeight; } /*! \brief sets the property doDrawing to the specified \a __value. \details Description of the parameter doDrawing is:
\copydoc JKQTFastPlotter::doDrawing
\see doDrawing for more information */ - inline virtual void set_doDrawing(bool __value) + inline virtual void setPlotUpdateEnabled(bool __value) { this->doDrawing = __value; } /*! \brief returns the property doDrawing. \details Description of the parameter doDrawing is:
\copydoc JKQTFastPlotter::doDrawing
\see doDrawing for more information */ - inline virtual bool get_doDrawing() const + inline virtual bool isPlotUpdateEnabled() const { return this->doDrawing; } @@ -621,47 +621,47 @@ class LIB_EXPORT JKQTFastPlotter : public JKQTFASTPLOTTER_BASEWIDGET { /*! \brief returns the property xAxisLog. \details Description of the parameter xAxisLog is:
\copydoc JKQTFastPlotter::xAxisLog
. \see xAxisLog for more information */ - inline bool get_xAxisLog() const { + inline bool getXAxisLog() const { return this->xAxisLog; } /*! \brief returns the property yAxisLog. \details Description of the parameter yAxisLog is:
\copydoc JKQTFastPlotter::yAxisLog
. \see yAxisLog for more information */ - inline bool get_yAxisLog() const { + inline bool getYAxisLog() const { return this->yAxisLog; } /*! \brief sets the property backgroundColor to the specified \a __value. \details Description of the parameter backgroundColor is:
\copydoc JKQTFastPlotter::backgroundColor
\see backgroundColor for more information */ - inline virtual void set_backgroundColor(const QColor & __value) + inline virtual void setBackgroundColor(const QColor & __value) { if (this->backgroundColor != __value) { this->backgroundColor = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property backgroundColor. \details Description of the parameter backgroundColor is:
\copydoc JKQTFastPlotter::backgroundColor
\see backgroundColor for more information */ - inline virtual QColor get_backgroundColor() const + inline virtual QColor getBackgroundColor() const { return this->backgroundColor; } /*! \brief sets the property plotBackgroundColor to the specified \a __value. \details Description of the parameter plotBackgroundColor is:
\copydoc JKQTFastPlotter::plotBackgroundColor
\see plotBackgroundColor for more information */ - inline virtual void set_plotBackgroundColor(const QColor & __value) + inline virtual void setPlotBackgroundColor(const QColor & __value) { if (this->plotBackgroundColor != __value) { this->plotBackgroundColor = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property plotBackgroundColor. \details Description of the parameter plotBackgroundColor is:
\copydoc JKQTFastPlotter::plotBackgroundColor
\see plotBackgroundColor for more information */ - inline virtual QColor get_plotBackgroundColor() const + inline virtual QColor getPlotBackgroundColor() const { return this->plotBackgroundColor; } @@ -672,7 +672,7 @@ class LIB_EXPORT JKQTFastPlotter : public JKQTFASTPLOTTER_BASEWIDGET { { if (this->drawGrid != __value) { this->drawGrid = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property drawGrid. @@ -685,51 +685,51 @@ class LIB_EXPORT JKQTFastPlotter : public JKQTFASTPLOTTER_BASEWIDGET { /*! \brief sets the property gridColor to the specified \a __value. \details Description of the parameter gridColor is:
\copydoc JKQTFastPlotter::gridColor
\see gridColor for more information */ - inline virtual void set_gridColor(const QColor & __value) + inline virtual void setGridColor(const QColor & __value) { if (this->gridColor != __value) { this->gridColor = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property gridColor. \details Description of the parameter gridColor is:
\copydoc JKQTFastPlotter::gridColor
\see gridColor for more information */ - inline virtual QColor get_gridColor() const + inline virtual QColor getGridColor() const { return this->gridColor; } /*! \brief sets the property gridStyle to the specified \a __value. \details Description of the parameter gridStyle is:
\copydoc JKQTFastPlotter::gridStyle
\see gridStyle for more information */ - inline virtual void set_gridStyle(const Qt::PenStyle & __value) + inline virtual void setGridStyle(const Qt::PenStyle & __value) { if (this->gridStyle != __value) { this->gridStyle = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property gridStyle. \details Description of the parameter gridStyle is:
\copydoc JKQTFastPlotter::gridStyle
\see gridStyle for more information */ - inline virtual Qt::PenStyle get_gridStyle() const + inline virtual Qt::PenStyle getGridStyle() const { return this->gridStyle; } /*! \brief sets the property gridWidth to the specified \a __value. \details Description of the parameter gridWidth is:
\copydoc JKQTFastPlotter::gridWidth
\see gridWidth for more information */ - inline virtual void set_gridWidth(double __value) + inline virtual void setGridWidth(double __value) { if (this->gridWidth != __value) { this->gridWidth = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property gridWidth. \details Description of the parameter gridWidth is:
\copydoc JKQTFastPlotter::gridWidth
\see gridWidth for more information */ - inline virtual double get_gridWidth() const + inline virtual double getGridWidth() const { return this->gridWidth; } @@ -740,7 +740,7 @@ class LIB_EXPORT JKQTFastPlotter : public JKQTFASTPLOTTER_BASEWIDGET { { if (this->labelFontSize != __value) { this->labelFontSize = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property labelFontSize. @@ -757,7 +757,7 @@ class LIB_EXPORT JKQTFastPlotter : public JKQTFASTPLOTTER_BASEWIDGET { { if (this->labelFontName != __value) { this->labelFontName = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property labelFontName. @@ -774,7 +774,7 @@ class LIB_EXPORT JKQTFastPlotter : public JKQTFASTPLOTTER_BASEWIDGET { { if (this->tickFontSize != __value) { this->tickFontSize = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property tickFontSize. @@ -791,7 +791,7 @@ class LIB_EXPORT JKQTFastPlotter : public JKQTFASTPLOTTER_BASEWIDGET { { if (this->tickFontName != __value) { this->tickFontName = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property tickFontName. @@ -808,7 +808,7 @@ class LIB_EXPORT JKQTFastPlotter : public JKQTFASTPLOTTER_BASEWIDGET { { if (this->tickLength != __value) { this->tickLength = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property tickLength. @@ -825,7 +825,7 @@ class LIB_EXPORT JKQTFastPlotter : public JKQTFASTPLOTTER_BASEWIDGET { { if (this->drawSystemBox != __value) { this->drawSystemBox = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property drawSystemBox. @@ -842,7 +842,7 @@ class LIB_EXPORT JKQTFastPlotter : public JKQTFASTPLOTTER_BASEWIDGET { { if (this->drawZeroAxes != __value) { this->drawZeroAxes = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property drawZeroAxes. @@ -859,7 +859,7 @@ class LIB_EXPORT JKQTFastPlotter : public JKQTFASTPLOTTER_BASEWIDGET { { if (this->systemColor != __value) { this->systemColor = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property systemColor. @@ -876,7 +876,7 @@ class LIB_EXPORT JKQTFastPlotter : public JKQTFASTPLOTTER_BASEWIDGET { { if (this->systemWidth != __value) { this->systemWidth = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property systemWidth. @@ -893,7 +893,7 @@ class LIB_EXPORT JKQTFastPlotter : public JKQTFASTPLOTTER_BASEWIDGET { { if (this->xZeroTick != __value) { this->xZeroTick = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property xZeroTick. @@ -910,7 +910,7 @@ class LIB_EXPORT JKQTFastPlotter : public JKQTFASTPLOTTER_BASEWIDGET { { if (this->yZeroTick != __value) { this->yZeroTick = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property yZeroTick. @@ -927,7 +927,7 @@ class LIB_EXPORT JKQTFastPlotter : public JKQTFASTPLOTTER_BASEWIDGET { { if (this->xTickDistance != __value) { this->xTickDistance = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property xTickDistance. @@ -944,7 +944,7 @@ class LIB_EXPORT JKQTFastPlotter : public JKQTFASTPLOTTER_BASEWIDGET { { if (this->yTickDistance != __value) { this->yTickDistance = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property yTickDistance. @@ -961,13 +961,13 @@ class LIB_EXPORT JKQTFastPlotter : public JKQTFASTPLOTTER_BASEWIDGET { { if (this->xAxisLabel != __value) { this->xAxisLabel = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property xAxisLabel. \details Description of the parameter xAxisLabel is:
\copydoc JKQTFastPlotter::xAxisLabel
\see xAxisLabel for more information */ - inline virtual QString get_xAxisLabel() const + inline virtual QString getXAxisLabel() const { return this->xAxisLabel; } @@ -978,47 +978,47 @@ class LIB_EXPORT JKQTFastPlotter : public JKQTFASTPLOTTER_BASEWIDGET { { if (this->yAxisLabel != __value) { this->yAxisLabel = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property yAxisLabel. \details Description of the parameter yAxisLabel is:
\copydoc JKQTFastPlotter::yAxisLabel
\see yAxisLabel for more information */ - inline virtual QString get_yAxisLabel() const + inline virtual QString getYAxisLabel() const { return this->yAxisLabel; } /*! \brief sets the property aspectRatio to the specified \a __value. \details Description of the parameter aspectRatio is:
\copydoc JKQTFastPlotter::aspectRatio
\see aspectRatio for more information */ - inline virtual void set_aspectRatio(double __value) + inline virtual void setAspectRatio(double __value) { if (this->aspectRatio != __value) { this->aspectRatio = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property aspectRatio. \details Description of the parameter aspectRatio is:
\copydoc JKQTFastPlotter::aspectRatio
\see aspectRatio for more information */ - inline virtual double get_aspectRatio() const + inline virtual double getAspectRatio() const { return this->aspectRatio; } /*! \brief sets the property maintainAspectRatio to the specified \a __value. \details Description of the parameter maintainAspectRatio is:
\copydoc JKQTFastPlotter::maintainAspectRatio
\see maintainAspectRatio for more information */ - inline virtual void set_maintainAspectRatio(bool __value) + inline virtual void setMaintainAspectRatio(bool __value) { if (this->maintainAspectRatio != __value) { this->maintainAspectRatio = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property maintainAspectRatio. \details Description of the parameter maintainAspectRatio is:
\copydoc JKQTFastPlotter::maintainAspectRatio
\see maintainAspectRatio for more information */ - inline virtual bool get_maintainAspectRatio() const + inline virtual bool doesMaintainAspectRatio() const { return this->maintainAspectRatio; } @@ -1029,13 +1029,13 @@ class LIB_EXPORT JKQTFastPlotter : public JKQTFASTPLOTTER_BASEWIDGET { { if (this->xAxisLabelVisible != __value) { this->xAxisLabelVisible = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property xAxisLabelVisible. \details Description of the parameter xAxisLabelVisible is:
\copydoc JKQTFastPlotter::xAxisLabelVisible
\see xAxisLabelVisible for more information */ - inline virtual bool get_xAxisLabelVisible() const + inline virtual bool getXAxisLabelVisible() const { return this->xAxisLabelVisible; } @@ -1046,13 +1046,13 @@ class LIB_EXPORT JKQTFastPlotter : public JKQTFASTPLOTTER_BASEWIDGET { { if (this->yAxisLabelVisible != __value) { this->yAxisLabelVisible = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property yAxisLabelVisible. \details Description of the parameter yAxisLabelVisible is:
\copydoc JKQTFastPlotter::yAxisLabelVisible
\see yAxisLabelVisible for more information */ - inline virtual bool get_yAxisLabelVisible() const + inline virtual bool getYAxisLabelVisible() const { return this->yAxisLabelVisible; } @@ -1063,7 +1063,7 @@ class LIB_EXPORT JKQTFastPlotter : public JKQTFASTPLOTTER_BASEWIDGET { { if (this->synchronizeX != __value) { this->synchronizeX = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property synchronizeX. @@ -1080,7 +1080,7 @@ class LIB_EXPORT JKQTFastPlotter : public JKQTFASTPLOTTER_BASEWIDGET { { if (this->synchronizeY != __value) { this->synchronizeY = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property synchronizeY. @@ -1120,9 +1120,9 @@ class LIB_EXPORT JKQTFastPlotter : public JKQTFASTPLOTTER_BASEWIDGET { /** \brief copy the current plot image to the clipboard */ void copyImage(); /** \brief replot everything (slowest possible plotting) */ - void update_plot(); + void replotPlot(); /** \brief replot everything (slowest possible plotting) and forces a repaint calling QWidget::repaint() */ - void update_plot_immediate(); + void replotPlot_immediate(); /** \brief replot only the data * * This internally calls QWidget::update(), so no immediate repaint() is forced! If you want an immediate update, @@ -1134,27 +1134,27 @@ class LIB_EXPORT JKQTFastPlotter : public JKQTFASTPLOTTER_BASEWIDGET { /** \brief set xMin*/ void set_xMin(double value){ - set_doDrawing(false); + setPlotUpdateEnabled(false); setXRange(value,xMax,xAxisLog); - set_doDrawing(true); + setPlotUpdateEnabled(true); } /** \brief set xMax*/ void set_xMax(double value){ - set_doDrawing(false); + setPlotUpdateEnabled(false); setXRange(xMin,value,xAxisLog); - set_doDrawing(true); + setPlotUpdateEnabled(true); } /** \brief set yMin*/ void set_yMin(double value){ - set_doDrawing(false); + setPlotUpdateEnabled(false); setYRange(value,yMax,yAxisLog); - set_doDrawing(true); + setPlotUpdateEnabled(true); } /** \brief set yMax*/ void set_yMax(double value){ - set_doDrawing(false); + setPlotUpdateEnabled(false); setYRange(yMin,value,yAxisLog); - set_doDrawing(true); + setPlotUpdateEnabled(true); } @@ -1709,7 +1709,7 @@ class LIB_EXPORT JKQTFPXRangePlot: public JKQTFPPlot { /*! \brief sets the property showCenterline to the specified \a __value. \details Description of the parameter showCenterline is:
\copydoc JKQTFPXRangePlot::showCenterline
\see showCenterline for more information */ - inline virtual void set_showCenterline(bool __value) + inline virtual void setShowCenterline(bool __value) { if (this->showCenterline != __value) { this->showCenterline = __value; @@ -1719,7 +1719,7 @@ class LIB_EXPORT JKQTFPXRangePlot: public JKQTFPPlot { /*! \brief returns the property showCenterline. \details Description of the parameter showCenterline is:
\copydoc JKQTFPXRangePlot::showCenterline
\see showCenterline for more information */ - inline virtual bool get_showCenterline() const + inline virtual bool getShowCenterline() const { return this->showCenterline; } @@ -1903,7 +1903,7 @@ class LIB_EXPORT JKQTFPYRangePlot: public JKQTFPPlot { /*! \brief sets the property showCenterline to the specified \a __value. \details Description of the parameter showCenterline is:
\copydoc JKQTFPYRangePlot::showCenterline
\see showCenterline for more information */ - inline virtual void set_showCenterline(bool __value) + inline virtual void setShowCenterline(bool __value) { if (this->showCenterline != __value) { this->showCenterline = __value; @@ -1913,7 +1913,7 @@ class LIB_EXPORT JKQTFPYRangePlot: public JKQTFPPlot { /*! \brief returns the property showCenterline. \details Description of the parameter showCenterline is:
\copydoc JKQTFPYRangePlot::showCenterline
\see showCenterline for more information */ - inline virtual bool get_showCenterline() const + inline virtual bool getShowCenterline() const { return this->showCenterline; } @@ -3628,7 +3628,7 @@ class LIB_EXPORT JKQTFPimageOverlayPlot: public JKQTFPPlot { /*! \brief sets the property showAsSymbols to the specified \a __value. \details Description of the parameter showAsSymbols is:
\copydoc JKQTFPimageOverlayPlot::showAsSymbols
\see showAsSymbols for more information */ - inline virtual void set_showAsSymbols(bool __value) + inline virtual void setShowAsSymbols(bool __value) { if (this->showAsSymbols != __value) { this->showAsSymbols = __value; @@ -3638,7 +3638,7 @@ class LIB_EXPORT JKQTFPimageOverlayPlot: public JKQTFPPlot { /*! \brief returns the property showAsSymbols. \details Description of the parameter showAsSymbols is:
\copydoc JKQTFPimageOverlayPlot::showAsSymbols
\see showAsSymbols for more information */ - inline virtual bool get_showAsSymbols() const + inline virtual bool getShowAsSymbols() const { return this->showAsSymbols; } @@ -3722,7 +3722,7 @@ class LIB_EXPORT JKQTFPQScaleBarXPlot: public JKQTFPPlot { /*! \brief sets the property lineWidth to the specified \a __value. \details Description of the parameter lineWidth is:
\copydoc JKQTFPimageOverlayPlot::lineWidth
\see lineWidth for more information */ - inline virtual void set_lineWidth(double __value) + inline virtual void setLineWidth(double __value) { if (this->lineWidth != __value) { this->lineWidth = __value; @@ -3732,7 +3732,7 @@ class LIB_EXPORT JKQTFPQScaleBarXPlot: public JKQTFPPlot { /*! \brief returns the property lineWidth. \details Description of the parameter lineWidth is:
\copydoc JKQTFPimageOverlayPlot::lineWidth
\see lineWidth for more information */ - inline virtual double get_lineWidth() const + inline virtual double getLineWidth() const { return this->lineWidth; } @@ -3773,7 +3773,7 @@ class LIB_EXPORT JKQTFPQScaleBarXPlot: public JKQTFPPlot { /*! \brief sets the property font to the specified \a __value. \details Description of the parameter font is:
\copydoc JKQTFPimageOverlayPlot::font
\see font for more information */ - inline virtual void set_font(const QFont & __value) + inline virtual void setFont(const QFont & __value) { if (this->font != __value) { this->font = __value; @@ -3783,7 +3783,7 @@ class LIB_EXPORT JKQTFPQScaleBarXPlot: public JKQTFPPlot { /*! \brief returns the property font. \details Description of the parameter font is:
\copydoc JKQTFPimageOverlayPlot::font
\see font for more information */ - inline virtual QFont get_font() const + inline virtual QFont getFont() const { return this->font; } @@ -3859,7 +3859,7 @@ class LIB_EXPORT JKQTFPQOverlayLinearGridPlot: public JKQTFPPlot { /*! \brief sets the property lineWidth to the specified \a __value. \details Description of the parameter lineWidth is:
\copydoc JKQTFPQOverlayLinearGridPlot::lineWidth
\see lineWidth for more information */ - inline virtual void set_lineWidth(double __value) + inline virtual void setLineWidth(double __value) { if (this->lineWidth != __value) { this->lineWidth = __value; @@ -3869,7 +3869,7 @@ class LIB_EXPORT JKQTFPQOverlayLinearGridPlot: public JKQTFPPlot { /*! \brief returns the property lineWidth. \details Description of the parameter lineWidth is:
\copydoc JKQTFPQOverlayLinearGridPlot::lineWidth
\see lineWidth for more information */ - inline virtual double get_lineWidth() const + inline virtual double getLineWidth() const { return this->lineWidth; } diff --git a/lib/jkqtmathtext/jkqtmathtext.cpp b/lib/jkqtmathtext/jkqtmathtext.cpp index ee7c8d98fe..9c0fff7a28 100644 --- a/lib/jkqtmathtext/jkqtmathtext.cpp +++ b/lib/jkqtmathtext/jkqtmathtext.cpp @@ -138,17 +138,17 @@ QFont JKQTMathText::MTenvironment::getFont(JKQTMathText* parent) const { QFont f; switch (font) { case MTEsans: - if (insideMath) f.setFamily(parent->get_fontMathSans()); - else f.setFamily(parent->get_fontSans()); + if (insideMath) f.setFamily(parent->getFontMathSans()); + else f.setFamily(parent->getFontSans()); break; - case MTEtypewriter: f.setFamily(parent->get_fontTypewriter()); break; - case MTEscript: f.setFamily(parent->get_fontScript()); break; + case MTEtypewriter: f.setFamily(parent->getFontTypewriter()); break; + case MTEscript: f.setFamily(parent->getFontScript()); break; case MTEroman: - if (insideMath) f.setFamily(parent->get_fontMathRoman()); - else f.setFamily(parent->get_fontRoman()); + if (insideMath) f.setFamily(parent->getFontMathRoman()); + else f.setFamily(parent->getFontRoman()); break; - case MTEcaligraphic: f.setFamily(parent->get_fontCaligraphic()); break; - case MTEblackboard: f.setFamily(parent->get_fontBlackboard()); break; + case MTEcaligraphic: f.setFamily(parent->getFontCaligraphic()); break; + case MTEblackboard: f.setFamily(parent->getFontBlackboard()); break; }; f.setBold(bold); f.setItalic(italic); @@ -271,7 +271,7 @@ void JKQTMathText::MTtextNode::getSizeInternal(QPainter& painter, JKQTMathText:: text==QString(QChar(0x2329)) || text==QString(QChar(0x232A)) || text==QString(QChar(0x2308)) || text==QString(QChar(0x2309)) || text==QString(QChar(0x230A)) || text==QString(QChar(0x230B)))) { f.setItalic(false); - f.setFamily(parent->get_fontBraces()); + f.setFamily(parent->getFontBraces()); } QString txt=textTransform(text, currentEv, true); QFontMetricsF fm(f, painter.device()); @@ -324,7 +324,7 @@ double JKQTMathText::MTtextNode::draw(QPainter& painter, double x, double y, JKQ text==QString(QChar(0x2329)) || text==QString(QChar(0x232A)) || text==QString(QChar(0x2308)) || text==QString(QChar(0x2309)) || text==QString(QChar(0x230A)) || text==QString(QChar(0x230B)))) { f.setItalic(false); - f.setFamily(parent->get_fontBraces()); + f.setFamily(parent->getFontBraces()); } @@ -384,7 +384,7 @@ QString JKQTMathText::MTtextNode::getTypeName() const QString JKQTMathText::MTtextNode::textTransform(const QString &text, JKQTMathText::MTenvironment currentEv, bool /*forSize*/) { QString txt=text; - if (parent->get_fontEncoding()==MTFEunicode) { + if (parent->getFontEncoding()==MTFEunicode) { if (currentEv.insideMath) { txt=""; for (int i=0; iget_fontEncoding()==MTFEunicode) { + if (currentEv.font==MTEblackboard && parent->getFontEncoding()==MTFEunicode) { txt=""; for (int i=0; iget_fontEncoding()==MTFEunicode) { + if (currentEv.font==MTEcaligraphic && parent->getFontEncoding()==MTFEunicode) { txt=""; for (int i=0; iget_fontSize()) { + while (ev.fontSize<10*parent->getFontSize()) { const QFontMetricsF fme(evf, painter.device()); if (fme.ascent()>overallHeight) break; ev.fontSize+=0.5; @@ -2543,7 +2543,7 @@ JKQTMathText::MTsymbolNode::MTsymbolNode(JKQTMathText* parent, QString name, boo symbol = itsimplehia.value(); heightIsAscent = true; } else { - if (parent->get_fontEncoding() == MTFEwinSymbol) { + if (parent->getFontEncoding() == MTFEwinSymbol) { // first we start with greek characters font = MTSFgreek; italic = -1; @@ -2606,7 +2606,7 @@ JKQTMathText::MTsymbolNode::MTsymbolNode(JKQTMathText* parent, QString name, boo //else if (n=="") symbol=QChar(0x); } } - else if (parent->get_fontEncoding() == MTFEunicode) { // use UNICODE encoding for special characters + else if (parent->getFontEncoding() == MTFEunicode) { // use UNICODE encoding for special characters // first we start with greek characters font = MTSFdefault; //MTSFgreek; //std::cout<<"encoding unicode\n"; @@ -2667,7 +2667,7 @@ JKQTMathText::MTsymbolNode::MTsymbolNode(JKQTMathText* parent, QString name, boo //else if (n=="") symbol=QChar(0x); } } - else if (parent->get_fontEncoding() == MTFElatex) { // use UNICODE encoding for special characters + else if (parent->getFontEncoding() == MTFElatex) { // use UNICODE encoding for special characters // first we start with greek characters font = MTSFdefault; //MTSFgreek; //std::cout<<"encoding unicode\n"; @@ -2738,12 +2738,12 @@ QString JKQTMathText::MTsymbolNode::getTypeName() const QFont JKQTMathText::MTsymbolNode::getFontName(symbolFont f, QFont& fi) { QFont fr=fi; switch(f) { - case MTSFgreek: fr.setFamily(parent->get_fontGreek()); break; - case MTSFsymbol: fr.setFamily(parent->get_fontSymbol()); break; - case MTSFbraces: fr.setFamily(parent->get_fontBraces()); break; - case MTSFintegrals: fr.setFamily(parent->get_fontIntegrals()); break; - case MTSFcaligraphic: fr.setFamily(parent->get_fontCaligraphic()); break; - case MTSFblackboard: fr.setFamily(parent->get_fontBlackboard()); break; + case MTSFgreek: fr.setFamily(parent->getFontGreek()); break; + case MTSFsymbol: fr.setFamily(parent->getFontSymbol()); break; + case MTSFbraces: fr.setFamily(parent->getFontBraces()); break; + case MTSFintegrals: fr.setFamily(parent->getFontIntegrals()); break; + case MTSFcaligraphic: fr.setFamily(parent->getFontCaligraphic()); break; + case MTSFblackboard: fr.setFamily(parent->getFontBlackboard()); break; default: break; } return fr; @@ -4213,7 +4213,7 @@ JKQTMathTextLabel::JKQTMathTextLabel(QWidget *parent): { m_mathText=new JKQTMathText(this); m_mathText->useXITS(); - m_mathText->set_fontSize(font().pointSizeF()*1.3); + m_mathText->setFontSize(font().pointSizeF()*1.3); lastText=""; repaintDo=true; buffer=QPixmap(); diff --git a/lib/jkqtmathtext/jkqtmathtext.h b/lib/jkqtmathtext/jkqtmathtext.h index 008f67b7d4..f3b756b1f3 100644 --- a/lib/jkqtmathtext/jkqtmathtext.h +++ b/lib/jkqtmathtext/jkqtmathtext.h @@ -74,7 +74,7 @@ LIB_EXPORT void initJKQTMathTextResources(); // configure its properties to influence the rendering (e.g. fonts to use, font size, ...) mathText.useXITS(); - mathText.set_fontSize(20); + mathText.setFontSize(20); // parse some LaTeX code (the Schroedinger's equation) mathText.parse("$\\left[-\\frac{\\hbar^2}{2m}\\frac{\\partial^2}{\\partial x^2}+V(x)\\right]\\Psi(x)=\\mathrm{i}\\hbar\\frac{\\partial}{\\partial t}\\Psi(x)$"); @@ -186,16 +186,16 @@ LIB_EXPORT void initJKQTMathTextResources(); \section JKQTMathTextSuppoertedFonts Font Handling Several fonts are defined as properties to the class: - - A "roman" font used as the standard font ( set_fontRoman() in math-mode set_fontMathRoman() ) - - A "sans-serif" font which may be activated with \c \\sf ... ( set_fontSans() in math-mode set_fontMathSans() ) - - A "typewriter" font which may be activated with \c \\tt ... ( set_fontTypewriter() ) - - A "script" font which may be activated with \c \\script ... ( set_fontScript() ) - - A greek font which is used to display greek letters \c \\alpha ... ( set_fontGreek() ) + - A "roman" font used as the standard font ( setFontRoman() in math-mode setFontMathRoman() ) + - A "sans-serif" font which may be activated with \c \\sf ... ( setFontSans() in math-mode setFontMathSans() ) + - A "typewriter" font which may be activated with \c \\tt ... ( setFontTypewriter() ) + - A "script" font which may be activated with \c \\script ... ( setFontScript() ) + - A greek font which is used to display greek letters \c \\alpha ... ( setFontGreek() ) - A symbol font used to display special (math) symbols. - A "roman" font used as the standard font in math mode - A "sans-serif" used as sans serif font in math mode - - A "blackboard" font used to display double stroked characters (set_fontBlackboard() ) - - A "caligraphic" font used to display caligraphic characters ( set_fontCaligraphic() ) + - A "blackboard" font used to display double stroked characters (setFontBlackboard() ) + - A "caligraphic" font used to display caligraphic characters ( setFontCaligraphic() ) . These fonts are generic font classes, which font is actually used can be configured in JKQTMathText class with the \c set_...() functions mentioned above. You can also use these functions to set the fonts used for math rendering in math-mode: @@ -310,251 +310,251 @@ class LIB_EXPORT JKQTMathText : public QObject { /*! \brief sets the property fontColor to the specified \a __value. \details Description of the parameter fontColor is:
\copydoc fontColor
\see fontColor for more information */ - inline virtual void set_fontColor(const QColor & __value) + inline virtual void setFontColor(const QColor & __value) { this->fontColor = __value; } /*! \brief returns the property fontColor. \details Description of the parameter fontColor is:
\copydoc fontColor
\see fontColor for more information */ - inline virtual QColor get_fontColor() const + inline virtual QColor getFontColor() const { return this->fontColor; } /*! \brief sets the property fontSize to the specified \a __value. \details Description of the parameter fontSize is:
\copydoc fontSize
\see fontSize for more information */ - inline virtual void set_fontSize(double __value) + inline virtual void setFontSize(double __value) { this->fontSize = __value; } /*! \brief returns the property fontSize. \details Description of the parameter fontSize is:
\copydoc fontSize
\see fontSize for more information */ - inline virtual double get_fontSize() const + inline virtual double getFontSize() const { return this->fontSize; } /*! \brief sets the property fontRoman to the specified \a __value. \details Description of the parameter fontRoman is:
\copydoc fontRoman
\see fontRoman for more information */ - inline virtual void set_fontRoman(const QString & __value) + inline virtual void setFontRoman(const QString & __value) { this->fontRoman = __value; } /*! \brief returns the property fontRoman. \details Description of the parameter fontRoman is:
\copydoc fontRoman
\see fontRoman for more information */ - inline virtual QString get_fontRoman() const + inline virtual QString getFontRoman() const { return this->fontRoman; } /*! \brief sets the property fontSans to the specified \a __value. \details Description of the parameter fontSans is:
\copydoc fontSans
\see fontSans for more information */ - inline virtual void set_fontSans(const QString & __value) + inline virtual void setFontSans(const QString & __value) { this->fontSans = __value; } /*! \brief returns the property fontSans. \details Description of the parameter fontSans is:
\copydoc fontSans
\see fontSans for more information */ - inline virtual QString get_fontSans() const + inline virtual QString getFontSans() const { return this->fontSans; } /*! \brief sets the property fontTypewriter to the specified \a __value. \details Description of the parameter fontTypewriter is:
\copydoc fontTypewriter
\see fontTypewriter for more information */ - inline virtual void set_fontTypewriter(const QString & __value) + inline virtual void setFontTypewriter(const QString & __value) { this->fontTypewriter = __value; } /*! \brief returns the property fontTypewriter. \details Description of the parameter fontTypewriter is:
\copydoc fontTypewriter
\see fontTypewriter for more information */ - inline virtual QString get_fontTypewriter() const + inline virtual QString getFontTypewriter() const { return this->fontTypewriter; } /*! \brief sets the property fontScript to the specified \a __value. \details Description of the parameter fontScript is:
\copydoc fontScript
\see fontScript for more information */ - inline virtual void set_fontScript(const QString & __value) + inline virtual void setFontScript(const QString & __value) { this->fontScript = __value; } /*! \brief returns the property fontScript. \details Description of the parameter fontScript is:
\copydoc fontScript
\see fontScript for more information */ - inline virtual QString get_fontScript() const + inline virtual QString getFontScript() const { return this->fontScript; } /*! \brief sets the property fontGreek to the specified \a __value. \details Description of the parameter fontGreek is:
\copydoc fontGreek
\see fontGreek for more information */ - inline virtual void set_fontGreek(const QString & __value) + inline virtual void setFontGreek(const QString & __value) { this->fontGreek = __value; } /*! \brief returns the property fontGreek. \details Description of the parameter fontGreek is:
\copydoc fontGreek
\see fontGreek for more information */ - inline virtual QString get_fontGreek() const + inline virtual QString getFontGreek() const { return this->fontGreek; } /*! \brief sets the property fontSymbol to the specified \a __value. \details Description of the parameter fontSymbol is:
\copydoc fontSymbol
\see fontSymbol for more information */ - inline virtual void set_fontSymbol(const QString & __value) + inline virtual void setFontSymbol(const QString & __value) { this->fontSymbol = __value; } /*! \brief returns the property fontSymbol. \details Description of the parameter fontSymbol is:
\copydoc fontSymbol
\see fontSymbol for more information */ - inline virtual QString get_fontSymbol() const + inline virtual QString getFontSymbol() const { return this->fontSymbol; } /*! \brief sets the property fontBraces to the specified \a __value. \details Description of the parameter fontBraces is:
\copydoc fontBraces
\see fontBraces for more information */ - inline virtual void set_fontBraces(const QString & __value) + inline virtual void setFontBraces(const QString & __value) { this->fontBraces = __value; } /*! \brief returns the property fontBraces. \details Description of the parameter fontBraces is:
\copydoc fontBraces
\see fontBraces for more information */ - inline virtual QString get_fontBraces() const + inline virtual QString getFontBraces() const { return this->fontBraces; } /*! \brief sets the property fontIntegrals to the specified \a __value. \details Description of the parameter fontIntegrals is:
\copydoc fontIntegrals
\see fontIntegrals for more information */ - inline virtual void set_fontIntegrals(const QString & __value) + inline virtual void setFontIntegrals(const QString & __value) { this->fontIntegrals = __value; } /*! \brief returns the property fontIntegrals. \details Description of the parameter fontIntegrals is:
\copydoc fontIntegrals
\see fontIntegrals for more information */ - inline virtual QString get_fontIntegrals() const + inline virtual QString getFontIntegrals() const { return this->fontIntegrals; } /*! \brief sets the property fontCaligraphic to the specified \a __value. \details Description of the parameter fontCaligraphic is:
\copydoc fontCaligraphic
\see fontCaligraphic for more information */ - inline virtual void set_fontCaligraphic(const QString & __value) + inline virtual void setFontCaligraphic(const QString & __value) { this->fontCaligraphic = __value; } /*! \brief returns the property fontCaligraphic. \details Description of the parameter fontCaligraphic is:
\copydoc fontCaligraphic
\see fontCaligraphic for more information */ - inline virtual QString get_fontCaligraphic() const + inline virtual QString getFontCaligraphic() const { return this->fontCaligraphic; } /*! \brief sets the property fontBlackboard to the specified \a __value. \details Description of the parameter fontBlackboard is:
\copydoc fontBlackboard
\see fontBlackboard for more information */ - inline virtual void set_fontBlackboard(const QString & __value) + inline virtual void setFontBlackboard(const QString & __value) { this->fontBlackboard = __value; } /*! \brief returns the property fontBlackboard. \details Description of the parameter fontBlackboard is:
\copydoc fontBlackboard
\see fontBlackboard for more information */ - inline virtual QString get_fontBlackboard() const + inline virtual QString getFontBlackboard() const { return this->fontBlackboard; } /*! \brief sets the property fontMathRoman to the specified \a __value. \details Description of the parameter fontMathRoman is:
\copydoc fontMathRoman
\see fontMathRoman for more information */ - inline virtual void set_fontMathRoman(const QString & __value) + inline virtual void setFontMathRoman(const QString & __value) { this->fontMathRoman = __value; } /*! \brief returns the property fontMathRoman. \details Description of the parameter fontMathRoman is:
\copydoc fontMathRoman
\see fontMathRoman for more information */ - inline virtual QString get_fontMathRoman() const + inline virtual QString getFontMathRoman() const { return this->fontMathRoman; } /*! \brief sets the property fontMathSans to the specified \a __value. \details Description of the parameter fontMathSans is:
\copydoc fontMathSans
\see fontMathSans for more information */ - inline virtual void set_fontMathSans(const QString & __value) + inline virtual void setFontMathSans(const QString & __value) { this->fontMathSans = __value; } /*! \brief returns the property fontMathSans. \details Description of the parameter fontMathSans is:
\copydoc fontMathSans
\see fontMathSans for more information */ - inline virtual QString get_fontMathSans() const + inline virtual QString getFontMathSans() const { return this->fontMathSans; } /*! \brief sets the property fontLatexPrefix to the specified \a __value. \details Description of the parameter fontLatexPrefix is:
\copydoc fontLatexPrefix
\see fontLatexPrefix for more information */ - inline virtual void set_fontLatexPrefix(const QString & __value) + inline virtual void setFontLatexPrefix(const QString & __value) { this->fontLatexPrefix = __value; } /*! \brief returns the property fontLatexPrefix. \details Description of the parameter fontLatexPrefix is:
\copydoc fontLatexPrefix
\see fontLatexPrefix for more information */ - inline virtual QString get_fontLatexPrefix() const + inline virtual QString getFontLatexPrefix() const { return this->fontLatexPrefix; } /*! \brief sets the property fontLatexPostfix to the specified \a __value. \details Description of the parameter fontLatexPostfix is:
\copydoc fontLatexPostfix
\see fontLatexPostfix for more information */ - inline virtual void set_fontLatexPostfix(const QString & __value) + inline virtual void setFontLatexPostfix(const QString & __value) { this->fontLatexPostfix = __value; } /*! \brief returns the property fontLatexPostfix. \details Description of the parameter fontLatexPostfix is:
\copydoc fontLatexPostfix
\see fontLatexPostfix for more information */ - inline virtual QString get_fontLatexPostfix() const + inline virtual QString getFontLatexPostfix() const { return this->fontLatexPostfix; } /*! \brief sets the property fontEncoding to the specified \a __value. \details Description of the parameter fontEncoding is:
\copydoc fontEncoding
\see fontEncoding for more information */ - inline virtual void set_fontEncoding(const MTfontEncoding & __value) + inline virtual void setFontEncoding(const MTfontEncoding & __value) { this->fontEncoding = __value; } /*! \brief returns the property fontEncoding. \details Description of the parameter fontEncoding is:
\copydoc fontEncoding
\see fontEncoding for more information */ - inline virtual MTfontEncoding get_fontEncoding() const + inline virtual MTfontEncoding getFontEncoding() const { return this->fontEncoding; } /*! \brief returns the property useSTIXfonts. \details Description of the parameter useSTIXfonts is:
\copydoc useSTIXfonts
. \see useSTIXfonts for more information */ - inline bool get_useSTIXfonts() const { + inline bool isUsingSTIXfonts() const { return this->useSTIXfonts; } /*! \brief returns the property useXITSfonts. \details Description of the parameter useXITSfonts is:
\copydoc useXITSfonts
. \see useXITSfonts for more information */ - inline bool get_useXITSfonts() const { + inline bool isUsingXITSfonts() const { return this->useXITSfonts; } /*! \brief sets the property brace_factor to the specified \a __value. @@ -770,14 +770,14 @@ class LIB_EXPORT JKQTMathText : public QObject { /*! \brief sets the property useUnparsed to the specified \a __value. \details Description of the parameter useUnparsed is:
\copydoc useUnparsed
\see useUnparsed for more information */ - inline virtual void set_useUnparsed(bool __value) + inline virtual void setUseUnparsed(bool __value) { this->useUnparsed = __value; } /*! \brief returns the property useUnparsed. \details Description of the parameter useUnparsed is:
\copydoc useUnparsed
\see useUnparsed for more information */ - inline virtual bool get_useUnparsed() const + inline virtual bool isUsingUnparsed() const { return this->useUnparsed; } @@ -1058,7 +1058,7 @@ class LIB_EXPORT JKQTMathText : public QObject { /*! \brief returns the property showRightBrace. \details Description of the parameter showRightBrace is:
\copydoc showRightBrace
. \see showRightBrace for more information */ - inline bool get_showRightBrace() const { + inline bool getShowRightBrace() const { return this->showRightBrace; } protected: @@ -1169,7 +1169,7 @@ class LIB_EXPORT JKQTMathText : public QObject { /*! \brief returns the property lines. \details Description of the parameter lines is:
\copydoc lines
. \see lines for more information */ - inline int get_lines() const { + inline int getLines() const { return this->lines; } protected: diff --git a/lib/jkqtplotter/jkqtpbaseelements.cpp b/lib/jkqtplotter/jkqtpbaseelements.cpp index db425d8545..ef48fc3459 100644 --- a/lib/jkqtplotter/jkqtpbaseelements.cpp +++ b/lib/jkqtplotter/jkqtpbaseelements.cpp @@ -121,15 +121,15 @@ void JKQTPCoordinateAxis::set_parent(JKQTBasePlotter* parent) { QObject::setParent(parent); } -void JKQTPCoordinateAxis::update_plot() { +void JKQTPCoordinateAxis::replotPlot() { //if (paramsChanged) { calcPlotScaling(); - parent->update_plot(); + parent->replotPlot(); //} } JKQTMathText* JKQTPCoordinateAxis::get_parent_mathText() { - return parent->get_mathText(); + return parent->getMathText(); } @@ -196,40 +196,40 @@ void JKQTPCoordinateAxis::loadSettings(JKQTPCoordinateAxis* settings) { void JKQTPCoordinateAxis::clearAxisTickLabels() { tickLabels.clear(); - update_plot(); + replotPlot(); } void JKQTPCoordinateAxis::addAxisTickLabel(double x, QString label) { tickLabels.append(qMakePair(x, label)); - update_plot(); + replotPlot(); } void JKQTPCoordinateAxis::addAxisTickLabels(const QVector &x, const QStringList &label) { for (int i=0; i &x, const QString *label) { for (int i=0; itickSpacing = __value; this->paramsChanged=true; - update_plot(); + replotPlot(); } -void JKQTPCoordinateAxis::set_axisMinWidth(double __value) { +void JKQTPCoordinateAxis::setAxisMinWidth(double __value) { this->axisMinWidth = __value; this->paramsChanged=true; - update_plot(); + replotPlot(); } void JKQTPCoordinateAxis::set_autoAxisSpacing(bool __value) { this->autoAxisSpacing = __value; this->paramsChanged=true; - update_plot(); + replotPlot(); } void JKQTPCoordinateAxis::set_minorTickLabelsEnabled(bool __value) { this->minorTickLabelsEnabled = __value; this->paramsChanged=true; - update_plot(); + replotPlot(); } void JKQTPCoordinateAxis::set_logAxis(bool __value) @@ -849,31 +849,31 @@ void JKQTPCoordinateAxis::set_logAxis(bool __value) if (this->isLogAxis() && this->minorTicks==def_minorTicks) { this->minorTicks=9; } - update_plot(); + replotPlot(); } void JKQTPCoordinateAxis::set_logAxisBase(double __value) { this->logAxisBase = __value; this->paramsChanged=true; - update_plot(); + replotPlot(); } -void JKQTPCoordinateAxis::set_userTickSpacing(double __value) { +void JKQTPCoordinateAxis::setUserTickSpacing(double __value) { this->userTickSpacing = __value; this->paramsChanged=true; - update_plot(); + replotPlot(); } -void JKQTPCoordinateAxis::set_userLogTickSpacing(double __value) { +void JKQTPCoordinateAxis::setUserLogTickSpacing(double __value) { this->userLogTickSpacing = __value; this->paramsChanged=true; - update_plot(); + replotPlot(); } void JKQTPCoordinateAxis::set_labelType(JKQTPCALabelType __value) { this->labelType = __value; this->paramsChanged=true; - update_plot(); + replotPlot(); } void JKQTPCoordinateAxis::set_tickMode(JKQTPLabelTickMode __value) @@ -887,239 +887,239 @@ void JKQTPCoordinateAxis::set_tickMode(int __value) { set_tickMode(JKQTPLabelTickMode(__value)); } -void JKQTPCoordinateAxis::set_axisLabel(QString __value) { +void JKQTPCoordinateAxis::setAxisLabel(QString __value) { this->axisLabel = __value; this->paramsChanged=true; - update_plot(); + replotPlot(); } void JKQTPCoordinateAxis::set_labelPosition(JKQTPLabelPosition __value) { this->labelPosition = __value; this->paramsChanged=true; - update_plot(); + replotPlot(); } void JKQTPCoordinateAxis::set_labelFont(QString __value) { this->labelFont = __value; this->paramsChanged=true; - update_plot(); + replotPlot(); } void JKQTPCoordinateAxis::set_labelFontSize(double __value) { this->labelFontSize = __value; this->paramsChanged=true; - update_plot(); + replotPlot(); } void JKQTPCoordinateAxis::set_tickLabelFont(QString __value) { this->tickLabelFont = __value; this->paramsChanged=true; - update_plot(); + replotPlot(); } void JKQTPCoordinateAxis::set_tickTimeFormat(QString __value) { this->tickTimeFormat = __value; this->paramsChanged=true; - update_plot(); + replotPlot(); } void JKQTPCoordinateAxis::set_tickDateFormat(QString __value) { this->tickDateFormat = __value; this->paramsChanged=true; - update_plot(); + replotPlot(); } void JKQTPCoordinateAxis::set_tickDateTimeFormat(QString __value) { this->tickDateTimeFormat = __value; this->paramsChanged=true; - update_plot(); + replotPlot(); } void JKQTPCoordinateAxis::set_tickLabelFontSize(double __value) { this->tickLabelFontSize = __value; this->paramsChanged=true; - update_plot(); + replotPlot(); } void JKQTPCoordinateAxis::set_minorTickLabelFontSize(double __value) { this->minorTickLabelFontSize = __value; this->paramsChanged=true; - update_plot(); + replotPlot(); } void JKQTPCoordinateAxis::set_minorTickLabelFullNumber(bool __value) { this->minorTickLabelFullNumber = __value; this->paramsChanged=true; - update_plot(); + replotPlot(); } void JKQTPCoordinateAxis::set_minTicks(unsigned int __value) { this->minTicks = __value; this->paramsChanged=true; - update_plot(); + replotPlot(); } void JKQTPCoordinateAxis::set_minorTicks(unsigned int __value) { this->minorTicks = __value; this->paramsChanged=true; - update_plot(); + replotPlot(); } void JKQTPCoordinateAxis::set_minorTicks(int __value) { this->minorTicks = qMax(int(0), __value); this->paramsChanged=true; - update_plot(); + replotPlot(); } void JKQTPCoordinateAxis::set_tickOutsideLength(double __value) { this->tickOutsideLength = __value; this->paramsChanged=true; - update_plot(); + replotPlot(); } void JKQTPCoordinateAxis::set_minorTickOutsideLength(double __value) { this->minorTickOutsideLength = __value; this->paramsChanged=true; - update_plot(); + replotPlot(); } void JKQTPCoordinateAxis::set_tickInsideLength(double __value) { this->tickInsideLength = __value; this->paramsChanged=true; - update_plot(); + replotPlot(); } void JKQTPCoordinateAxis::set_minorTickInsideLength(double __value) { this->minorTickInsideLength = __value; this->paramsChanged=true; - update_plot(); + replotPlot(); } -void JKQTPCoordinateAxis::set_axisColor(QColor __value) { +void JKQTPCoordinateAxis::setAxisColor(QColor __value) { this->axisColor = __value; this->paramsChanged=true; - update_plot(); + replotPlot(); } -void JKQTPCoordinateAxis::set_showZeroAxis(bool __value) { +void JKQTPCoordinateAxis::setShowZeroAxis(bool __value) { this->showZeroAxis = __value; this->paramsChanged=true; - update_plot(); + replotPlot(); } void JKQTPCoordinateAxis::set_inverted(bool __value) { this->inverted = __value; this->paramsChanged=true; - update_plot(); + replotPlot(); } -void JKQTPCoordinateAxis::set_gridColor(QColor __value) { +void JKQTPCoordinateAxis::setGridColor(QColor __value) { this->gridColor = __value; this->paramsChanged=true; - update_plot(); + replotPlot(); } void JKQTPCoordinateAxis::set_minorGridColor(QColor __value) { this->minorGridColor = __value; this->paramsChanged=true; - update_plot(); + replotPlot(); } -void JKQTPCoordinateAxis::set_gridWidth(double __value) { +void JKQTPCoordinateAxis::setGridWidth(double __value) { this->gridWidth = __value; this->paramsChanged=true; - update_plot(); + replotPlot(); } -void JKQTPCoordinateAxis::set_gridStyle(Qt::PenStyle __value) { +void JKQTPCoordinateAxis::setGridStyle(Qt::PenStyle __value) { this->gridStyle = __value; this->paramsChanged=true; - update_plot(); + replotPlot(); } void JKQTPCoordinateAxis::set_minorGridWidth(double __value) { this->minorGridWidth = __value; this->paramsChanged=true; - update_plot(); + replotPlot(); } void JKQTPCoordinateAxis::set_minorGridStyle(Qt::PenStyle __value) { this->minorGridStyle = __value; this->paramsChanged=true; - update_plot(); + replotPlot(); } void JKQTPCoordinateAxis::set_drawMode1(JKQTPCADrawMode __value) { this->drawMode1 = __value; this->paramsChanged=true; - update_plot(); + replotPlot(); } void JKQTPCoordinateAxis::set_drawMode2(JKQTPCADrawMode __value) { this->drawMode2 = __value; this->paramsChanged=true; - update_plot(); + replotPlot(); } void JKQTPCoordinateAxis::set_minorTickWidth(double __value) { this->minorTickWidth = __value; this->paramsChanged=true; - update_plot(); + replotPlot(); } void JKQTPCoordinateAxis::set_tickWidth(double __value) { this->tickWidth = __value; this->paramsChanged=true; - update_plot(); + replotPlot(); } -void JKQTPCoordinateAxis::set_lineWidth(double __value) { +void JKQTPCoordinateAxis::setLineWidth(double __value) { this->lineWidth = __value; this->paramsChanged=true; - update_plot(); + replotPlot(); } -void JKQTPCoordinateAxis::set_lineWidthZeroAxis(double __value) { +void JKQTPCoordinateAxis::setLineWidthZeroAxis(double __value) { this->lineWidthZeroAxis = __value; this->paramsChanged=true; - update_plot(); + replotPlot(); } void JKQTPCoordinateAxis::set_tickLabelDistance(double __value) { this->tickLabelDistance = __value; this->paramsChanged=true; - update_plot(); + replotPlot(); } void JKQTPCoordinateAxis::set_labelDistance(double __value) { this->labelDistance = __value; this->paramsChanged=true; - update_plot(); + replotPlot(); } void JKQTPCoordinateAxis::set_labelDigits(int __value) { this->labelDigits = __value; this->paramsChanged=true; this->autoLabelDigits=false; - update_plot(); + replotPlot(); } void JKQTPCoordinateAxis::set_drawGrid(bool __value) { this->drawGrid = __value; this->paramsChanged=true; - update_plot(); + replotPlot(); } void JKQTPCoordinateAxis::set_drawMinorGrid(bool __value) { this->drawMinorGrid = __value; this->paramsChanged=true; - update_plot(); + replotPlot(); } void JKQTPCoordinateAxis::set_tickLabelAngle(double __value) { this->tickLabelAngle = __value; this->paramsChanged=true; - update_plot(); + replotPlot(); } @@ -1138,7 +1138,7 @@ void JKQTPCoordinateAxis::setAbsoluteRange(double amin, double amax) { setRange(axismin, axismax); /*paramsChanged=true; calcPlotScaling(); - update_plot();*/ + replotPlot();*/ } double JKQTPCoordinateAxis::getNextLabelDistance(double x) { @@ -1214,10 +1214,10 @@ QSizeF JKQTPCoordinateAxis::getMaxTickLabelSize(JKQTPEnhancedPainter& painter, d getNextLabel(x, label, true); QFont f; f.setFamily(tickLabelFont); - f.setPointSizeF(tickLabelFontSize*parent->get_fontSizeMultiplier()); + f.setPointSizeF(tickLabelFontSize*parent->getFontSizeMultiplier()); QFontMetricsF fm(f); - //get_parent_mathText()->set_fontSize(f.pointSizeF()); - //get_parent_mathText()->set_fontRoman(f.family()); + //get_parent_mathText()->setFontSize(f.pointSizeF()); + //get_parent_mathText()->setFontRoman(f.family()); bool first=true; int cnt=0; while (getNextLabel(x, label, first) && cnt<50) { @@ -1265,11 +1265,11 @@ JKQTPVerticalAxis::JKQTPVerticalAxis(JKQTBasePlotter* parent): } double JKQTPVerticalAxis::get_parent_plotwidth() const { - return parent->get_plotHeight(); + return parent->getPlotHeight(); } double JKQTPVerticalAxis::get_parent_plotoffset() const { - return parent->get_iplotBorderTop(); + return parent->getInternalPlotBorderTop(); } QSize JKQTPVerticalAxis::getSize1(JKQTPEnhancedPainter& painter) { @@ -1280,11 +1280,11 @@ QSize JKQTPVerticalAxis::getSize1(JKQTPEnhancedPainter& painter) { if (drawMode1==JKQTPCADMticksAndLabels) return QSize(parent->pt2px(painter, tickOutsideLength+tickLabelDistance)+tlwidth, get_parent_plotwidth()); // find out size of axis label - /*get_parent_mathText()->set_fontSize(labelFontSize*parent->get_fontSizeMultiplier()); - get_parent_mathText()->set_fontRoman(labelFont); + /*get_parent_mathText()->setFontSize(labelFontSize*parent->getFontSizeMultiplier()); + get_parent_mathText()->setFontRoman(labelFont); get_parent_mathText()->parse(axisLabel); double lwidth=get_parent_mathText()->getSize(painter).height();*/ - double lwidth=parent->getTextSizeSize(labelFont, labelFontSize*parent->get_fontSizeMultiplier(), axisLabel, painter).height(); + double lwidth=parent->getTextSizeSize(labelFont, labelFontSize*parent->getFontSizeMultiplier(), axisLabel, painter).height(); if (drawMode1==JKQTPCADMcomplete) return QSize(parent->pt2px(painter, tickOutsideLength+tickLabelDistance+labelDistance)+tlwidth+lwidth, get_parent_plotwidth()); return QSize(0,0); @@ -1298,11 +1298,11 @@ QSize JKQTPVerticalAxis::getSize2(JKQTPEnhancedPainter& painter) { if (drawMode2==JKQTPCADMticksAndLabels) return QSize(parent->pt2px(painter, tickOutsideLength+tickLabelDistance)+tlwidth, get_parent_plotwidth()); // find out size of axis label - /*get_parent_mathText()->set_fontSize(labelFontSize*parent->get_fontSizeMultiplier()); - get_parent_mathText()->set_fontRoman(labelFont); + /*get_parent_mathText()->setFontSize(labelFontSize*parent->getFontSizeMultiplier()); + get_parent_mathText()->setFontRoman(labelFont); get_parent_mathText()->parse(axisLabel); double lwidth=get_parent_mathText()->getSize(painter).height();*/ - double lwidth=parent->getTextSizeSize(labelFont, labelFontSize*parent->get_fontSizeMultiplier(), axisLabel, painter).height(); + double lwidth=parent->getTextSizeSize(labelFont, labelFontSize*parent->getFontSizeMultiplier(), axisLabel, painter).height(); if (drawMode2==JKQTPCADMcomplete) return QSize(parent->pt2px(painter, tickOutsideLength+tickLabelDistance+labelDistance)+tlwidth+lwidth, get_parent_plotwidth()); return QSize(0,0); @@ -1320,7 +1320,7 @@ double JKQTPVerticalAxis::get_parent_otheraxis_width() const { bool JKQTPVerticalAxis::get_parent_otheraxis_inverted() const { - return parent->get_xAxis()->get_inverted(); + return parent->getXAxis()->get_inverted(); } void JKQTPVerticalAxis::drawGrids(JKQTPEnhancedPainter& painter) { @@ -1328,11 +1328,11 @@ void JKQTPVerticalAxis::drawGrids(JKQTPEnhancedPainter& painter) { painter.save(); QPen pg=painter.pen(); pg.setColor(gridColor); - pg.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, gridWidth*parent->get_lineWidthMultiplier()))); + pg.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, gridWidth*parent->getLineWidthMultiplier()))); pg.setStyle(gridStyle); QPen pmg=painter.pen(); pmg.setColor(minorGridColor); - pmg.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH,parent->pt2px(painter, minorGridWidth*parent->get_lineWidthMultiplier()))); + pmg.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH,parent->pt2px(painter, minorGridWidth*parent->getLineWidthMultiplier()))); pmg.setStyle(minorGridStyle); //double top=x2p(axismax); //double bottom=x2p(axismin); @@ -1399,9 +1399,9 @@ void JKQTPVerticalAxis::drawGrids(JKQTPEnhancedPainter& painter) { void JKQTPVerticalAxis::drawTickLabel1(JKQTPEnhancedPainter &painter, double xx, double yy, const QString& label, double fontSize) { - get_parent_mathText()->set_fontSize(fontSize*parent->get_fontSizeMultiplier()); - get_parent_mathText()->set_fontRoman(tickLabelFont); - get_parent_mathText()->set_fontColor(axisColor); + get_parent_mathText()->setFontSize(fontSize*parent->getFontSizeMultiplier()); + get_parent_mathText()->setFontRoman(tickLabelFont); + get_parent_mathText()->setFontColor(axisColor); get_parent_mathText()->parse(label); double width, ascent, descent, strikeoutPos; @@ -1439,9 +1439,9 @@ void JKQTPVerticalAxis::drawTickLabel1(JKQTPEnhancedPainter &painter, double xx, void JKQTPVerticalAxis::drawTickLabel2(JKQTPEnhancedPainter &painter, double xx, double yy, const QString &label, double fontSize) { - get_parent_mathText()->set_fontSize(fontSize*parent->get_fontSizeMultiplier()); - get_parent_mathText()->set_fontRoman(tickLabelFont); - get_parent_mathText()->set_fontColor(axisColor); + get_parent_mathText()->setFontSize(fontSize*parent->getFontSizeMultiplier()); + get_parent_mathText()->setFontRoman(tickLabelFont); + get_parent_mathText()->setFontColor(axisColor); get_parent_mathText()->parse(label); double width, ascent, descent, strikeoutPos; @@ -1517,25 +1517,25 @@ void JKQTPVerticalAxis::drawAxes(JKQTPEnhancedPainter& painter) { painter.save(); QPen pmain=painter.pen(); pmain.setColor(axisColor); - pmain.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, lineWidth*parent->get_lineWidthMultiplier()))); + pmain.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, lineWidth*parent->getLineWidthMultiplier()))); pmain.setStyle(Qt::SolidLine); QPen ptick=pmain; - ptick.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, tickWidth*parent->get_lineWidthMultiplier()))); + ptick.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, tickWidth*parent->getLineWidthMultiplier()))); QPen pmtick=ptick; - pmtick.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, minorTickWidth*parent->get_lineWidthMultiplier()))); + pmtick.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, minorTickWidth*parent->getLineWidthMultiplier()))); - get_parent_mathText()->set_fontSize(tickLabelFontSize*parent->get_fontSizeMultiplier()); - get_parent_mathText()->set_fontRoman(tickLabelFont); - get_parent_mathText()->set_fontColor(axisColor); + get_parent_mathText()->setFontSize(tickLabelFontSize*parent->getFontSizeMultiplier()); + get_parent_mathText()->setFontRoman(tickLabelFont); + get_parent_mathText()->setFontColor(axisColor); painter.setPen(pmain); // plot thick axis at y==0 if (showZeroAxis && (0>axismin) && (0pt2px(painter, lineWidthZeroAxis*parent->get_lineWidthMultiplier()))); + pmain1.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, lineWidthZeroAxis*parent->getLineWidthMultiplier()))); painter.setPen(pmain1); QLineF l(left-parent->pt2px(painter, tickOutsideLength), x2p(0), right+parent->pt2px(painter, tickOutsideLength), x2p(0)); painter.drawLine(l); @@ -1668,8 +1668,8 @@ void JKQTPVerticalAxis::drawAxes(JKQTPEnhancedPainter& painter) { // plot axis label if (!axisLabel.isEmpty() && (drawMode1==JKQTPCADMcomplete)) { - get_parent_mathText()->set_fontSize(labelFontSize*parent->get_fontSizeMultiplier()); - get_parent_mathText()->set_fontRoman(labelFont); + get_parent_mathText()->setFontSize(labelFontSize*parent->getFontSizeMultiplier()); + get_parent_mathText()->setFontRoman(labelFont); get_parent_mathText()->parse(axisLabel); double width, ascent, descent, strikeoutPos; get_parent_mathText()->getSizeDetail(painter, width, ascent, descent, strikeoutPos); @@ -1697,8 +1697,8 @@ void JKQTPVerticalAxis::drawAxes(JKQTPEnhancedPainter& painter) { painter.restore(); } if (!axisLabel.isEmpty() && (drawMode2==JKQTPCADMcomplete)) { - get_parent_mathText()->set_fontSize(labelFontSize*parent->get_fontSizeMultiplier()); - get_parent_mathText()->set_fontRoman(labelFont); + get_parent_mathText()->setFontSize(labelFontSize*parent->getFontSizeMultiplier()); + get_parent_mathText()->setFontRoman(labelFont); get_parent_mathText()->parse(axisLabel); @@ -1745,34 +1745,34 @@ JKQTPVerticalIndependentAxis::JKQTPVerticalIndependentAxis(double axisOffset, do this->otherAxisInverted=false; } -void JKQTPVerticalIndependentAxis::set_axisOffset(double __value) { +void JKQTPVerticalIndependentAxis::setAxisOffset(double __value) { this->axisOffset = __value; this->paramsChanged=true; - update_plot(); + replotPlot(); } -void JKQTPVerticalIndependentAxis::set_axisWidth(double __value) { +void JKQTPVerticalIndependentAxis::setAxisWidth(double __value) { this->axisWidth = __value; this->paramsChanged=true; - update_plot(); + replotPlot(); } void JKQTPVerticalIndependentAxis::set_otherAxisOffset(double __value) { this->otherAxisOffset = __value; this->paramsChanged=true; - update_plot(); + replotPlot(); } void JKQTPVerticalIndependentAxis::set_otherAxisWidth(double __value) { this->otherAxisWidth = __value; this->paramsChanged=true; - update_plot(); + replotPlot(); } void JKQTPVerticalIndependentAxis::set_otherAxisInverted(bool __value) { this->otherAxisInverted = __value; this->paramsChanged=true; - update_plot(); + replotPlot(); } double JKQTPVerticalIndependentAxis::get_parent_plotwidth() const { return axisWidth; } @@ -1802,11 +1802,11 @@ JKQTPHorizontalAxis::JKQTPHorizontalAxis(JKQTBasePlotter* parent): } double JKQTPHorizontalAxis::get_parent_plotwidth() const { - return parent->get_plotWidth(); + return parent->getPlotWidth(); } double JKQTPHorizontalAxis::get_parent_plotoffset() const { - return parent->get_iplotBorderLeft(); + return parent->getInternalPlotBorderLeft(); } QSize JKQTPHorizontalAxis::getSize1(JKQTPEnhancedPainter& painter) { @@ -1817,11 +1817,11 @@ QSize JKQTPHorizontalAxis::getSize1(JKQTPEnhancedPainter& painter) { if (drawMode1==JKQTPCADMticksAndLabels) return QSize(get_parent_plotwidth(),parent->pt2px(painter, tickOutsideLength+tickLabelDistance)+tlwidth); // find out size of axis label - /*get_parent_mathText()->set_fontSize(labelFontSize*parent->get_fontSizeMultiplier()); - get_parent_mathText()->set_fontRoman(labelFont); + /*get_parent_mathText()->setFontSize(labelFontSize*parent->getFontSizeMultiplier()); + get_parent_mathText()->setFontRoman(labelFont); get_parent_mathText()->parse(axisLabel); double lwidth=get_parent_mathText()->getSize(painter).height();*/ - double lwidth=parent->getTextSizeSize(labelFont, labelFontSize*parent->get_fontSizeMultiplier(), axisLabel, painter).height(); + double lwidth=parent->getTextSizeSize(labelFont, labelFontSize*parent->getFontSizeMultiplier(), axisLabel, painter).height(); if (drawMode1==JKQTPCADMcomplete) return QSize(get_parent_plotwidth(),parent->pt2px(painter, tickOutsideLength+tickLabelDistance+labelDistance)+tlwidth+lwidth); @@ -1836,11 +1836,11 @@ QSize JKQTPHorizontalAxis::getSize2(JKQTPEnhancedPainter& painter) { if (drawMode2==JKQTPCADMticksAndLabels) return QSize(get_parent_plotwidth(),parent->pt2px(painter, tickOutsideLength+tickLabelDistance)+tlwidth); // find out size of axis label - /*get_parent_mathText()->set_fontSize(labelFontSize*parent->get_fontSizeMultiplier()); - get_parent_mathText()->set_fontRoman(labelFont); + /*get_parent_mathText()->setFontSize(labelFontSize*parent->getFontSizeMultiplier()); + get_parent_mathText()->setFontRoman(labelFont); get_parent_mathText()->parse(axisLabel); double lwidth=get_parent_mathText()->getSize(painter).height();*/ - double lwidth=parent->getTextSizeSize(labelFont, labelFontSize*parent->get_fontSizeMultiplier(), axisLabel, painter).height(); + double lwidth=parent->getTextSizeSize(labelFont, labelFontSize*parent->getFontSizeMultiplier(), axisLabel, painter).height(); if (drawMode2==JKQTPCADMcomplete) return QSize(get_parent_plotwidth(),parent->pt2px(painter, tickOutsideLength+tickLabelDistance+labelDistance)+tlwidth+lwidth); return QSize(0,0); @@ -1858,7 +1858,7 @@ double JKQTPHorizontalAxis::get_parent_otheraxis_width() const { bool JKQTPHorizontalAxis::get_parent_otheraxis_inverted() const { - return parent->get_yAxis()->get_inverted(); + return parent->getYAxis()->get_inverted(); } void JKQTPHorizontalAxis::drawGrids(JKQTPEnhancedPainter& painter) { @@ -1876,11 +1876,11 @@ void JKQTPHorizontalAxis::drawGrids(JKQTPEnhancedPainter& painter) { } QPen pg=painter.pen(); pg.setColor(gridColor); - pg.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, gridWidth*parent->get_fontSizeMultiplier()))); + pg.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, gridWidth*parent->getFontSizeMultiplier()))); pg.setStyle(gridStyle); QPen pmg=painter.pen(); pmg.setColor(minorGridColor); - pmg.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, minorGridWidth*parent->get_lineWidthMultiplier()))); + pmg.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, minorGridWidth*parent->getLineWidthMultiplier()))); pmg.setStyle(minorGridStyle); double x=tickStart; @@ -1927,9 +1927,9 @@ void JKQTPHorizontalAxis::drawGrids(JKQTPEnhancedPainter& painter) { void JKQTPHorizontalAxis::drawTickLabel1(JKQTPEnhancedPainter &painter, double xx, double yy, const QString &label, double fontSize, double ascentMax, double /*descentMax*/) { - get_parent_mathText()->set_fontSize(fontSize*parent->get_fontSizeMultiplier()); - get_parent_mathText()->set_fontRoman(tickLabelFont); - get_parent_mathText()->set_fontColor(axisColor); + get_parent_mathText()->setFontSize(fontSize*parent->getFontSizeMultiplier()); + get_parent_mathText()->setFontRoman(tickLabelFont); + get_parent_mathText()->setFontColor(axisColor); get_parent_mathText()->parse(label); @@ -1957,9 +1957,9 @@ void JKQTPHorizontalAxis::drawTickLabel1(JKQTPEnhancedPainter &painter, double x void JKQTPHorizontalAxis::drawTickLabel2(JKQTPEnhancedPainter &painter, double xx, double yy, const QString &label, double fontSize, double /*ascentMax*/, double descentMax) { - get_parent_mathText()->set_fontSize(fontSize*parent->get_fontSizeMultiplier()); - get_parent_mathText()->set_fontRoman(tickLabelFont); - get_parent_mathText()->set_fontColor(axisColor); + get_parent_mathText()->setFontSize(fontSize*parent->getFontSizeMultiplier()); + get_parent_mathText()->setFontRoman(tickLabelFont); + get_parent_mathText()->setFontColor(axisColor); get_parent_mathText()->parse(label); @@ -2025,18 +2025,18 @@ void JKQTPHorizontalAxis::drawAxes(JKQTPEnhancedPainter& painter) { QPen pmain=painter.pen(); pmain.setColor(axisColor); - pmain.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, lineWidth*parent->get_lineWidthMultiplier()))); + pmain.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, lineWidth*parent->getLineWidthMultiplier()))); pmain.setStyle(Qt::SolidLine); QPen ptick=pmain; - ptick.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, tickWidth*parent->get_lineWidthMultiplier()))); + ptick.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, tickWidth*parent->getLineWidthMultiplier()))); QPen pmtick=ptick; - pmtick.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, minorTickWidth*parent->get_lineWidthMultiplier()))); + pmtick.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, minorTickWidth*parent->getLineWidthMultiplier()))); - get_parent_mathText()->set_fontSize(tickLabelFontSize*parent->get_fontSizeMultiplier()); - get_parent_mathText()->set_fontRoman(tickLabelFont); - get_parent_mathText()->set_fontColor(axisColor); + get_parent_mathText()->setFontSize(tickLabelFontSize*parent->getFontSizeMultiplier()); + get_parent_mathText()->setFontRoman(tickLabelFont); + get_parent_mathText()->setFontColor(axisColor); painter.setPen(pmain); @@ -2115,7 +2115,7 @@ void JKQTPHorizontalAxis::drawAxes(JKQTPEnhancedPainter& painter) { painter.save(); QFont f; f.setFamily(tickLabelFont); - f.setPointSizeF(minorTickLabelFontSize*parent->get_fontSizeMultiplier()); + f.setPointSizeF(minorTickLabelFontSize*parent->getFontSizeMultiplier()); painter.setFont(f); painter.setPen(axisColor); QFontMetrics fm(f); @@ -2170,7 +2170,7 @@ void JKQTPHorizontalAxis::drawAxes(JKQTPEnhancedPainter& painter) { painter.save(); QFont f; f.setFamily(tickLabelFont); - f.setPointSizeF(minorTickLabelFontSize*parent->get_fontSizeMultiplier()); + f.setPointSizeF(minorTickLabelFontSize*parent->getFontSizeMultiplier()); painter.setFont(f); painter.setPen(axisColor); QFontMetrics fm(f); @@ -2247,8 +2247,8 @@ void JKQTPHorizontalAxis::drawAxes(JKQTPEnhancedPainter& painter) { // plot axis label if (!axisLabel.isEmpty() && (drawMode1==JKQTPCADMcomplete)) { - get_parent_mathText()->set_fontSize(labelFontSize*parent->get_fontSizeMultiplier()); - get_parent_mathText()->set_fontRoman(labelFont); + get_parent_mathText()->setFontSize(labelFontSize*parent->getFontSizeMultiplier()); + get_parent_mathText()->setFontRoman(labelFont); get_parent_mathText()->parse(axisLabel); double width, ascent, descent, strikeoutPos; get_parent_mathText()->getSizeDetail(painter, width, ascent, descent, strikeoutPos); @@ -2275,8 +2275,8 @@ void JKQTPHorizontalAxis::drawAxes(JKQTPEnhancedPainter& painter) { painter.restore(); } if (!axisLabel.isEmpty() && (drawMode2==JKQTPCADMcomplete)) { - get_parent_mathText()->set_fontSize(labelFontSize*parent->get_fontSizeMultiplier()); - get_parent_mathText()->set_fontRoman(labelFont); + get_parent_mathText()->setFontSize(labelFontSize*parent->getFontSizeMultiplier()); + get_parent_mathText()->setFontRoman(labelFont); get_parent_mathText()->parse(axisLabel); @@ -2327,34 +2327,34 @@ JKQTPHorizontalIndependentAxis::JKQTPHorizontalIndependentAxis(double axisOffset this->otherAxisInverted=false; } -void JKQTPHorizontalIndependentAxis::set_axisOffset(double __value) { +void JKQTPHorizontalIndependentAxis::setAxisOffset(double __value) { this->axisOffset = __value; this->paramsChanged=true; - update_plot(); + replotPlot(); } -void JKQTPHorizontalIndependentAxis::set_axisWidth(double __value) { +void JKQTPHorizontalIndependentAxis::setAxisWidth(double __value) { this->axisWidth = __value; this->paramsChanged=true; - update_plot(); + replotPlot(); } void JKQTPHorizontalIndependentAxis::set_otherAxisOffset(double __value) { this->otherAxisOffset = __value; this->paramsChanged=true; - update_plot(); + replotPlot(); } void JKQTPHorizontalIndependentAxis::set_otherAxisWidth(double __value) { this->otherAxisWidth = __value; this->paramsChanged=true; - update_plot(); + replotPlot(); } void JKQTPHorizontalIndependentAxis::set_otherAxisInverted(bool __value) { this->otherAxisInverted = __value; this->paramsChanged=true; - update_plot(); + replotPlot(); } double JKQTPHorizontalIndependentAxis::get_parent_plotwidth() const { return axisWidth; } diff --git a/lib/jkqtplotter/jkqtpbaseelements.h b/lib/jkqtplotter/jkqtpbaseelements.h index 75610f66f3..b79bd72326 100644 --- a/lib/jkqtplotter/jkqtpbaseelements.h +++ b/lib/jkqtplotter/jkqtpbaseelements.h @@ -38,7 +38,7 @@ // forward declarations class JKQTBasePlotter; -/*! \brief this virtual class is the base for any type of coordinate axis, to be drawn by JKQTplotterBase. +/*! \brief this virtual class is the base for any type of coordinate axis, to be drawn by JKQTBasePlotter. \ingroup jkqtpbaseplotter_elements This class implements all the functionality needed for a coordinate axis: @@ -234,13 +234,13 @@ class LIB_EXPORT JKQTPCoordinateAxis: public QObject { /*! \brief returns the property logAxisBase. \details Description of the parameter logAxisBase is:
\copydoc logAxisBase
. \see logAxisBase for more information */ inline double get_logAxisBase() const { return this->logAxisBase; } /*! \brief returns the property userTickSpacing. \details Description of the parameter userTickSpacing is:
\copydoc userTickSpacing
. \see userTickSpacing for more information */ - inline double get_userTickSpacing() const { return this->userTickSpacing; } + inline double getUserTickSpacing() const { return this->userTickSpacing; } /*! \brief returns the property userLogTickSpacing. \details Description of the parameter userLogTickSpacing is:
\copydoc userLogTickSpacing
. \see userLogTickSpacing for more information */ - inline double get_userLogTickSpacing() const { return this->userLogTickSpacing; } + inline double getUserLogTickSpacing() const { return this->userLogTickSpacing; } /*! \brief returns the property labelType. \details Description of the parameter labelType is:
\copydoc labelType
. \see labelType for more information */ inline JKQTPCALabelType get_labelType() const { return this->labelType; } /*! \brief returns the property axisLabel. \details Description of the parameter axisLabel is:
\copydoc axisLabel
. \see axisLabel for more information */ - inline QString get_axisLabel() const { return this->axisLabel; } + inline QString getAxisLabel() const { return this->axisLabel; } /*! \brief returns the property labelPosition. \details Description of the parameter labelPosition is:
\copydoc labelPosition
. \see labelPosition for more information */ inline JKQTPLabelPosition get_labelPosition() const { return this->labelPosition; } /*! \brief returns the property labelFont. \details Description of the parameter labelFont is:
\copydoc labelFont
. \see labelFont for more information */ @@ -266,17 +266,17 @@ class LIB_EXPORT JKQTPCoordinateAxis: public QObject { /*! \brief returns the property minorTickOutsideLength. \details Description of the parameter minorTickOutsideLength is:
\copydoc minorTickOutsideLength
. \see minorTickOutsideLength for more information */ inline double get_minorTickOutsideLength() const { return this->minorTickOutsideLength; } /*! \brief returns the property axisColor. \details Description of the parameter axisColor is:
\copydoc axisColor
. \see axisColor for more information */ - inline QColor get_axisColor() const { return this->axisColor; } + inline QColor getAxisColor() const { return this->axisColor; } /*! \brief returns the property showZeroAxis. \details Description of the parameter showZeroAxis is:
\copydoc showZeroAxis
. \see showZeroAxis for more information */ - inline bool get_showZeroAxis() const { return this->showZeroAxis; } + inline bool getShowZeroAxis() const { return this->showZeroAxis; } /*! \brief returns the property gridColor. \details Description of the parameter gridColor is:
\copydoc gridColor
. \see gridColor for more information */ - inline QColor get_gridColor() const { return this->gridColor; } + inline QColor getGridColor() const { return this->gridColor; } /*! \brief returns the property minorGridColor. \details Description of the parameter minorGridColor is:
\copydoc minorGridColor
. \see minorGridColor for more information */ inline QColor get_minorGridColor() const { return this->minorGridColor; } /*! \brief returns the property gridWidth. \details Description of the parameter gridWidth is:
\copydoc gridWidth
. \see gridWidth for more information */ - inline double get_gridWidth() const { return this->gridWidth; } + inline double getGridWidth() const { return this->gridWidth; } /*! \brief returns the property gridStyle. \details Description of the parameter gridStyle is:
\copydoc gridStyle
. \see gridStyle for more information */ - inline Qt::PenStyle get_gridStyle() const { return this->gridStyle; } + inline Qt::PenStyle getGridStyle() const { return this->gridStyle; } /*! \brief returns the property minorGridWidth. \details Description of the parameter minorGridWidth is:
\copydoc minorGridWidth
. \see minorGridWidth for more information */ inline double get_minorGridWidth() const { return this->minorGridWidth; } /*! \brief returns the property minorGridStyle. \details Description of the parameter minorGridStyle is:
\copydoc minorGridStyle
. \see minorGridStyle for more information */ @@ -299,9 +299,9 @@ class LIB_EXPORT JKQTPCoordinateAxis: public QObject { /*! \brief returns the property tickWidth. \details Description of the parameter tickWidth is:
\copydoc tickWidth
. \see tickWidth for more information */ inline double get_tickWidth() const { return this->tickWidth; } /*! \brief returns the property lineWidth. \details Description of the parameter lineWidth is:
\copydoc lineWidth
. \see lineWidth for more information */ - inline double get_lineWidth() const { return this->lineWidth; } + inline double getLineWidth() const { return this->lineWidth; } /*! \brief returns the property lineWidthZeroAxis. \details Description of the parameter lineWidthZeroAxis is:
\copydoc lineWidthZeroAxis
. \see lineWidthZeroAxis for more information */ - inline double get_lineWidthZeroAxis() const { return this->lineWidthZeroAxis; } + inline double getLineWidthZeroAxis() const { return this->lineWidthZeroAxis; } /*! \brief returns the property tickLabelDistance. \details Description of the parameter tickLabelDistance is:
\copydoc tickLabelDistance
. \see tickLabelDistance for more information */ inline double get_tickLabelDistance() const { return this->tickLabelDistance; } /*! \brief returns the property labelDistance. \details Description of the parameter labelDistance is:
\copydoc labelDistance
. \see labelDistance for more information */ @@ -379,7 +379,7 @@ class LIB_EXPORT JKQTPCoordinateAxis: public QObject { /** \brief sets the property axisMinWidth to the specified \a __value. * \details Description of the parameter tickSpacing is:
\copydoc axisMinWidth
* \see axisMinWidth for more information */ - virtual void set_axisMinWidth(double __value); + virtual void setAxisMinWidth(double __value); /** \brief sets the property autoAxisSpacing to the specified \a __value. * \details Description of the parameter autoAxisSpacing is:
\copydoc autoAxisSpacing
@@ -404,12 +404,12 @@ class LIB_EXPORT JKQTPCoordinateAxis: public QObject { /** \brief sets the property userTickSpacing to the specified \a __value. * \details Description of the parameter userTickSpacing is:
\copydoc userTickSpacing
* \see userTickSpacing for more information */ - virtual void set_userTickSpacing (double __value); + virtual void setUserTickSpacing (double __value); /** \brief sets the property userLogTickSpacing to the specified \a __value. * \details Description of the parameter userLogTickSpacing is:
\copydoc userLogTickSpacing
* \see userLogTickSpacing for more information */ - virtual void set_userLogTickSpacing (double __value); + virtual void setUserLogTickSpacing (double __value); /** \brief sets the property labelType to the specified \a __value. * \details Description of the parameter labelType is:
\copydoc labelType
@@ -428,7 +428,7 @@ class LIB_EXPORT JKQTPCoordinateAxis: public QObject { /** \brief sets the property axisLabel to the specified \a __value. * \details Description of the parameter axisLabel is:
\copydoc axisLabel
* \see axisLabel for more information */ - virtual void set_axisLabel (QString __value); + virtual void setAxisLabel (QString __value); /** \brief sets the property labelPosition to the specified \a __value. * \details Description of the parameter labelPosition is:
\copydoc labelPosition
*/ @@ -504,11 +504,11 @@ class LIB_EXPORT JKQTPCoordinateAxis: public QObject { /** \brief sets the property axisColor to the specified \a __value. * \details Description of the parameter axisColor is:
\copydoc axisColor
*/ - virtual void set_axisColor (QColor __value); + virtual void setAxisColor (QColor __value); /** \brief sets the property showZeroAxis to the specified \a __value. * \details Description of the parameter showZeroAxis is:
\copydoc showZeroAxis
*/ - virtual void set_showZeroAxis(bool __value); + virtual void setShowZeroAxis(bool __value); /** \brief sets the property inverted to the specified \a __value. * \details Description of the parameter inverted is:
\copydoc inverted
*/ @@ -516,7 +516,7 @@ class LIB_EXPORT JKQTPCoordinateAxis: public QObject { /** \brief sets the property gridColor to the specified \a __value. * \details Description of the parameter gridColor is:
\copydoc gridColor
*/ - virtual void set_gridColor(QColor __value); + virtual void setGridColor(QColor __value); /** \brief sets the property minorGridColor to the specified \a __value. * \details Description of the parameter minorGridColor is:
\copydoc minorGridColor
*/ @@ -524,11 +524,11 @@ class LIB_EXPORT JKQTPCoordinateAxis: public QObject { /** \brief sets the property gridWidth to the specified \a __value. * \details Description of the parameter gridWidth is:
\copydoc gridWidth
*/ - virtual void set_gridWidth (double __value); + virtual void setGridWidth (double __value); /** \brief sets the property gridStyle to the specified \a __value. * \details Description of the parameter gridStyle is:
\copydoc gridStyle
*/ - virtual void set_gridStyle(Qt::PenStyle __value); + virtual void setGridStyle(Qt::PenStyle __value); /** \brief sets the property minorGridWidth to the specified \a __value. * \details Description of the parameter minorGridWidth is:
\copydoc minorGridWidth
*/ @@ -557,11 +557,11 @@ class LIB_EXPORT JKQTPCoordinateAxis: public QObject { /** \brief sets the property lineWidth to the specified \a __value. * \details Description of the parameter lineWidth is:
\copydoc lineWidth
*/ - virtual void set_lineWidth (double __value); + virtual void setLineWidth (double __value); /** \brief sets the property lineWidthZeroAxis to the specified \a __value. * \details Description of the parameter lineWidthZeroAxis is:
\copydoc lineWidthZeroAxis
*/ - virtual void set_lineWidthZeroAxis (double __value); + virtual void setLineWidthZeroAxis (double __value); /** \brief sets the property tickLabelDistance to the specified \a __value. * \details Description of the parameter tickLabelDistance is:
\copydoc tickLabelDistance
*/ @@ -592,8 +592,8 @@ class LIB_EXPORT JKQTPCoordinateAxis: public QObject { bool paramsChanged; bool doUpdateScaling; - /** \brief simply calls the update_plot method of the parent plotter class */ - void update_plot(); + /** \brief simply calls the replotPlot method of the parent plotter class */ + void replotPlot(); /** \brief a list of tick labels. * * If this list contains items, this class will NOT plot a standard x-axis, @@ -957,9 +957,9 @@ class LIB_EXPORT JKQTPVerticalIndependentAxis: public JKQTPVerticalAxis { /** \brief class constructor */ JKQTPVerticalIndependentAxis(double axisOffset, double axisWidth, double otherAxisOffset, double otherAxisWidth, JKQTBasePlotter* parent); /** \brief set the axis offset */ - virtual void set_axisOffset(double __value) ; + virtual void setAxisOffset(double __value) ; /** \brief set the axis width */ - virtual void set_axisWidth(double __value) ; + virtual void setAxisWidth(double __value) ; /** \brief set the other axis offset */ virtual void set_otherAxisOffset(double __value) ; /** \brief set the other axis width */ @@ -1039,9 +1039,9 @@ class LIB_EXPORT JKQTPHorizontalIndependentAxis: public JKQTPHorizontalAxis { /** \brief class constructor */ JKQTPHorizontalIndependentAxis(double axisOffset, double axisWidth, double otherAxisOffset, double otherAxisWidth, JKQTBasePlotter* parent); /** \brief se the axis offset */ - virtual void set_axisOffset(double __value); + virtual void setAxisOffset(double __value); /** \brief se the axis width */ - virtual void set_axisWidth(double __value); + virtual void setAxisWidth(double __value); /** \brief set the other axis offset */ virtual void set_otherAxisOffset(double __value); /** \brief set the other axis width */ diff --git a/lib/jkqtplotter/jkqtpbaseplotter.cpp b/lib/jkqtplotter/jkqtpbaseplotter.cpp index 485568d282..842ae63acb 100644 --- a/lib/jkqtplotter/jkqtpbaseplotter.cpp +++ b/lib/jkqtplotter/jkqtpbaseplotter.cpp @@ -60,8 +60,8 @@ static QString globalUserSettigsFilename=""; static QString globalUserSettigsPrefix=""; -static QList jkqtpPaintDeviceAdapters; -static QList jkqtpSaveDataAdapters; +static QList jkqtpPaintDeviceAdapters; +static QList jkqtpSaveDataAdapters; void initJKQTBasePlotterResources() @@ -81,17 +81,17 @@ void JKQTBasePlotter::setDefaultJKQTBasePrinterUserSettings(QString userSettigsF globalUserSettigsPrefix=userSettigsPrefix; } -void JKQTBasePlotter::registerPaintDeviceAdapter(JKQTBasePlotter::JKQTPPaintDeviceAdapter *adapter) +void JKQTBasePlotter::registerPaintDeviceAdapter(JKQTPPaintDeviceAdapter *adapter) { jkqtpPaintDeviceAdapters.append(adapter); } -void JKQTBasePlotter::deregisterPaintDeviceAdapter(JKQTBasePlotter::JKQTPPaintDeviceAdapter *adapter) +void JKQTBasePlotter::deregisterPaintDeviceAdapter(JKQTPPaintDeviceAdapter *adapter) { if (jkqtpPaintDeviceAdapters.contains(adapter)) jkqtpPaintDeviceAdapters.removeAll(adapter); } -bool JKQTBasePlotter::registerSaveDataAdapter(JKQTBasePlotter::JKQTPSaveDataAdapter *adapter) +bool JKQTBasePlotter::registerSaveDataAdapter(JKQTPSaveDataAdapter *adapter) { if (adapter){ QString format=adapter->getFilter(); @@ -106,7 +106,7 @@ bool JKQTBasePlotter::registerSaveDataAdapter(JKQTBasePlotter::JKQTPSaveDataAdap return false; } -bool JKQTBasePlotter::deregisterSaveDataAdapter(JKQTBasePlotter::JKQTPSaveDataAdapter *adapter) +bool JKQTBasePlotter::deregisterSaveDataAdapter(JKQTPSaveDataAdapter *adapter) { if (jkqtpSaveDataAdapters.contains(adapter)) jkqtpSaveDataAdapters.removeAll(adapter); return true; @@ -122,8 +122,8 @@ JKQTBasePlotter::textSizeData JKQTBasePlotter::getTextSizeDetail(const QString & JKQTBasePlotter::textSizeKey dh(fontName, fontSize, text, painter.device()); if (tbrh.contains(dh)) return tbrh[dh]; JKQTBasePlotter::textSizeData d; - mathText.set_fontRoman(fontName); - mathText.set_fontSize(fontSize); + mathText.setFontRoman(fontName); + mathText.setFontSize(fontSize); mathText.parse(text); mathText.getSizeDetail(painter, d.width, d.ascent, d.descent, d.strikeoutPos); tbrh[dh]=d; @@ -162,7 +162,7 @@ QSizeF JKQTBasePlotter::getTextSizeSize(const QString &fontName, double fontSize #undef JKQTBP_DEBUGTIMING /************************************************************************************************************************** - * JKQTPlotterBase + * JKQTBasePlotter **************************************************************************************************************************/ JKQTBasePlotter::JKQTBasePlotter(bool datastore_internal, QObject* parent, JKQTPDatastore* datast): QObject(parent), m_plotsModel(nullptr), xAxis(nullptr), yAxis(nullptr) @@ -746,7 +746,7 @@ void JKQTBasePlotter::calcPlotScaling(JKQTPEnhancedPainter& painter){ if (emitSignals) emit beforePlotScalingRecalculate(); - //qDebug()<<"start JKQTPlotterBase::calcPlotScaling"; + //qDebug()<<"start JKQTBasePlotter::calcPlotScaling"; // if the key is plotted outside , then we have to add place for it (i.e. change the plotBorders iplotBorderBottom=plotBorderBottom; iplotBorderLeft=plotBorderLeft; @@ -757,8 +757,8 @@ void JKQTBasePlotter::calcPlotScaling(JKQTPEnhancedPainter& painter){ if (!plotLabel.isEmpty()) { /*JKQTMathText mt; - mt.set_fontSize(plotLabelFontSize*fontSizeMultiplier); - mt.set_fontRoman(plotLabelFontname); + mt.setFontSize(plotLabelFontSize*fontSizeMultiplier); + mt.setFontRoman(plotLabelFontname); #ifdef USE_XITS_FONTS mt.useXITS(); #endif @@ -848,7 +848,7 @@ void JKQTBasePlotter::calcPlotScaling(JKQTPEnhancedPainter& painter){ } } - //qDebug()<<" end JKQTPlotterBase::calcPlotScaling"; + //qDebug()<<" end JKQTBasePlotter::calcPlotScaling"; // synchronize to a master-plotter @@ -949,28 +949,28 @@ void JKQTBasePlotter::plotSystemGrid(JKQTPEnhancedPainter& painter) { #ifdef JKQTBP_AUTOTIMER JKQTPAutoOutputTimer jkaaot("JKQTBasePlotter::plotSystemGrid"); #endif - //qDebug()<<"start JKQTPlotterBase::plotSystemGrid"; + //qDebug()<<"start JKQTBasePlotter::plotSystemGrid"; xAxis->drawGrids(painter); yAxis->drawGrids(painter); - //qDebug()<<" end JKQTPlotterBase::plotSystemGrid"; + //qDebug()<<" end JKQTBasePlotter::plotSystemGrid"; } void JKQTBasePlotter::plotSystemXAxis(JKQTPEnhancedPainter& painter) { #ifdef JKQTBP_AUTOTIMER JKQTPAutoOutputTimer jkaaot("JKQTBasePlotter::plotSystemXAxis"); #endif - //qDebug()<<"start JKQTPlotterBase::plotSystemXAxis"; + //qDebug()<<"start JKQTBasePlotter::plotSystemXAxis"; xAxis->drawAxes(painter); - //qDebug()<<" end JKQTPlotterBase::plotSystemXAxis"; + //qDebug()<<" end JKQTBasePlotter::plotSystemXAxis"; } void JKQTBasePlotter::plotSystemYAxis(JKQTPEnhancedPainter& painter) { #ifdef JKQTBP_AUTOTIMER JKQTPAutoOutputTimer jkaaot("JKQTBasePlotter::plotSystemYAxis"); #endif - //qDebug()<<"start JKQTPlotterBase::plotSystemYAxis"; + //qDebug()<<"start JKQTBasePlotter::plotSystemYAxis"; yAxis->drawAxes(painter); - //qDebug()<<" end JKQTPlotterBase::plotSystemYAxis"; + //qDebug()<<" end JKQTBasePlotter::plotSystemYAxis"; } @@ -1010,7 +1010,7 @@ void JKQTBasePlotter::plotKey(JKQTPEnhancedPainter& painter) { #ifdef JKQTBP_AUTOTIMER JKQTPAutoOutputTimer jkaaot("JKQTBasePlotter::plotKey"); #endif - //qDebug()<<"start JKQTPlotterBase::plotKey"; + //qDebug()<<"start JKQTBasePlotter::plotKey"; QFont kf(keyFont, keyFontSize*fontSizeMultiplier); QFontMetricsF kfm(kf); @@ -1126,7 +1126,7 @@ void JKQTBasePlotter::plotKey(JKQTPEnhancedPainter& painter) { painter.restore(); } - //qDebug()<<" end JKQTPlotterBase::plotKey"; + //qDebug()<<" end JKQTBasePlotter::plotKey"; } void JKQTBasePlotter::plotOverlays(JKQTPEnhancedPainter &painter) { @@ -1156,7 +1156,7 @@ void JKQTBasePlotter::paintPlot(JKQTPEnhancedPainter& painter, bool drawOverlays #ifdef JKQTBP_AUTOTIMER JKQTPAutoOutputTimer jkaaot("JKQTBasePlotter::paintPlot"); #endif - //qDebug()<<"start JKQTPlotterBase::paintPlot"; + //qDebug()<<"start JKQTBasePlotter::paintPlot"; // draw background painter.save(); painter.setPen(backgroundColor); @@ -1169,8 +1169,8 @@ void JKQTBasePlotter::paintPlot(JKQTPEnhancedPainter& painter, bool drawOverlays plotSystemGrid(painter); if (!plotLabel.isEmpty()) { - mathText.set_fontSize(plotLabelFontSize*fontSizeMultiplier); - mathText.set_fontRoman(plotLabelFontname); + mathText.setFontSize(plotLabelFontSize*fontSizeMultiplier); + mathText.setFontRoman(plotLabelFontname); mathText.parse(plotLabel); double a=0,d=0,so=0,w=0; @@ -1194,7 +1194,7 @@ void JKQTBasePlotter::paintPlot(JKQTPEnhancedPainter& painter, bool drawOverlays if (showKey) plotKey(painter); painter.setRenderHint(JKQTPEnhancedPainter::TextAntialiasing, useAntiAliasingForText); if (drawOverlays) plotOverlays(painter); - //qDebug()<<" end JKQTPlotterBase::paintPlot"; + //qDebug()<<" end JKQTBasePlotter::paintPlot"; } void JKQTBasePlotter::paintOverlays(JKQTPEnhancedPainter &painter) { @@ -1274,14 +1274,14 @@ void JKQTBasePlotter::gridPaint(JKQTPEnhancedPainter& painter, QSizeF pageRect, QList fsm, lwm, pm; QList backg; for (int i=0; i< gridPrintingList.size(); i++) { - fsm.append(gridPrintingList[i].plotter->get_fontSizeMultiplier()); - lwm.append(gridPrintingList[i].plotter->get_lineWidthMultiplier()); + fsm.append(gridPrintingList[i].plotter->getFontSizeMultiplier()); + lwm.append(gridPrintingList[i].plotter->getLineWidthMultiplier()); pm.append(gridPrintingList[i].plotter->get_paintMagnification()); - backg.append(gridPrintingList[i].plotter->get_exportBackgroundColor()); - gridPrintingList[i].plotter->set_fontSizeMultiplier(fontSizeMultiplier); - gridPrintingList[i].plotter->set_lineWidthMultiplier(lineWidthMultiplier); + backg.append(gridPrintingList[i].plotter->getExportBackgroundColor()); + gridPrintingList[i].plotter->setFontSizeMultiplier(fontSizeMultiplier); + gridPrintingList[i].plotter->setLineWidthMultiplier(lineWidthMultiplier); gridPrintingList[i].plotter->set_paintMagnification(paintMagnification); - gridPrintingList[i].plotter->set_backgroundColor(gridPrintingList[i].plotter->get_exportBackgroundColor()); + gridPrintingList[i].plotter->setBackgroundColor(gridPrintingList[i].plotter->getExportBackgroundColor()); gridPrintingList[i].plotter->calcPlotScaling(painter); } gridPrintingCalc(); // ensure the grid plot has been calculated @@ -1331,11 +1331,11 @@ void JKQTBasePlotter::gridPaint(JKQTPEnhancedPainter& painter, QSizeF pageRect, painter.restore(); for (int i=0; i< gridPrintingList.size(); i++) { - gridPrintingList[i].plotter->set_fontSizeMultiplier(fsm[i]); - gridPrintingList[i].plotter->set_lineWidthMultiplier(lwm[i]); + gridPrintingList[i].plotter->setFontSizeMultiplier(fsm[i]); + gridPrintingList[i].plotter->setLineWidthMultiplier(lwm[i]); gridPrintingList[i].plotter->set_paintMagnification(pm[i]); - gridPrintingList[i].plotter->set_backgroundColor(backg[i]); - gridPrintingList[i].plotter->update_plot(); + gridPrintingList[i].plotter->setBackgroundColor(backg[i]); + gridPrintingList[i].plotter->replotPlot(); } } @@ -1795,7 +1795,7 @@ bool JKQTBasePlotter::printpreviewNew(QPaintDevice* paintDevice, bool setAbsolut backgroundColor=bc; paintMagnification=oldP; - mathText.set_useUnparsed(false); + mathText.setUseUnparsed(false); return res; @@ -2878,7 +2878,7 @@ void JKQTBasePlotter::saveImage(QString filename, bool displayPreview) { QFile::copy(fn, tempFM); } - mathText.set_useUnparsed(!jkqtpPaintDeviceAdapters[adapterID]->useLatexParser()); + mathText.setUseUnparsed(!jkqtpPaintDeviceAdapters[adapterID]->useLatexParser()); gridPrintingCalc(); QPaintDevice* svg=jkqtpPaintDeviceAdapters[adapterID]->createPaintdevice(fn, gridPrintingSize.width(), gridPrintingSize.height()); @@ -3274,7 +3274,7 @@ size_t JKQTBasePlotter::addGraph(size_t xColumn, size_t yColumn, QString title, gr->set_xColumn(xColumn); gr->set_yColumn(yColumn); gr->set_color(color); - gr->set_lineWidth(width); + gr->setLineWidth(width); return addGraph(gr); } else if (graphStyle==JKQTPImpulsesVertical) { JKQTPImpulsesVerticalGraph* gr=new JKQTPImpulsesVerticalGraph(this); @@ -3282,7 +3282,7 @@ size_t JKQTBasePlotter::addGraph(size_t xColumn, size_t yColumn, QString title, gr->set_xColumn(xColumn); gr->set_yColumn(yColumn); gr->set_color(color); - gr->set_lineWidth(width); + gr->setLineWidth(width); return addGraph(gr); } else if (graphStyle==JKQTPFilledCurveX) { JKQTPFilledCurveXGraph* gr=new JKQTPFilledCurveXGraph(this); @@ -3290,7 +3290,7 @@ size_t JKQTBasePlotter::addGraph(size_t xColumn, size_t yColumn, QString title, gr->set_xColumn(xColumn); gr->set_yColumn(yColumn); gr->set_color(QColor("black")); - gr->set_lineWidth(width); + gr->setLineWidth(width); gr->set_style(penstyle); gr->set_fillColor(color); return addGraph(gr); @@ -3300,7 +3300,7 @@ size_t JKQTBasePlotter::addGraph(size_t xColumn, size_t yColumn, QString title, gr->set_xColumn(xColumn); gr->set_yColumn(yColumn); gr->set_color(QColor("black")); - gr->set_lineWidth(width); + gr->setLineWidth(width); gr->set_style(penstyle); gr->set_fillColor(color); return addGraph(gr); @@ -3310,7 +3310,7 @@ size_t JKQTBasePlotter::addGraph(size_t xColumn, size_t yColumn, QString title, gr->set_xColumn(xColumn); gr->set_yColumn(yColumn); gr->set_color(QColor("black")); - gr->set_lineWidth(width); + gr->setLineWidth(width); gr->set_style(penstyle); gr->set_fillColor(color); return addGraph(gr); @@ -3320,7 +3320,7 @@ size_t JKQTBasePlotter::addGraph(size_t xColumn, size_t yColumn, QString title, gr->set_xColumn(xColumn); gr->set_yColumn(yColumn); gr->set_color(QColor("black")); - gr->set_lineWidth(width); + gr->setLineWidth(width); gr->set_style(penstyle); gr->set_fillColor(color); return addGraph(gr); @@ -3329,7 +3329,7 @@ size_t JKQTBasePlotter::addGraph(size_t xColumn, size_t yColumn, QString title, gr->set_title(title); gr->set_xColumn(xColumn); gr->set_yColumn(yColumn); - gr->set_lineWidth(width); + gr->setLineWidth(width); gr->set_style(penstyle); gr->set_color(color); gr->set_symbol(symbol); @@ -3453,7 +3453,7 @@ size_t JKQTBasePlotter::addGraphWithYError(size_t xColumn, size_t yColumn, size_ gr->set_yErrorStyle(errorStyle); gr->set_yErrorColumn(yErrorColumn); gr->set_errorColor(gr->get_color().darker()); - gr->set_errorWidth(gr->get_lineWidth()/3.0); + gr->set_errorWidth(gr->getLineWidth()/3.0); QColor fc=gr->get_color(); fc.setAlphaF(0.5); gr->set_errorFillColor(fc); @@ -3514,7 +3514,7 @@ void JKQTBasePlotter::plotGraphs(JKQTPEnhancedPainter& painter){ JKQTPAutoOutputTimer jkaaot(QString("JKQTBasePlotter::plotGraphs")); #endif if (datastore==nullptr || graphs.isEmpty()) return; - //qDebug()<<"start JKQTPlotterBase::plotGraphs()"; + //qDebug()<<"start JKQTBasePlotter::plotGraphs()"; if (useClipping) { QRegion cregion(iplotBorderLeft, iplotBorderTop, plotWidth, plotHeight); painter.setClipping(true); @@ -3555,7 +3555,7 @@ void JKQTBasePlotter::plotGraphs(JKQTPEnhancedPainter& painter){ } } - //qDebug()<<" end JKQTPlotterBase::plotGraphs()"; + //qDebug()<<" end JKQTBasePlotter::plotGraphs()"; } @@ -3591,9 +3591,9 @@ void JKQTBasePlotter::plotKeyContents(JKQTPEnhancedPainter& painter, double x, d double itheight=qMax(key_item_height*kfm.width('X'), fs.height()); QRectF rect(x, y+1.5*lineWidthMultiplier, key_line_length*kfm.width('X'), itheight-3.0*lineWidthMultiplier); g->drawKeyMarker(painter, rect); - mathText.set_fontColor(QColor("black")); - mathText.set_fontSize(keyFontSize*fontSizeMultiplier); - mathText.set_fontRoman(keyFont); + mathText.setFontColor(QColor("black")); + mathText.setFontSize(keyFontSize*fontSizeMultiplier); + mathText.setFontRoman(keyFont); mathText.parse(g->get_title()); mathText.draw(painter, Qt::AlignLeft|Qt::AlignVCenter, QRectF(x+(key_line_length+keyXSeparation)*kfm.width('X'),y, key_text_width, itheight)); @@ -3614,9 +3614,9 @@ void JKQTBasePlotter::plotKeyContents(JKQTPEnhancedPainter& painter, double x, d double itheight=qMax(key_item_height*kfm.width('X'), fs.height()); QRectF rect(x, y+1.5*lineWidthMultiplier, key_line_length*kfm.width('X'), itheight-3.0*lineWidthMultiplier); g->drawKeyMarker(painter, rect); - mathText.set_fontColor(QColor("black")); - mathText.set_fontSize(keyFontSize*fontSizeMultiplier); - mathText.set_fontRoman(keyFont); + mathText.setFontColor(QColor("black")); + mathText.setFontSize(keyFontSize*fontSizeMultiplier); + mathText.setFontRoman(keyFont); mathText.parse(g->get_title()); mathText.draw(painter, Qt::AlignLeft|Qt::AlignVCenter, QRectF(x+(key_line_length+keyXSeparation)*kfm.width('X'),y, fs.width(), itheight)); @@ -3648,9 +3648,9 @@ void JKQTBasePlotter::plotKeyContents(JKQTPEnhancedPainter& painter, double x, d double itheight=qMax(key_item_height*kfm.width('X'), key_text_height); QRectF rect(xx, yy+1.5*lineWidthMultiplier, key_line_length*kfm.width('X'), itheight-3.0*lineWidthMultiplier); g->drawKeyMarker(painter, rect); - mathText.set_fontColor(QColor("black")); - mathText.set_fontSize(keyFontSize*fontSizeMultiplier); - mathText.set_fontRoman(keyFont); + mathText.setFontColor(QColor("black")); + mathText.setFontSize(keyFontSize*fontSizeMultiplier); + mathText.setFontRoman(keyFont); mathText.parse(g->get_title()); //QSizeF fs=mt.getSize(painter); mathText.draw(painter, Qt::AlignLeft|Qt::AlignVCenter, QRectF(xx+(key_line_length+keyXSeparation)*kfm.width('X'),yy, key_text_width, key_text_height)); @@ -3904,7 +3904,7 @@ void JKQTBasePlotter::getGraphsYMinMax(double& miny, double& maxy, double& small void JKQTBasePlotter::zoomToFit(bool zoomX, bool zoomY, bool includeX0, bool includeY0, double scaleX, double scaleY) { - //std::cout<<"JKQTPlotterBase::zoomToFit():\n"; + //std::cout<<"JKQTBasePlotter::zoomToFit():\n"; double xxmin; double xxmax; double xsmallestGreaterZero; @@ -4251,28 +4251,28 @@ void JKQTBasePlotter::setGraphsDataRange(int datarange_start, int datarange_end) } } -void JKQTBasePlotter::set_userSettigsFilename(const QString &filename, const QString &prefix) +void JKQTBasePlotter::setUserSettigsFilename(const QString &filename, const QString &prefix) { userSettigsFilename=filename; userSettigsPrefix=prefix; } -void JKQTBasePlotter::set_userSettigsFilename(const QString &filename) +void JKQTBasePlotter::setUserSettigsFilename(const QString &filename) { userSettigsFilename=filename; } -void JKQTBasePlotter::set_userSettigsPrefix(const QString &prefix) +void JKQTBasePlotter::setUserSettigsPrefix(const QString &prefix) { userSettigsPrefix=prefix; } -QString JKQTBasePlotter::get_userSettigsFilename() const +QString JKQTBasePlotter::getUserSettigsFilename() const { return userSettigsFilename; } -QString JKQTBasePlotter::get_userSettigsPrefix() const +QString JKQTBasePlotter::getUserSettigsPrefix() const { return userSettigsPrefix; } @@ -4441,7 +4441,7 @@ void JKQTBasePlotter::showPlotData() { JKQTPEnhancedTableView* tv=new JKQTPEnhancedTableView(dlg); layout->addWidget(tv); - tb->addAction(tv->getPrintAction()); + tb->addAction(tv->getActionPrint()); JKQTPDatastoreModel* model=new JKQTPDatastoreModel(getDatastore(), this); tv->setModel(model); @@ -4453,7 +4453,7 @@ void JKQTBasePlotter::showPlotData() { } -void JKQTBasePlotter::set_emitSignals(bool enabled) +void JKQTBasePlotter::setEmittingSignalsEnabled(bool enabled) { emitSignals=enabled; xAxis->set_doUpdateScaling(enabled); @@ -4519,15 +4519,15 @@ JKQTBasePlotter::textSizeData::textSizeData() -bool JKQTBasePlotter::JKQTPPaintDeviceAdapter::useLatexParser() const +bool JKQTPPaintDeviceAdapter::useLatexParser() const { return true; } -QPaintDevice *JKQTBasePlotter::JKQTPPaintDeviceAdapter::createPaintdeviceMM(const QString &filename, double widthMM, double heightMM) const +QPaintDevice *JKQTPPaintDeviceAdapter::createPaintdeviceMM(const QString &filename, double widthMM, double heightMM) const { return createPaintdevice(filename, widthMM/25.4*QApplication::desktop()->logicalDpiX(), heightMM/25.4*QApplication::desktop()->logicalDpiY()); } -JKQTBasePlotter::JKQTPSaveDataAdapter::~JKQTPSaveDataAdapter() { +JKQTPSaveDataAdapter::~JKQTPSaveDataAdapter() { } diff --git a/lib/jkqtplotter/jkqtpbaseplotter.h b/lib/jkqtplotter/jkqtpbaseplotter.h index 63880f2949..77ae7d2cb5 100644 --- a/lib/jkqtplotter/jkqtpbaseplotter.h +++ b/lib/jkqtplotter/jkqtpbaseplotter.h @@ -61,9 +61,39 @@ class JKQTPGraphsModel; // forward class JKQTPGraph; // forward class JKQTPPlotElement; // forward -/** \brief initialized Qt-ressources necessary for JKQTBasePlotter */ +/** \brief initialized Qt-ressources necessary for JKQTBasePlotter + * \ingroup jkqtpplotterclasses */ LIB_EXPORT void initJKQTBasePlotterResources(); +/** \brief virtual base-class for exporter classes that can be used to save data inot a file + * \ingroup jkqtpplotterclasses */ +class LIB_EXPORT JKQTPSaveDataAdapter { + public: + virtual ~JKQTPSaveDataAdapter() ; + virtual QString getFilter() const=0; + virtual void saveJKQTPData(const QString& filename, const QList >& data, const QStringList& columnNames) const=0; +}; + +/** \brief Service from this class to implement a special QPaintDevice as a plugin, that can be registered to JKQTBasePlotter/JKQTPlotter + * and then be used to export graphics, use registerPaintDeviceAdapter() to register such a plass + * \ingroup jkqtpplotterclasses*/ +class LIB_EXPORT JKQTPPaintDeviceAdapter { + public: + virtual ~JKQTPPaintDeviceAdapter() {} + virtual QString getFilter() const=0; + virtual QString getFormatName() const=0; + virtual QString getFormatID() const=0; + virtual QStringList getFileExtension() const=0; + virtual bool getSetAbsolutePaperSize() const=0; + virtual double getPrintSizeXInMM() const =0; + virtual double getPrintSizeYInMM() const =0; + virtual bool isPrinter() const=0; + virtual bool useLatexParser() const; + /** \brief create a paint device with a given size in pt */ + virtual QPaintDevice* createPaintdevice(const QString& filename, int widthPix, int heightPix) const=0; + /** \brief create a paint device with a given size in millimeters ... the default implementation call createPaintdevice(), assuming the standard logical resolution of the desktop!!!) */ + virtual QPaintDevice* createPaintdeviceMM(const QString& filename, double widthMM, double heightMM) const; +}; /** \brief base class for 2D plotter classes * \ingroup jkqtpplotterclasses @@ -90,13 +120,13 @@ LIB_EXPORT void initJKQTBasePlotterResources(); * how to use it. This class implement a graph management, where graphs simply point to a set of columns inside the datastore * that contain the actual plot data! * - * If you call the \link JKQTPlotterBase::JKQTPlotterBase() constructor \endlink with no arguments, it will create an internal + * If you call the \link JKQTBasePlotter::JKQTBasePlotter() constructor \endlink with no arguments, it will create an internal * datastore object and you can start adding data by using get_datastore(). If you have an external JKQTPDatastore object you can * give it as parameter to the constructor or use one of the other methods: - * - useExternalDatastore(): \copybrief JKQTPlotterBase::useExternalDatastore() - * - useAsInternalDatastore(): \copybrief JKQTPlotterBase::useAsInternalDatastore() - * - useInternalDatastore(): \copybrief JKQTPlotterBase::useInternalDatastore() - * - forceInternalDatastore(): \copybrief JKQTPlotterBase::forceInternalDatastore() + * - useExternalDatastore(): \copybrief JKQTBasePlotter::useExternalDatastore() + * - useAsInternalDatastore(): \copybrief JKQTBasePlotter::useAsInternalDatastore() + * - useInternalDatastore(): \copybrief JKQTBasePlotter::useInternalDatastore() + * - forceInternalDatastore(): \copybrief JKQTBasePlotter::forceInternalDatastore() *. * * @@ -110,7 +140,7 @@ LIB_EXPORT void initJKQTBasePlotterResources(); * - The plotting of coordinate axes and grids, as well as coordinate transforms is done by * JKQTPCoordinateAxis descendents (see documentation there) * . - * If you want to set the axis properties, use get_xAxis() or get_yAxis() to get a pointer to the axis objects which then + * If you want to set the axis properties, use getXAxis() or getYAxis() to get a pointer to the axis objects which then * may be used to set the axis properties. * * @@ -149,8 +179,8 @@ LIB_EXPORT void initJKQTBasePlotterResources(); * * As one often want's to combine different graphs, there is a possibility to combine this graph with more other graphs. * To do so one can think of the graphs to be part of a grid where each graph is contained in one cell. By default this - * mechanism is deactivated. You can activate it by calling set_gridPrinting(true). Then you can set the position of the - * current graph by calling set_gridPrintingCurrentX() and set_gridPrintingCurrentY(). Add additional graphs by calling + * mechanism is deactivated. You can activate it by calling setGridPrinting(true). Then you can set the position of the + * current graph by calling setGridPrintingCurrentX() and setGridPrintingCurrentY(). Add additional graphs by calling * addGridPrintingPlotter(). The position of the current graph is 0,0 by default. Afterwards the save and print routines * will export/print all graphs, not just the current one. There will be no additional border between the graphs, as the * class expects the internal graph borders to be sufficient. @@ -175,14 +205,14 @@ LIB_EXPORT void initJKQTBasePlotterResources(); * First note that this functionality is only available and activated if both axes are linear! * * You can set two different aspect ratios: - * - The ratio of plotWidth/plotHeight (set_aspectRatio(), set_maintainAspectRatio()) will keep the plots pixel-width and height at a certain value. - * - The ratio of (xmax-xmin)/(ymax-ymin) (set_axisAspectRatio(), set_maintainAxisAspectRatio()) will keep the displayed axis ranges in a certain ratio. + * - The ratio of plotWidth/plotHeight (setAspectRatio(), setMaintainAspectRatio()) will keep the plots pixel-width and height at a certain value. + * - The ratio of (xmax-xmin)/(ymax-ymin) (setAxisAspectRatio(), setMaintainAxisAspectRatio()) will keep the displayed axis ranges in a certain ratio. * . * So to achieve different effects, use these combinations: * - you have a 200x100 range where each 1x1-pixel should have an aspect ratio of 4: * \code - * set_aspectRatio(200.0/100.0); - * set_axisAspectRatio(4.0*get_aspectRatio()); + * setAspectRatio(200.0/100.0); + * setAxisAspectRatio(4.0*getAspectRatio()); * \endcode * . */ @@ -640,14 +670,14 @@ class LIB_EXPORT JKQTBasePlotter: public QObject { /*! \brief sets the property fontSizeMultiplier to the specified \a __value. \details Description of the parameter fontSizeMultiplier is:
\copydoc fontSizeMultiplier
\see fontSizeMultiplier for more information */ - inline virtual void set_fontSizeMultiplier(double __value) + inline virtual void setFontSizeMultiplier(double __value) { this->fontSizeMultiplier = __value; } /*! \brief sets the property lineWidthMultiplier to the specified \a __value. \details Description of the parameter lineWidthMultiplier is:
\copydoc lineWidthMultiplier
\see lineWidthMultiplier for more information */ - inline virtual void set_lineWidthMultiplier(double __value) + inline virtual void setLineWidthMultiplier(double __value) { this->lineWidthMultiplier = __value; } @@ -839,22 +869,22 @@ class LIB_EXPORT JKQTBasePlotter: public QObject { void setGraphsDataRange(int datarange_start, int datarange_end); /** \brief en-/disables the maintaining of the data aspect ratio */ - void set_maintainAspectRatio(bool value) { + void setMaintainAspectRatio(bool value) { maintainAspectRatio=value; - update_plot(); + replotPlot(); } /** \brief en-/disables the maintaining of the axis aspect ratio */ - void set_maintainAxisAspectRatio(bool value) { + void setMaintainAxisAspectRatio(bool value) { maintainAxisAspectRatio=value; - update_plot(); + replotPlot(); } - void set_userSettigsFilename(const QString& filename, const QString& prefix); - void set_userSettigsFilename(const QString& filename); - void set_userSettigsPrefix(const QString& prefix); - QString get_userSettigsFilename() const; - QString get_userSettigsPrefix() const; + void setUserSettigsFilename(const QString& filename, const QString& prefix); + void setUserSettigsFilename(const QString& filename); + void setUserSettigsPrefix(const QString& prefix); + QString getUserSettigsFilename() const; + QString getUserSettigsPrefix() const; /** \brief set all graphs invisible, except i */ void setOnlyGraphVisible(int i); @@ -915,9 +945,9 @@ class LIB_EXPORT JKQTBasePlotter: public QObject { void forceInternalDatastore(); /*! \brief returns the property emitSignals. \details Description of the parameter emitSignals is:
\copydoc emitSignals
. \see emitSignals for more information */ - inline bool get_emitSignals()const { return this->emitSignals; } + inline bool isEmittingSignalsEnabled()const { return this->emitSignals; } - void set_emitSignals(bool enabled); + void setEmittingSignalsEnabled(bool enabled); /** \brief loads the plot properties from a QSettings object */ @@ -952,7 +982,7 @@ class LIB_EXPORT JKQTBasePlotter: public QObject { /** \brief sets the width of the plot widget */ void setHeight(int heigh); - /** \brief sets the borders of the plot, see also get_plotBorderTop(), plotBorderBottom(), plotBorderLeft(), plotBorderRight() */ + /** \brief sets the borders of the plot, see also getPlotBorderTop(), plotBorderBottom(), plotBorderLeft(), plotBorderRight() */ void setBorder(int left, int right, int top, int bottom); /** \brief sets minimum and maximum x-value to plot */ @@ -1134,68 +1164,68 @@ class LIB_EXPORT JKQTBasePlotter: public QObject { void drawNonGridOverlays(JKQTPEnhancedPainter &painter, QPoint pos=QPoint(0,0)); /** \brief emit plotUpdated() */ - void update_plot() { if (emitPlotSignals) emit plotUpdated(); } + void replotPlot() { if (emitPlotSignals) emit plotUpdated(); } /*! \brief sets the property emitPlotSignals to the specified \a __value. \details Description of the parameter emitPlotSignals is:
\copydoc emitPlotSignals
\see emitPlotSignals for more information */ - inline virtual void set_emitPlotSignals(bool __value) + inline virtual void setEmittingPlotSignalsEnabled(bool __value) { this->emitPlotSignals = __value; } /*! \brief returns the property emitPlotSignals. \details Description of the parameter emitPlotSignals is:
\copydoc emitPlotSignals
\see emitPlotSignals for more information */ - inline virtual bool get_emitPlotSignals() const + inline virtual bool isEmittingPlotSignalsEnabled() const { return this->emitPlotSignals; } /*! \brief returns the property plotBorderTop. \details Description of the parameter plotBorderTop is:
\copydoc plotBorderTop
. \see plotBorderTop for more information */ - inline int get_plotBorderTop() const { return this->plotBorderTop; } + inline int getPlotBorderTop() const { return this->plotBorderTop; } /*! \brief returns the property plotBorderLeft. \details Description of the parameter plotBorderLeft is:
\copydoc plotBorderLeft
. \see plotBorderLeft for more information */ - inline int get_plotBorderLeft() const { return this->plotBorderLeft; } + inline int getPlotBorderLeft() const { return this->plotBorderLeft; } /*! \brief returns the property plotBorderBottom. \details Description of the parameter plotBorderBottom is:
\copydoc plotBorderBottom
. \see plotBorderBottom for more information */ - inline int get_plotBorderBottom() const { return this->plotBorderBottom; } + inline int getPlotBorderBottom() const { return this->plotBorderBottom; } /*! \brief returns the property plotBorderRight. \details Description of the parameter plotBorderRight is:
\copydoc plotBorderRight
. \see plotBorderRight for more information */ - inline int get_plotBorderRight() const { return this->plotBorderRight; } + inline int getPlotBorderRight() const { return this->plotBorderRight; } /*! \brief returns the property maintainAspectRatio. \details Description of the parameter maintainAspectRatio is:
\copydoc maintainAspectRatio
. \see maintainAspectRatio for more information */ - inline bool get_maintainAspectRatio() const { return this->maintainAspectRatio; } + inline bool doesMaintainAspectRatio() const { return this->maintainAspectRatio; } /*! \brief sets the property aspectRatio to the specified \a __value. \details Description of the parameter aspectRatio is:
\copydoc aspectRatio
\see aspectRatio for more information */ - inline virtual void set_aspectRatio(double __value) + inline virtual void setAspectRatio(double __value) { if (this->aspectRatio != __value) { this->aspectRatio = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property aspectRatio. \details Description of the parameter aspectRatio is:
\copydoc aspectRatio
\see aspectRatio for more information */ - inline virtual double get_aspectRatio() const + inline virtual double getAspectRatio() const { return this->aspectRatio; } /*! \brief returns the property maintainAxisAspectRatio. \details Description of the parameter maintainAxisAspectRatio is:
\copydoc maintainAxisAspectRatio
. \see maintainAxisAspectRatio for more information */ - inline bool get_maintainAxisAspectRatio() const { return this->maintainAxisAspectRatio; } + inline bool doesMaintainAxisAspectRatio() const { return this->maintainAxisAspectRatio; } /*! \brief sets the property axisAspectRatio to the specified \a __value. \details Description of the parameter axisAspectRatio is:
\copydoc axisAspectRatio
\see axisAspectRatio for more information */ - inline virtual void set_axisAspectRatio(double __value) + inline virtual void setAxisAspectRatio(double __value) { if (this->axisAspectRatio != __value) { this->axisAspectRatio = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property axisAspectRatio. \details Description of the parameter axisAspectRatio is:
\copydoc axisAspectRatio
\see axisAspectRatio for more information */ - inline virtual double get_axisAspectRatio() const + inline virtual double getAxisAspectRatio() const { return this->axisAspectRatio; } @@ -1203,51 +1233,51 @@ class LIB_EXPORT JKQTBasePlotter: public QObject { /*! \brief sets the property useAntiAliasingForSystem to the specified \a __value. \details Description of the parameter useAntiAliasingForSystem is:
\copydoc useAntiAliasingForSystem
\see useAntiAliasingForSystem for more information */ - inline virtual void set_useAntiAliasingForSystem(bool __value) + inline virtual void setUseAntiAliasingForSystem(bool __value) { if (this->useAntiAliasingForSystem != __value) { this->useAntiAliasingForSystem = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property useAntiAliasingForSystem. \details Description of the parameter useAntiAliasingForSystem is:
\copydoc useAntiAliasingForSystem
\see useAntiAliasingForSystem for more information */ - inline virtual bool get_useAntiAliasingForSystem() const + inline virtual bool isUsingAntiAliasingForSystem() const { return this->useAntiAliasingForSystem; } /*! \brief sets the property useAntiAliasingForGraphs to the specified \a __value. \details Description of the parameter useAntiAliasingForGraphs is:
\copydoc useAntiAliasingForGraphs
\see useAntiAliasingForGraphs for more information */ - inline virtual void set_useAntiAliasingForGraphs(bool __value) + inline virtual void setUseAntiAliasingForGraphs(bool __value) { if (this->useAntiAliasingForGraphs != __value) { this->useAntiAliasingForGraphs = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property useAntiAliasingForGraphs. \details Description of the parameter useAntiAliasingForGraphs is:
\copydoc useAntiAliasingForGraphs
\see useAntiAliasingForGraphs for more information */ - inline virtual bool get_useAntiAliasingForGraphs() const + inline virtual bool isUsingAntiAliasingForGraphs() const { return this->useAntiAliasingForGraphs; } /*! \brief sets the property useAntiAliasingForText to the specified \a __value. \details Description of the parameter useAntiAliasingForText is:
\copydoc useAntiAliasingForText
\see useAntiAliasingForText for more information */ - inline virtual void set_useAntiAliasingForText(bool __value) + inline virtual void setUseAntiAliasingForText(bool __value) { if (this->useAntiAliasingForText != __value) { this->useAntiAliasingForText = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property useAntiAliasingForText. \details Description of the parameter useAntiAliasingForText is:
\copydoc useAntiAliasingForText
\see useAntiAliasingForText for more information */ - inline virtual bool get_useAntiAliasingForText() const + inline virtual bool isUsingAntiAliasingForText() const { return this->useAntiAliasingForText; } @@ -1255,34 +1285,34 @@ class LIB_EXPORT JKQTBasePlotter: public QObject { /*! \brief sets the property graphColor to the specified \a __value. \details Description of the parameter graphColor is:
\copydoc graphColor
\see graphColor for more information */ - inline virtual void set_graphColor(const QColor & __value) + inline virtual void setGraphColor(const QColor & __value) { if (this->graphColor != __value) { this->graphColor = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property graphColor. \details Description of the parameter graphColor is:
\copydoc graphColor
\see graphColor for more information */ - inline virtual QColor get_graphColor() const + inline virtual QColor getGraphColor() const { return this->graphColor; } /*! \brief sets the property graphWidth to the specified \a __value. \details Description of the parameter graphWidth is:
\copydoc graphWidth
\see graphWidth for more information */ - inline virtual void set_graphWidth(double __value) + inline virtual void setGraphWidth(double __value) { if (this->graphWidth != __value) { this->graphWidth = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property graphWidth. \details Description of the parameter graphWidth is:
\copydoc graphWidth
\see graphWidth for more information */ - inline virtual double get_graphWidth() const + inline virtual double getGraphWidth() const { return this->graphWidth; } @@ -1290,51 +1320,51 @@ class LIB_EXPORT JKQTBasePlotter: public QObject { /*! \brief sets the property backgroundColor to the specified \a __value. \details Description of the parameter backgroundColor is:
\copydoc backgroundColor
\see backgroundColor for more information */ - inline virtual void set_backgroundColor(const QColor & __value) + inline virtual void setBackgroundColor(const QColor & __value) { if (this->backgroundColor != __value) { this->backgroundColor = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property backgroundColor. \details Description of the parameter backgroundColor is:
\copydoc backgroundColor
\see backgroundColor for more information */ - inline virtual QColor get_backgroundColor() const + inline virtual QColor getBackgroundColor() const { return this->backgroundColor; } /*! \brief sets the property exportBackgroundColor to the specified \a __value. \details Description of the parameter exportBackgroundColor is:
\copydoc exportBackgroundColor
\see exportBackgroundColor for more information */ - inline virtual void set_exportBackgroundColor(const QColor & __value) + inline virtual void setExportBackgroundColor(const QColor & __value) { if (this->exportBackgroundColor != __value) { this->exportBackgroundColor = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property exportBackgroundColor. \details Description of the parameter exportBackgroundColor is:
\copydoc exportBackgroundColor
\see exportBackgroundColor for more information */ - inline virtual QColor get_exportBackgroundColor() const + inline virtual QColor getExportBackgroundColor() const { return this->exportBackgroundColor; } /*! \brief sets the property plotBackgroundColor to the specified \a __value. \details Description of the parameter plotBackgroundColor is:
\copydoc plotBackgroundColor
\see plotBackgroundColor for more information */ - inline virtual void set_plotBackgroundColor(const QColor & __value) + inline virtual void setPlotBackgroundColor(const QColor & __value) { if (this->plotBackgroundColor != __value) { this->plotBackgroundColor = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property plotBackgroundColor. \details Description of the parameter plotBackgroundColor is:
\copydoc plotBackgroundColor
\see plotBackgroundColor for more information */ - inline virtual QColor get_plotBackgroundColor() const + inline virtual QColor getPlotBackgroundColor() const { return this->plotBackgroundColor; } @@ -1342,153 +1372,153 @@ class LIB_EXPORT JKQTBasePlotter: public QObject { /*! \brief sets the property keyFont to the specified \a __value. \details Description of the parameter keyFont is:
\copydoc keyFont
\see keyFont for more information */ - inline virtual void set_keyFont(const QString & __value) + inline virtual void setKeyFont(const QString & __value) { if (this->keyFont != __value) { this->keyFont = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property keyFont. \details Description of the parameter keyFont is:
\copydoc keyFont
\see keyFont for more information */ - inline virtual QString get_keyFont() const + inline virtual QString getKeyFont() const { return this->keyFont; } /*! \brief sets the property keyFontSize to the specified \a __value. \details Description of the parameter keyFontSize is:
\copydoc keyFontSize
\see keyFontSize for more information */ - inline virtual void set_keyFontSize(double __value) + inline virtual void setKeyFontSize(double __value) { if (this->keyFontSize != __value) { this->keyFontSize = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property keyFontSize. \details Description of the parameter keyFontSize is:
\copydoc keyFontSize
\see keyFontSize for more information */ - inline virtual double get_keyFontSize() const + inline virtual double getKeyFontSize() const { return this->keyFontSize; } /*! \brief sets the property key_item_width to the specified \a __value. \details Description of the parameter key_item_width is:
\copydoc key_item_width
\see key_item_width for more information */ - inline virtual void set_key_item_width(double __value) + inline virtual void setKeyItemWidth(double __value) { if (this->key_item_width != __value) { this->key_item_width = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property key_item_width. \details Description of the parameter key_item_width is:
\copydoc key_item_width
\see key_item_width for more information */ - inline virtual double get_key_item_width() const + inline virtual double getKeyItemWidth() const { return this->key_item_width; } /*! \brief sets the property key_item_height to the specified \a __value. \details Description of the parameter key_item_height is:
\copydoc key_item_height
\see key_item_height for more information */ - inline virtual void set_key_item_height(double __value) + inline virtual void setKeyItemHeight(double __value) { if (this->key_item_height != __value) { this->key_item_height = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property key_item_height. \details Description of the parameter key_item_height is:
\copydoc key_item_height
\see key_item_height for more information */ - inline virtual double get_key_item_height() const + inline virtual double getKeyItemHeight() const { return this->key_item_height; } /*! \brief sets the property keyYSeparation to the specified \a __value. \details Description of the parameter keyYSeparation is:
\copydoc keyYSeparation
\see keyYSeparation for more information */ - inline virtual void set_keyYSeparation(double __value) + inline virtual void setKeyYSeparation(double __value) { if (this->keyYSeparation != __value) { this->keyYSeparation = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property keyYSeparation. \details Description of the parameter keyYSeparation is:
\copydoc keyYSeparation
\see keyYSeparation for more information */ - inline virtual double get_keyYSeparation() const + inline virtual double getKeyYSeparation() const { return this->keyYSeparation; } /*! \brief sets the property key_line_length to the specified \a __value. \details Description of the parameter key_line_length is:
\copydoc key_line_length
\see key_line_length for more information */ - inline virtual void set_key_line_length(double __value) + inline virtual void setKeyLineLength(double __value) { if (this->key_line_length != __value) { this->key_line_length = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property key_line_length. \details Description of the parameter key_line_length is:
\copydoc key_line_length
\see key_line_length for more information */ - inline virtual double get_key_line_length() const + inline virtual double getKeyLineLength() const { return this->key_line_length; } /*! \brief sets the property keyXMargin to the specified \a __value. \details Description of the parameter keyXMargin is:
\copydoc keyXMargin
\see keyXMargin for more information */ - inline virtual void set_keyXMargin(double __value) + inline virtual void setKeyXMargin(double __value) { if (this->keyXMargin != __value) { this->keyXMargin = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property keyXMargin. \details Description of the parameter keyXMargin is:
\copydoc keyXMargin
\see keyXMargin for more information */ - inline virtual double get_keyXMargin() const + inline virtual double getKeyXMargin() const { return this->keyXMargin; } /*! \brief sets the property keyYMargin to the specified \a __value. \details Description of the parameter keyYMargin is:
\copydoc keyYMargin
\see keyYMargin for more information */ - inline virtual void set_keyYMargin(double __value) + inline virtual void setKeyYMargin(double __value) { if (this->keyYMargin != __value) { this->keyYMargin = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property keyYMargin. \details Description of the parameter keyYMargin is:
\copydoc keyYMargin
\see keyYMargin for more information */ - inline virtual double get_keyYMargin() const + inline virtual double getKeyYMargin() const { return this->keyYMargin; } /*! \brief sets the property keyXSeparation to the specified \a __value. \details Description of the parameter keyXSeparation is:
\copydoc keyXSeparation
\see keyXSeparation for more information */ - inline virtual void set_keyXSeparation(double __value) + inline virtual void setKeyXSeparation(double __value) { if (this->keyXSeparation != __value) { this->keyXSeparation = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property keyXSeparation. \details Description of the parameter keyXSeparation is:
\copydoc keyXSeparation
\see keyXSeparation for more information */ - inline virtual double get_keyXSeparation() const + inline virtual double getKeyXSeparation() const { return this->keyXSeparation; } @@ -1496,170 +1526,170 @@ class LIB_EXPORT JKQTBasePlotter: public QObject { /*! \brief sets the property keyXOffset to the specified \a __value. \details Description of the parameter keyXOffset is:
\copydoc keyXOffset
\see keyXOffset for more information */ - inline virtual void set_keyXOffset(double __value) + inline virtual void setKeyXOffset(double __value) { if (this->keyXOffset != __value) { this->keyXOffset = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property keyXOffset. \details Description of the parameter keyXOffset is:
\copydoc keyXOffset
\see keyXOffset for more information */ - inline virtual double get_keyXOffset() const + inline virtual double getKeyXOffset() const { return this->keyXOffset; } /*! \brief sets the property keyYOffset to the specified \a __value. \details Description of the parameter keyYOffset is:
\copydoc keyYOffset
\see keyYOffset for more information */ - inline virtual void set_keyYOffset(double __value) + inline virtual void setKeyYOffset(double __value) { if (this->keyYOffset != __value) { this->keyYOffset = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property keyYOffset. \details Description of the parameter keyYOffset is:
\copydoc keyYOffset
\see keyYOffset for more information */ - inline virtual double get_keyYOffset() const + inline virtual double getKeyYOffset() const { return this->keyYOffset; } /*! \brief sets the property showKey to the specified \a __value. \details Description of the parameter showKey is:
\copydoc showKey
\see showKey for more information */ - inline virtual void set_showKey(bool __value) + inline virtual void setShowKey(bool __value) { if (this->showKey != __value) { this->showKey = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property showKey. \details Description of the parameter showKey is:
\copydoc showKey
\see showKey for more information */ - inline virtual bool get_showKey() const + inline virtual bool getShowKey() const { return this->showKey; } /*! \brief sets the property showKeyFrame to the specified \a __value. \details Description of the parameter showKeyFrame is:
\copydoc showKeyFrame
\see showKeyFrame for more information */ - inline virtual void set_showKeyFrame(bool __value) + inline virtual void setShowKeyFrame(bool __value) { if (this->showKeyFrame != __value) { this->showKeyFrame = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property showKeyFrame. \details Description of the parameter showKeyFrame is:
\copydoc showKeyFrame
\see showKeyFrame for more information */ - inline virtual bool get_showKeyFrame() const + inline virtual bool getShowKeyFrame() const { return this->showKeyFrame; } /*! \brief sets the property keyFrameColor to the specified \a __value. \details Description of the parameter keyFrameColor is:
\copydoc keyFrameColor
\see keyFrameColor for more information */ - inline virtual void set_keyFrameColor(const QColor & __value) + inline virtual void setKeyFrameColor(const QColor & __value) { if (this->keyFrameColor != __value) { this->keyFrameColor = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property keyFrameColor. \details Description of the parameter keyFrameColor is:
\copydoc keyFrameColor
\see keyFrameColor for more information */ - inline virtual QColor get_keyFrameColor() const + inline virtual QColor getKeyFrameColor() const { return this->keyFrameColor; } /*! \brief sets the property keyBackgroundColor to the specified \a __value. \details Description of the parameter keyBackgroundColor is:
\copydoc keyBackgroundColor
\see keyBackgroundColor for more information */ - inline virtual void set_keyBackgroundColor(const QColor & __value) + inline virtual void setKeyBackgroundColor(const QColor & __value) { if (this->keyBackgroundColor != __value) { this->keyBackgroundColor = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property keyBackgroundColor. \details Description of the parameter keyBackgroundColor is:
\copydoc keyBackgroundColor
\see keyBackgroundColor for more information */ - inline virtual QColor get_keyBackgroundColor() const + inline virtual QColor getKeyBackgroundColor() const { return this->keyBackgroundColor; } /*! \brief sets the property keyFrameWidth to the specified \a __value. \details Description of the parameter keyFrameWidth is:
\copydoc keyFrameWidth
\see keyFrameWidth for more information */ - inline virtual void set_keyFrameWidth(double __value) + inline virtual void setKeyFrameWidth(double __value) { if (this->keyFrameWidth != __value) { this->keyFrameWidth = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property keyFrameWidth. \details Description of the parameter keyFrameWidth is:
\copydoc keyFrameWidth
\see keyFrameWidth for more information */ - inline virtual double get_keyFrameWidth() const + inline virtual double getKeyFrameWidth() const { return this->keyFrameWidth; } /*! \brief sets the property keyAutosize to the specified \a __value. \details Description of the parameter keyAutosize is:
\copydoc keyAutosize
\see keyAutosize for more information */ - inline virtual void set_keyAutosize(bool __value) + inline virtual void setKeyAutosize(bool __value) { if (this->keyAutosize != __value) { this->keyAutosize = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property keyAutosize. \details Description of the parameter keyAutosize is:
\copydoc keyAutosize
\see keyAutosize for more information */ - inline virtual bool get_keyAutosize() const + inline virtual bool getKeyAutosize() const { return this->keyAutosize; } /*! \brief sets the property keyPosition to the specified \a __value. \details Description of the parameter keyPosition is:
\copydoc keyPosition
\see keyPosition for more information */ - inline virtual void set_keyPosition(const JKQTPKeyPosition & __value) + inline virtual void setKeyPosition(const JKQTPKeyPosition & __value) { if (this->keyPosition != __value) { this->keyPosition = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property keyPosition. \details Description of the parameter keyPosition is:
\copydoc keyPosition
\see keyPosition for more information */ - inline virtual JKQTPKeyPosition get_keyPosition() const + inline virtual JKQTPKeyPosition getKeyPosition() const { return this->keyPosition; } /*! \brief sets the property keyLayout to the specified \a __value. \details Description of the parameter keyLayout is:
\copydoc keyLayout
\see keyLayout for more information */ - inline virtual void set_keyLayout(const JKQTPKeyLayout & __value) + inline virtual void setKeyLayout(const JKQTPKeyLayout & __value) { if (this->keyLayout != __value) { this->keyLayout = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property keyLayout. \details Description of the parameter keyLayout is:
\copydoc keyLayout
\see keyLayout for more information */ - inline virtual JKQTPKeyLayout get_keyLayout() const + inline virtual JKQTPKeyLayout getKeyLayout() const { return this->keyLayout; } @@ -1667,51 +1697,51 @@ class LIB_EXPORT JKQTBasePlotter: public QObject { /*! \brief sets the property plotLabelFontSize to the specified \a __value. \details Description of the parameter plotLabelFontSize is:
\copydoc plotLabelFontSize
\see plotLabelFontSize for more information */ - inline virtual void set_plotLabelFontSize(double __value) + inline virtual void setPlotLabelFontSize(double __value) { if (this->plotLabelFontSize != __value) { this->plotLabelFontSize = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property plotLabelFontSize. \details Description of the parameter plotLabelFontSize is:
\copydoc plotLabelFontSize
\see plotLabelFontSize for more information */ - inline virtual double get_plotLabelFontSize() const + inline virtual double getPlotLabelFontSize() const { return this->plotLabelFontSize; } /*! \brief sets the property plotLabelFontname to the specified \a __value. \details Description of the parameter plotLabelFontname is:
\copydoc plotLabelFontname
\see plotLabelFontname for more information */ - inline virtual void set_plotLabelFontname(const QString & __value) + inline virtual void setPlotLabelFontname(const QString & __value) { if (this->plotLabelFontname != __value) { this->plotLabelFontname = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property plotLabelFontname. \details Description of the parameter plotLabelFontname is:
\copydoc plotLabelFontname
\see plotLabelFontname for more information */ - inline virtual QString get_plotLabelFontname() const + inline virtual QString getPlotLabelFontname() const { return this->plotLabelFontname; } /*! \brief sets the property plotLabel to the specified \a __value. \details Description of the parameter plotLabel is:
\copydoc plotLabel
\see plotLabel for more information */ - inline virtual void set_plotLabel(const QString & __value) + inline virtual void setPlotLabel(const QString & __value) { if (this->plotLabel != __value) { this->plotLabel = __value; - update_plot(); + replotPlot(); } } /*! \brief returns the property plotLabel. \details Description of the parameter plotLabel is:
\copydoc plotLabel
\see plotLabel for more information */ - inline virtual QString get_plotLabel() const + inline virtual QString getPlotLabel() const { return this->plotLabel; } @@ -1719,182 +1749,182 @@ class LIB_EXPORT JKQTBasePlotter: public QObject { /*! \brief sets the property gridPrinting to the specified \a __value. \details Description of the parameter gridPrinting is:
\copydoc gridPrinting
\see gridPrinting for more information */ - inline virtual void set_gridPrinting(bool __value) + inline virtual void setGridPrinting(bool __value) { this->gridPrinting = __value; } /*! \brief returns the property gridPrinting. \details Description of the parameter gridPrinting is:
\copydoc gridPrinting
\see gridPrinting for more information */ - inline virtual bool get_gridPrinting() const + inline virtual bool getGridPrinting() const { return this->gridPrinting; } /*! \brief sets the property gridPrintingCurrentX to the specified \a __value. \details Description of the parameter gridPrintingCurrentX is:
\copydoc gridPrintingCurrentX
\see gridPrintingCurrentX for more information */ - inline virtual void set_gridPrintingCurrentX(size_t __value) + inline virtual void setGridPrintingCurrentX(size_t __value) { this->gridPrintingCurrentX = __value; } /*! \brief returns the property gridPrintingCurrentX. \details Description of the parameter gridPrintingCurrentX is:
\copydoc gridPrintingCurrentX
\see gridPrintingCurrentX for more information */ - inline virtual size_t get_gridPrintingCurrentX() const + inline virtual size_t getGridPrintingCurrentX() const { return this->gridPrintingCurrentX; } /*! \brief sets the property gridPrintingCurrentY to the specified \a __value. \details Description of the parameter gridPrintingCurrentY is:
\copydoc gridPrintingCurrentY
\see gridPrintingCurrentY for more information */ - inline virtual void set_gridPrintingCurrentY(size_t __value) + inline virtual void setGridPrintingCurrentY(size_t __value) { this->gridPrintingCurrentY = __value; } /*! \brief returns the property gridPrintingCurrentY. \details Description of the parameter gridPrintingCurrentY is:
\copydoc gridPrintingCurrentY
\see gridPrintingCurrentY for more information */ - inline virtual size_t get_gridPrintingCurrentY() const + inline virtual size_t getGridPrintingCurrentY() const { return this->gridPrintingCurrentY; } /*! \brief sets the property currentSaveDirectory to the specified \a __value. \details Description of the parameter currentSaveDirectory is:
\copydoc currentSaveDirectory
\see currentSaveDirectory for more information */ - inline virtual void set_currentSaveDirectory(const QString & __value) + inline virtual void setCurrentSaveDirectory(const QString & __value) { this->currentSaveDirectory = __value; } /*! \brief returns the property currentSaveDirectory. \details Description of the parameter currentSaveDirectory is:
\copydoc currentSaveDirectory
\see currentSaveDirectory for more information */ - inline virtual QString get_currentSaveDirectory() const + inline virtual QString getCurrentSaveDirectory() const { return this->currentSaveDirectory; } /*! \brief sets the property currentFileFormat to the specified \a __value. \details Description of the parameter currentFileFormat is:
\copydoc currentFileFormat
\see currentFileFormat for more information */ - inline virtual void set_currentFileFormat(const QString & __value) + inline virtual void setCurrentFileFormat(const QString & __value) { this->currentFileFormat = __value; } /*! \brief returns the property currentFileFormat. \details Description of the parameter currentFileFormat is:
\copydoc currentFileFormat
\see currentFileFormat for more information */ - inline virtual QString get_currentFileFormat() const + inline virtual QString getCurrentFileFormat() const { return this->currentFileFormat; } /*! \brief sets the property CSVdecimalSeparator to the specified \a __value. \details Description of the parameter CSVdecimalSeparator is:
\copydoc CSVdecimalSeparator
\see CSVdecimalSeparator for more information */ - inline virtual void set_CSVdecimalSeparator(const QString & __value) + inline virtual void setCSVdecimalSeparator(const QString & __value) { this->CSVdecimalSeparator = __value; } /*! \brief returns the property CSVdecimalSeparator. \details Description of the parameter CSVdecimalSeparator is:
\copydoc CSVdecimalSeparator
\see CSVdecimalSeparator for more information */ - inline virtual QString get_CSVdecimalSeparator() const + inline virtual QString getCSVdecimalSeparator() const { return this->CSVdecimalSeparator; } /*! \brief sets the property CSVcommentInitializer to the specified \a __value. \details Description of the parameter CSVcommentInitializer is:
\copydoc CSVcommentInitializer
\see CSVcommentInitializer for more information */ - inline virtual void set_CSVcommentInitializer(const QString & __value) + inline virtual void setCSVcommentInitializer(const QString & __value) { this->CSVcommentInitializer = __value; } /*! \brief returns the property CSVcommentInitializer. \details Description of the parameter CSVcommentInitializer is:
\copydoc CSVcommentInitializer
\see CSVcommentInitializer for more information */ - inline virtual QString get_CSVcommentInitializer() const + inline virtual QString getCSVcommentInitializer() const { return this->CSVcommentInitializer; } /*! \brief returns the property iplotBorderTop. \details Description of the parameter iplotBorderTop is:
\copydoc iplotBorderTop
. \see iplotBorderTop for more information */ - inline int get_iplotBorderTop() const { return this->iplotBorderTop; } + inline int getInternalPlotBorderTop() const { return this->iplotBorderTop; } /*! \brief returns the property iplotBorderLeft. \details Description of the parameter iplotBorderLeft is:
\copydoc iplotBorderLeft
. \see iplotBorderLeft for more information */ - inline int get_iplotBorderLeft() const { return this->iplotBorderLeft; } + inline int getInternalPlotBorderLeft() const { return this->iplotBorderLeft; } /*! \brief returns the property iplotBorderBottom. \details Description of the parameter iplotBorderBottom is:
\copydoc iplotBorderBottom
. \see iplotBorderBottom for more information */ - inline int get_iplotBorderBottom() const { return this->iplotBorderBottom; } + inline int getInternalPlotBorderBottom() const { return this->iplotBorderBottom; } /*! \brief returns the property iplotBorderRight. \details Description of the parameter iplotBorderRight is:
\copydoc iplotBorderRight
. \see iplotBorderRight for more information */ - inline int get_iplotBorderRight() const { return this->iplotBorderRight; } + inline int getInternalPlotBorderRight() const { return this->iplotBorderRight; } /*! \brief returns the property plotWidth. \details Description of the parameter plotWidth is:
\copydoc plotWidth
. \see plotWidth for more information */ - inline int get_plotWidth() const { return this->plotWidth; } + inline int getPlotWidth() const { return this->plotWidth; } /*! \brief returns the property plotHeight. \details Description of the parameter plotHeight is:
\copydoc plotHeight
. \see plotHeight for more information */ - inline int get_plotHeight() const { return this->plotHeight; } + inline int getPlotHeight() const { return this->plotHeight; } /** \brief returns the internal JKQTMathText, used to render text with LaTeX markup */ - inline JKQTMathText* get_mathText() { return &mathText; } + inline JKQTMathText* getMathText() { return &mathText; } /** \brief returns the internal JKQTMathText, used to render text with LaTeX markup */ - inline const JKQTMathText* get_mathText() const { return &mathText; } + inline const JKQTMathText* getMathText() const { return &mathText; } /** \brief returns the x-axis objet of the plot */ - inline JKQTPHorizontalAxis* get_xAxis() { return xAxis; } + inline JKQTPHorizontalAxis* getXAxis() { return xAxis; } /** \brief returns the y-axis objet of the plot */ - inline JKQTPVerticalAxis* get_yAxis() { return yAxis; } + inline JKQTPVerticalAxis* getYAxis() { return yAxis; } /** \brief returns the x-axis objet of the plot */ - inline const JKQTPHorizontalAxis* get_xAxis() const { return xAxis; } + inline const JKQTPHorizontalAxis* getXAxis() const { return xAxis; } /** \brief returns the y-axis objet of the plot */ - inline const JKQTPVerticalAxis* get_yAxis() const { return yAxis; } + inline const JKQTPVerticalAxis* getYAxis() const { return yAxis; } /*! \brief returns the property actSavePlot. \details Description of the parameter actSavePlot is:
\copydoc actSavePlot
. \see actSavePlot for more information */ - inline QAction* get_actSavePlot() const { return this->actSavePlot; } + inline QAction* getActionSavePlot() const { return this->actSavePlot; } /*! \brief returns the property actSaveData. \details Description of the parameter actSaveData is:
\copydoc actSaveData
. \see actSaveData for more information */ - inline QAction* get_actSaveData() const { return this->actSaveData; } + inline QAction* getActionSaveData() const { return this->actSaveData; } /*! \brief returns the property actCopyData. \details Description of the parameter actCopyData is:
\copydoc actCopyData
. \see actCopyData for more information */ - inline QAction* get_actCopyData() const { return this->actCopyData; } + inline QAction* getActionCopyData() const { return this->actCopyData; } /*! \brief returns the property actCopyPixelImage. \details Description of the parameter actCopyPixelImage is:
\copydoc actCopyPixelImage
. \see actCopyPixelImage for more information */ - inline QAction* get_actCopyPixelImage() const { return this->actCopyPixelImage; } + inline QAction* getActionCopyPixelImage() const { return this->actCopyPixelImage; } /*! \brief returns the property actCopyMatlab. \details Description of the parameter actCopyMatlab is:
\copydoc actCopyMatlab
. \see actCopyMatlab for more information */ - inline QAction* get_actCopyMatlab() const { return this->actCopyMatlab; } + inline QAction* getActionCopyMatlab() const { return this->actCopyMatlab; } /*! \brief returns the property actSavePDF. \details Description of the parameter actSavePDF is:
\copydoc actSavePDF
. \see actSavePDF for more information */ - inline QAction* get_actSavePDF() const { return this->actSavePDF; } + inline QAction* getActionSavePDF() const { return this->actSavePDF; } #if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0)) /*! \brief returns the property actSavePS. \details Description of the parameter actSavePS is:
\copydoc actSavePS
. \see actSavePS for more information */ - inline QAction* get_actSavePS() const { return this->actSavePS; } + inline QAction* getActionSavePS() const { return this->actSavePS; } #endif /*! \brief returns the property actSavePix. \details Description of the parameter actSavePix is:
\copydoc actSavePix
. \see actSavePix for more information */ - inline QAction* get_actSavePix() const { return this->actSavePix; } + inline QAction* getActionSavePix() const { return this->actSavePix; } /*! \brief returns the property actSaveSVG. \details Description of the parameter actSaveSVG is:
\copydoc actSaveSVG
. \see actSaveSVG for more information */ - inline QAction* get_actSaveSVG() const { return this->actSaveSVG; } + inline QAction* getActionSaveSVG() const { return this->actSaveSVG; } /*! \brief returns the property actPrint. \details Description of the parameter actPrint is:
\copydoc actPrint
. \see actPrint for more information */ - inline QAction* get_actPrint() const { return this->actPrint; } + inline QAction* getActionPrint() const { return this->actPrint; } /*! \brief returns the property actSaveCSV. \details Description of the parameter actSaveCSV is:
\copydoc actSaveCSV
. \see actSaveCSV for more information */ - inline QAction* get_actSaveCSV() const { return this->actSaveCSV; } + inline QAction* getActionSaveCSV() const { return this->actSaveCSV; } /*! \brief returns the property actZoomAll. \details Description of the parameter actZoomAll is:
\copydoc actZoomAll
. \see actZoomAll for more information */ - inline QAction* get_actZoomAll() const { return this->actZoomAll; } + inline QAction* getActionZoomAll() const { return this->actZoomAll; } /*! \brief returns the property actZoomIn. \details Description of the parameter actZoomIn is:
\copydoc actZoomIn
. \see actZoomIn for more information */ - inline QAction* get_actZoomIn() const { return this->actZoomIn; } + inline QAction* getActionZoomIn() const { return this->actZoomIn; } /*! \brief returns the property actZoomOut. \details Description of the parameter actZoomOut is:
\copydoc actZoomOut
. \see actZoomOut for more information */ - inline QAction* get_actZoomOut() const { return this->actZoomOut; } + inline QAction* getActionZoomOut() const { return this->actZoomOut; } /*! \brief returns the property actShowPlotData. \details Description of the parameter actShowPlotData is:
\copydoc actShowPlotData
. \see actShowPlotData for more information */ - inline QAction* get_actShowPlotData() const { return this->actShowPlotData; } + inline QAction* getActionShowPlotData() const { return this->actShowPlotData; } /*! \brief returns the property lstAdditionalPlotterActions. \details Description of the parameter lstAdditionalPlotterActions is:
\copydoc lstAdditionalPlotterActions
. \see lstAdditionalPlotterActions for more information */ - inline AdditionalActionsMap get_lstAdditionalPlotterActions() const { return this->lstAdditionalPlotterActions; } + inline AdditionalActionsMap getLstAdditionalPlotterActions() const { return this->lstAdditionalPlotterActions; } /** \brief this function registers additional actions to lstAdditionalPlotterActions, which are displayed in the context-menu */ void registerAdditionalAction(const QString& key, QAction* act); void deregisterAdditionalAction(QAction* act); /*! \brief returns the property masterSynchronizeWidth. \details Description of the parameter masterSynchronizeWidth is:
\copydoc masterSynchronizeWidth
. \see masterSynchronizeWidth for more information */ - inline bool get_masterSynchronizeWidth() const { return this->masterSynchronizeWidth; } + inline bool getMasterSynchronizeWidth() const { return this->masterSynchronizeWidth; } /*! \brief returns the property masterSynchronizeHeight. \details Description of the parameter masterSynchronizeHeight is:
\copydoc masterSynchronizeHeight
. \see masterSynchronizeHeight for more information */ - inline bool get_masterSynchronizeHeight() const { return this->masterSynchronizeHeight; } + inline bool getMasterSynchronizeHeight() const { return this->masterSynchronizeHeight; } /*! \brief sets the property def_backgroundColor to the specified \a __value. \details Description of the parameter def_backgroundColor is:
\copydoc def_backgroundColor
\see def_backgroundColor for more information */ - inline virtual void set_def_backgroundColor(const QColor & __value) + inline virtual void setDefaultBackgroundColor(const QColor & __value) { this->def_backgroundColor = __value; } /*! \brief sets the property def_plotBackgroundColor to the specified \a __value. \details Description of the parameter def_plotBackgroundColor is:
\copydoc def_plotBackgroundColor
\see def_plotBackgroundColor for more information */ - inline virtual void set_def_plotBackgroundColor(const QColor & __value) + inline virtual void setDefaultPlotBackgroundColor(const QColor & __value) { this->def_plotBackgroundColor = __value; } @@ -1902,35 +1932,35 @@ class LIB_EXPORT JKQTBasePlotter: public QObject { /*! \brief sets the property fontSizePrintMultiplier to the specified \a __value. \details Description of the parameter fontSizePrintMultiplier is:
\copydoc fontSizePrintMultiplier
\see fontSizePrintMultiplier for more information */ - inline virtual void set_fontSizePrintMultiplier(double __value) + inline virtual void setFontSizePrintMultiplier(double __value) { this->fontSizePrintMultiplier = __value; } /*! \brief returns the property fontSizePrintMultiplier. \details Description of the parameter fontSizePrintMultiplier is:
\copydoc fontSizePrintMultiplier
\see fontSizePrintMultiplier for more information */ - inline virtual double get_fontSizePrintMultiplier() const + inline virtual double getFontSizePrintMultiplier() const { return this->fontSizePrintMultiplier; } /*! \brief sets the property lineWidthPrintMultiplier to the specified \a __value. \details Description of the parameter lineWidthPrintMultiplier is:
\copydoc lineWidthPrintMultiplier
\see lineWidthPrintMultiplier for more information */ - inline virtual void set_lineWidthPrintMultiplier(double __value) + inline virtual void setLineWidthPrintMultiplier(double __value) { this->lineWidthPrintMultiplier = __value; } /*! \brief returns the property lineWidthPrintMultiplier. \details Description of the parameter lineWidthPrintMultiplier is:
\copydoc lineWidthPrintMultiplier
\see lineWidthPrintMultiplier for more information */ - inline virtual double get_lineWidthPrintMultiplier() const + inline virtual double getLineWidthPrintMultiplier() const { return this->lineWidthPrintMultiplier; } /*! \brief returns the property fontSizeMultiplier. \details Description of the parameter fontSizeMultiplier is:
\copydoc fontSizeMultiplier
. \see fontSizeMultiplier for more information */ - inline double get_fontSizeMultiplier() const { return this->fontSizeMultiplier; } + inline double getFontSizeMultiplier() const { return this->fontSizeMultiplier; } /*! \brief returns the property lineWidthMultiplier. \details Description of the parameter lineWidthMultiplier is:
\copydoc lineWidthMultiplier
. \see lineWidthMultiplier for more information */ - inline double get_lineWidthMultiplier() const { return this->lineWidthMultiplier; } + inline double getLineWidthMultiplier() const { return this->lineWidthMultiplier; } /** \brief returns description of i'th graph */ @@ -1981,8 +2011,8 @@ class LIB_EXPORT JKQTBasePlotter: public QObject { * \param title a title for this specific graph which can be displayed in the key * \param graphStyle the way how to plot the graph * - * Both point to columns in the datastore explained in the JKQTPlotterBase class. The plotWidth, color, pen style ... - * will be extracted from the automatic plot style creation mechanism implemented in JKQTPlotterBase::getNextStyle(). + * Both point to columns in the datastore explained in the JKQTBasePlotter class. The plotWidth, color, pen style ... + * will be extracted from the automatic plot style creation mechanism implemented in JKQTBasePlotter::getNextStyle(). * If you want to change them either use another overloaded version of addGraph(), or use getGraph() and setGraph(): * \code * size_t i=addGraph(0,1,"graph1"); @@ -2004,7 +2034,7 @@ class LIB_EXPORT JKQTBasePlotter: public QObject { * \param width width (in pixel) of the graph * \param penstyle the drawing style (solid, dashed ...) of the graph lines. * - * Both point to columns in the datastore explained in the JKQTPlotterBase class. + * Both point to columns in the datastore explained in the JKQTBasePlotter class. * The symbolSize is set to 10 and no error information is expected. */ size_t addGraph(size_t xColumn, size_t yColumn, QString title, JKQTPGraphPlotstyle graphStyle, QColor color, JKQTPGraphSymbols symbol=JKQTPCross, Qt::PenStyle penstyle=Qt::SolidLine, double width=2); @@ -2019,7 +2049,7 @@ class LIB_EXPORT JKQTBasePlotter: public QObject { * \param graphStyle the way how to plot the graph * \param errorStyle the drawing style (bars, lines ...) of the errors. * - * Both point to columns in the datastore explained in the JKQTPlotterBase class. + * Both point to columns in the datastore explained in the JKQTBasePlotter class. * The symbolSize is set to 10 and no error information is expected. */ size_t addGraphWithXError(size_t xColumn, size_t yColumn, size_t xErrorColumn, QString title, JKQTPGraphPlotstyle graphStyle=JKQTPPoints, JKQTPErrorPlotstyle errorStyle=JKQTPErrorBars); @@ -2034,7 +2064,7 @@ class LIB_EXPORT JKQTBasePlotter: public QObject { * \param graphStyle the way how to plot the graph * \param errorStyle the drawing style (bars, lines ...) of the errors. * - * Both point to columns in the datastore explained in the JKQTPlotterBase class. + * Both point to columns in the datastore explained in the JKQTBasePlotter class. * The symbolSize is set to 10 and no error information is expected. */ size_t addGraphWithYError(size_t xColumn, size_t yColumn, size_t yErrorColumn, QString title, JKQTPGraphPlotstyle graphStyle=JKQTPPoints, JKQTPErrorPlotstyle errorStyle=JKQTPErrorBars); @@ -2049,7 +2079,7 @@ class LIB_EXPORT JKQTBasePlotter: public QObject { * \param title a title for this specific graph which can be displayed in the key * \param graphStyle the way how to plot the graph * - * Both point to columns in the datastore explained in the JKQTPlotterBase class. + * Both point to columns in the datastore explained in the JKQTBasePlotter class. * The symbolSize is set to 10 and no error information is expected. The errorStyle is set to JKQTPErrorBars * for both directions. */ @@ -2207,25 +2237,6 @@ class LIB_EXPORT JKQTBasePlotter: public QObject { */ static void setDefaultJKQTBasePrinterUserSettings(QString userSettigsFilename, QString userSettigsPrefix); - /** \brief Service from this class to implement a special QPaintDevice as a plugin, that can be registered to JKQTBasePlotter/JKQTPlotter - * and then be used to export graphics, use registerPaintDeviceAdapter() to register such a plass */ - class LIB_EXPORT JKQTPPaintDeviceAdapter { - public: - virtual ~JKQTPPaintDeviceAdapter() {} - virtual QString getFilter() const=0; - virtual QString getFormatName() const=0; - virtual QString getFormatID() const=0; - virtual QStringList getFileExtension() const=0; - virtual bool getSetAbsolutePaperSize() const=0; - virtual double getPrintSizeXInMM() const =0; - virtual double getPrintSizeYInMM() const =0; - virtual bool isPrinter() const=0; - virtual bool useLatexParser() const; - /** \brief create a paint device with a given size in pt */ - virtual QPaintDevice* createPaintdevice(const QString& filename, int widthPix, int heightPix) const=0; - /** \brief create a paint device with a given size in millimeters ... the default implementation call createPaintdevice(), assuming the standard logical resolution of the desktop!!!) */ - virtual QPaintDevice* createPaintdeviceMM(const QString& filename, double widthMM, double heightMM) const; - }; /** \brief register a user-defined QPaintDevice (with factory JKQTPPaintDeviceAdapter) as a plugin to JKQTBasePlotter/JKQTPlotter, * which will use it to export graphics */ @@ -2234,13 +2245,7 @@ class LIB_EXPORT JKQTBasePlotter: public QObject { static void deregisterPaintDeviceAdapter(JKQTPPaintDeviceAdapter* adapter); - /** \brief virtual base-class for exporter classes that can be used to save data inot a file */ - class LIB_EXPORT JKQTPSaveDataAdapter { - public: - virtual ~JKQTPSaveDataAdapter() ; - virtual QString getFilter() const=0; - virtual void saveJKQTPData(const QString& filename, const QList >& data, const QStringList& columnNames) const=0; - }; + /** \brief register a JKQTPSaveDataAdapter with JKQTPlotter/JKQTBasePlotter that can be used to export data from the internal datastore into a file */ static bool registerSaveDataAdapter(JKQTPSaveDataAdapter* adapter); diff --git a/lib/jkqtplotter/jkqtpdatastorage.h b/lib/jkqtplotter/jkqtpdatastorage.h index 3e1f9007c0..66f9893b3c 100644 --- a/lib/jkqtplotter/jkqtpdatastorage.h +++ b/lib/jkqtplotter/jkqtpdatastorage.h @@ -86,7 +86,7 @@ enum JKQTPDatastoreItemFormat { JKQTPMatrixRow /*!< \brief a 1D vector of double that represents a number of rows (C standard representation of matrices). The data is stored row after row.*/ }; -/** \brief This class manages chunks of memory that are used for column data in JKQTPlotterBase descendents +/** \brief This class manages chunks of memory that are used for column data in JKQTBasePlotter descendents * \ingroup jkqtpdatastorage * * This class manages a list if JKQTPDatastoreItem onjects that may each contain a chunk of memory, containig diff --git a/lib/jkqtplotter/jkqtpelementsoverlay.cpp b/lib/jkqtplotter/jkqtpelementsoverlay.cpp index d2570eef2a..e928468579 100644 --- a/lib/jkqtplotter/jkqtpelementsoverlay.cpp +++ b/lib/jkqtplotter/jkqtpelementsoverlay.cpp @@ -143,9 +143,9 @@ void JKQTPOverlayVerticalLine::draw(JKQTPEnhancedPainter &painter) { if (!text.isEmpty()) { //JKQTMathText mt(this); - JKQTMathText* mt=parent->get_mathText(); - mt->set_fontSize(fontSize); - mt->set_fontColor(color); + JKQTMathText* mt=parent->getMathText(); + mt->setFontSize(fontSize); + mt->setFontColor(color); #ifdef USE_XITS_FONTS mt->useXITS(); #endif @@ -205,9 +205,9 @@ void JKQTPOverlayVerticalRange::draw(JKQTPEnhancedPainter &painter) { if (!text.isEmpty()) { //JKQTMathText mt(this); - JKQTMathText* mt=parent->get_mathText(); - mt->set_fontSize(fontSize); - mt->set_fontColor(color); + JKQTMathText* mt=parent->getMathText(); + mt->setFontSize(fontSize); + mt->setFontColor(color); #ifdef USE_XITS_FONTS mt->useXITS(); #endif diff --git a/lib/jkqtplotter/jkqtpelementsoverlay.h b/lib/jkqtplotter/jkqtpelementsoverlay.h index 5fc04fb042..99a05e9f40 100644 --- a/lib/jkqtplotter/jkqtpelementsoverlay.h +++ b/lib/jkqtplotter/jkqtpelementsoverlay.h @@ -86,14 +86,14 @@ class LIB_EXPORT JKQTPOverlayElement : public QObject { /*! \brief sets the property lineStyle to the specified \a __value. \details Description of the parameter lineStyle is:
\copydoc lineStyle
\see lineStyle for more information */ - inline virtual void set_lineStyle(const Qt::PenStyle & __value) + inline virtual void setLineStyle(const Qt::PenStyle & __value) { this->lineStyle = __value; } /*! \brief returns the property lineStyle. \details Description of the parameter lineStyle is:
\copydoc lineStyle
\see lineStyle for more information */ - inline virtual Qt::PenStyle get_lineStyle() const + inline virtual Qt::PenStyle getLineStyle() const { return this->lineStyle; } @@ -114,14 +114,14 @@ class LIB_EXPORT JKQTPOverlayElement : public QObject { /*! \brief sets the property lineWidth to the specified \a __value. \details Description of the parameter lineWidth is:
\copydoc lineWidth
\see lineWidth for more information */ - inline virtual void set_lineWidth(double __value) + inline virtual void setLineWidth(double __value) { this->lineWidth = __value; } /*! \brief returns the property lineWidth. \details Description of the parameter lineWidth is:
\copydoc lineWidth
\see lineWidth for more information */ - inline virtual double get_lineWidth() const + inline virtual double getLineWidth() const { return this->lineWidth; } @@ -142,28 +142,28 @@ class LIB_EXPORT JKQTPOverlayElement : public QObject { /*! \brief sets the property fontName to the specified \a __value. \details Description of the parameter fontName is:
\copydoc fontName
\see fontName for more information */ - inline virtual void set_fontName(const QString & __value) + inline virtual void setFontName(const QString & __value) { this->fontName = __value; } /*! \brief returns the property fontName. \details Description of the parameter fontName is:
\copydoc fontName
\see fontName for more information */ - inline virtual QString get_fontName() const + inline virtual QString getFontName() const { return this->fontName; } /*! \brief sets the property fontSize to the specified \a __value. \details Description of the parameter fontSize is:
\copydoc fontSize
\see fontSize for more information */ - inline virtual void set_fontSize(double __value) + inline virtual void setFontSize(double __value) { this->fontSize = __value; } /*! \brief returns the property fontSize. \details Description of the parameter fontSize is:
\copydoc fontSize
\see fontSize for more information */ - inline virtual double get_fontSize() const + inline virtual double getFontSize() const { return this->fontSize; } diff --git a/lib/jkqtplotter/jkqtpgraphs.cpp b/lib/jkqtplotter/jkqtpgraphs.cpp index 10a048a729..8d2631a343 100644 --- a/lib/jkqtplotter/jkqtpgraphs.cpp +++ b/lib/jkqtplotter/jkqtpgraphs.cpp @@ -107,7 +107,7 @@ void JKQTPXYLineGraph::draw(JKQTPEnhancedPainter& painter) { QPen p=painter.pen(); p.setColor(color); - p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, lineWidth*parent->get_lineWidthMultiplier()))); + p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, lineWidth*parent->getLineWidthMultiplier()))); p.setStyle(style); p.setJoinStyle(Qt::RoundJoin); p.setCapStyle(Qt::RoundCap); @@ -157,9 +157,9 @@ void JKQTPXYLineGraph::draw(JKQTPEnhancedPainter& painter) { QColor symbFillColor=fillColor;// symbColor.lighter(); if (drawSelectionLine && symbol!=JKQTPNoSymbol) { - JKQTPPlotSymbol(painter, x, y, JKQTPFilledCircle, parent->pt2px(painter, symbolSize*1.5), parent->pt2px(painter, symbolWidth*parent->get_lineWidthMultiplier()), penSelection.color(), penSelection.color()); + JKQTPPlotSymbol(painter, x, y, JKQTPFilledCircle, parent->pt2px(painter, symbolSize*1.5), parent->pt2px(painter, symbolWidth*parent->getLineWidthMultiplier()), penSelection.color(), penSelection.color()); } - JKQTPPlotSymbol(painter, x, y, symbol, parent->pt2px(painter, symbolSize), parent->pt2px(painter, symbolWidth*parent->get_lineWidthMultiplier()), symbColor, symbFillColor); + JKQTPPlotSymbol(painter, x, y, symbol, parent->pt2px(painter, symbolSize), parent->pt2px(painter, symbolWidth*parent->getLineWidthMultiplier()), symbColor, symbFillColor); /*if (drawLine && first) { double xl1=xold; double yl1=yold; @@ -200,9 +200,9 @@ void JKQTPXYLineGraph::drawKeyMarker(JKQTPEnhancedPainter& painter, QRectF& rect const double maxSize=qMax(rect.width(), rect.height()); double symbolSize=parent->pt2px(painter, this->symbolSize); if (symbolSize>minSize*0.9) symbolSize=minSize*0.9; - double symbolWidth=parent->pt2px(painter, this->symbolWidth*parent->get_lineWidthMultiplier()); + double symbolWidth=parent->pt2px(painter, this->symbolWidth*parent->getLineWidthMultiplier()); if (symbolWidth>0.3*symbolSize) symbolWidth=0.3*symbolSize; - double lineWidth=parent->pt2px(painter, this->lineWidth*parent->get_lineWidthMultiplier()); + double lineWidth=parent->pt2px(painter, this->lineWidth*parent->getLineWidthMultiplier()); if (lineWidth>0.5*maxSize) lineWidth=0.5*maxSize; painter.save(); @@ -435,7 +435,7 @@ void JKQTPStepHorizontalGraph::draw(JKQTPEnhancedPainter& painter) { QPen p=painter.pen(); p.setColor(color); - p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, lineWidth*parent->get_lineWidthMultiplier()))); + p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, lineWidth*parent->getLineWidthMultiplier()))); p.setStyle(style); p.setJoinStyle(Qt::RoundJoin); p.setJoinStyle(Qt::RoundJoin); @@ -471,9 +471,9 @@ void JKQTPStepHorizontalGraph::draw(JKQTPEnhancedPainter& painter) { // double xstart=-1; // double ystart=-1; //double x0=transformX(0); - //if (parent->get_xAxis()->isLogAxis()) x0=transformX(parent->get_xAxis()->getMin()); + //if (parent->getXAxis()->isLogAxis()) x0=transformX(parent->getXAxis()->getMin()); double y0=transformY(0); - if (parent->get_yAxis()->isLogAxis()) y0=transformY(parent->get_yAxis()->getMin()); + if (parent->getYAxis()->isLogAxis()) y0=transformY(parent->getYAxis()->getMin()); bool subsequentItem=false; intSortData(); for (int iii=imin; iiipt2px(painter, lineWidth*parent->get_lineWidthMultiplier()))); + p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, lineWidth*parent->getLineWidthMultiplier()))); p.setStyle(style); p.setJoinStyle(Qt::RoundJoin); p.setCapStyle(Qt::RoundCap); @@ -614,9 +614,9 @@ void JKQTPStepVerticalGraph::draw(JKQTPEnhancedPainter& painter) { double xold=-1; double yold=-1; double x0=transformX(0); - if (parent->get_xAxis()->isLogAxis()) x0=transformX(parent->get_xAxis()->getMin()); + if (parent->getXAxis()->isLogAxis()) x0=transformX(parent->getXAxis()->getMin()); //double y0=transformY(0); - //if (parent->get_yAxis()->isLogAxis()) y0=transformY(parent->get_yAxis()->getMin()); + //if (parent->getYAxis()->isLogAxis()) y0=transformY(parent->getYAxis()->getMin()); bool first=false; intSortData(); for (int iii=imin; iiiget_yAxis()->getMin()); - double sma=transformY(parent->get_yAxis()->getMax()); - double mi=transformX(parent->get_xAxis()->getMin()); - double ma=transformX(parent->get_xAxis()->getMax()); + double smi=transformY(parent->getYAxis()->getMin()); + double sma=transformY(parent->getYAxis()->getMax()); + double mi=transformX(parent->getXAxis()->getMin()); + double ma=transformX(parent->getXAxis()->getMax()); if (!unlimitedSizeMin) mi=transformX(sizeMin); if (!unlimitedSizeMax) ma=transformX(sizeMax); //std::cout<<"hor: rangeMin="< "<pt2px(painter, lineWidth*parent->get_lineWidthMultiplier()))); + p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, lineWidth*parent->getLineWidthMultiplier()))); QBrush nb(Qt::NoBrush); QBrush b=painter.brush(); b.setColor(fillColor); @@ -828,7 +828,7 @@ void JKQTPHorizontalRange::draw(JKQTPEnhancedPainter& painter) { QPen p=painter.pen(); p.setColor(centerColor); p.setStyle(centerStyle); - p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, centerLineWidth*parent->get_lineWidthMultiplier()))); + p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, centerLineWidth*parent->getLineWidthMultiplier()))); painter.setPen(p); painter.drawLine(QLineF(mi, c, ma, c)); } @@ -921,10 +921,10 @@ void JKQTPVerticalRange::draw(JKQTPEnhancedPainter& painter) { double c=transformX(rangeCenter); double cmi=transformX(rangeMin); double cma=transformX(rangeMax); - double mi=transformY(parent->get_yAxis()->getMin()); - double ma=transformY(parent->get_yAxis()->getMax()); - double smi=transformX(parent->get_xAxis()->getMin()); - double sma=transformX(parent->get_xAxis()->getMax()); + double mi=transformY(parent->getYAxis()->getMin()); + double ma=transformY(parent->getYAxis()->getMax()); + double smi=transformX(parent->getXAxis()->getMin()); + double sma=transformX(parent->getXAxis()->getMax()); if (!unlimitedSizeMin) mi=transformY(sizeMin); if (!unlimitedSizeMax) ma=transformY(sizeMax); painter.save(); @@ -933,7 +933,7 @@ void JKQTPVerticalRange::draw(JKQTPEnhancedPainter& painter) { QPen np(Qt::NoPen); p.setColor(color); p.setStyle(style); - p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, lineWidth*parent->get_lineWidthMultiplier()))); + p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, lineWidth*parent->getLineWidthMultiplier()))); QBrush nb(Qt::NoBrush); QBrush b=painter.brush(); b.setColor(fillColor); @@ -967,7 +967,7 @@ void JKQTPVerticalRange::draw(JKQTPEnhancedPainter& painter) { QPen p=painter.pen(); p.setColor(centerColor); p.setStyle(centerStyle); - p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, centerLineWidth*parent->get_lineWidthMultiplier()))); + p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, centerLineWidth*parent->getLineWidthMultiplier()))); painter.setPen(p); painter.drawLine(QLineF(c, mi, c, ma)); } @@ -1026,7 +1026,7 @@ bool JKQTPVerticalRange::getYMinMax(double &miny, double &maxy, double &smallest QPen JKQTPXYLineGraph::getLinePen(JKQTPEnhancedPainter& painter) const { QPen p; p.setColor(color); - p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH,parent->pt2px(painter, parent->get_lineWidthMultiplier()*lineWidth))); + p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH,parent->pt2px(painter, parent->getLineWidthMultiplier()*lineWidth))); p.setStyle(style); p.setJoinStyle(Qt::RoundJoin); p.setCapStyle(Qt::RoundCap); @@ -1036,7 +1036,7 @@ QPen JKQTPXYLineGraph::getLinePen(JKQTPEnhancedPainter& painter) const { QPen JKQTPXYLineGraph::getSymbolPen(JKQTPEnhancedPainter& painter) const { QPen p; p.setColor(color); - p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH,parent->pt2px(painter, parent->get_lineWidthMultiplier()*symbolWidth))); + p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH,parent->pt2px(painter, parent->getLineWidthMultiplier()*symbolWidth))); p.setStyle(style); p.setJoinStyle(Qt::RoundJoin); p.setCapStyle(Qt::RoundCap); @@ -1060,7 +1060,7 @@ QBrush JKQTPStepHorizontalGraph::getBrush(JKQTPEnhancedPainter& /*painter*/) con QPen JKQTPStepHorizontalGraph::getLinePen(JKQTPEnhancedPainter& painter) const { QPen p; p.setColor(color); - p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH,parent->pt2px(painter, parent->get_lineWidthMultiplier()*lineWidth))); + p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH,parent->pt2px(painter, parent->getLineWidthMultiplier()*lineWidth))); p.setStyle(style); p.setJoinStyle(Qt::RoundJoin); p.setCapStyle(Qt::RoundCap); @@ -1078,7 +1078,7 @@ QBrush JKQTPHorizontalRange::getBrush(JKQTPEnhancedPainter& /*painter*/ ) const QPen JKQTPHorizontalRange::getLinePen(JKQTPEnhancedPainter& painter) const { QPen p; p.setColor(color); - p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH,parent->pt2px(painter, parent->get_lineWidthMultiplier()*lineWidth))); + p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH,parent->pt2px(painter, parent->getLineWidthMultiplier()*lineWidth))); p.setStyle(style); p.setJoinStyle(Qt::RoundJoin); p.setCapStyle(Qt::RoundCap); @@ -1107,7 +1107,7 @@ JKQTPXYParametrizedScatterGraph::JKQTPXYParametrizedScatterGraph(JKQTBasePlotter JKQTPXYParametrizedScatterGraph::JKQTPXYParametrizedScatterGraph(JKQTPlotter *parent): JKQTPXYLineGraph(parent), - JKQTPColorPaletteTools(parent->get_plotter()) + JKQTPColorPaletteTools(parent->getPlotter()) { sizeColumn=-1; colorColumn=-1; @@ -1141,7 +1141,7 @@ void JKQTPXYParametrizedScatterGraph::draw(JKQTPEnhancedPainter &painter) QPen p=painter.pen(); p.setColor(color); - p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, lineWidth*parent->get_lineWidthMultiplier()))); + p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, lineWidth*parent->getLineWidthMultiplier()))); p.setStyle(style); p.setJoinStyle(Qt::RoundJoin); p.setJoinStyle(Qt::RoundJoin); @@ -1225,9 +1225,9 @@ void JKQTPXYParametrizedScatterGraph::draw(JKQTPEnhancedPainter &painter) } if (drawSelectionLine && symbol!=JKQTPNoSymbol && symbolColumn<0) { - JKQTPPlotSymbol(painter, x, y, JKQTPFilledCircle,symbSize, parent->pt2px(painter, symbolWidth*parent->get_lineWidthMultiplier()), penSelection.color(), penSelection.color()); + JKQTPPlotSymbol(painter, x, y, JKQTPFilledCircle,symbSize, parent->pt2px(painter, symbolWidth*parent->getLineWidthMultiplier()), penSelection.color(), penSelection.color()); } else { - JKQTPPlotSymbol(painter, x, y, getLocalSymbolType(i), symbSize, parent->pt2px(painter, symbolWidth*parent->get_lineWidthMultiplier()), symbColor, symbFillColor); + JKQTPPlotSymbol(painter, x, y, getLocalSymbolType(i), symbSize, parent->pt2px(painter, symbolWidth*parent->getLineWidthMultiplier()), symbColor, symbFillColor); } @@ -1312,9 +1312,9 @@ void JKQTPXYParametrizedScatterGraph::drawKeyMarker(JKQTPEnhancedPainter &painte symbol2=JKQTPFilledRect; } - double symbolWidth=parent->pt2px(painter, this->symbolWidth*0.7*parent->get_lineWidthMultiplier()); + double symbolWidth=parent->pt2px(painter, this->symbolWidth*0.7*parent->getLineWidthMultiplier()); if (symbolWidth>0.2*symbolSize) symbolWidth=0.3*symbolSize; - double lineWidth=parent->pt2px(painter, this->lineWidth*0.7*parent->get_lineWidthMultiplier()); + double lineWidth=parent->pt2px(painter, this->lineWidth*0.7*parent->getLineWidthMultiplier()); if (lineWidth>0.1*maxSize) lineWidth=0.1*maxSize; painter.save(); diff --git a/lib/jkqtplotter/jkqtpgraphs.h b/lib/jkqtplotter/jkqtpgraphs.h index 843f33ae50..723393b63b 100644 --- a/lib/jkqtplotter/jkqtpgraphs.h +++ b/lib/jkqtplotter/jkqtpgraphs.h @@ -111,14 +111,14 @@ class LIB_EXPORT JKQTPXYLineGraph: public JKQTPXYGraph { /*! \brief sets the property lineWidth to the specified \a __value. \details Description of the parameter lineWidth is:
\copydoc lineWidth
\see lineWidth for more information */ - inline virtual void set_lineWidth(double __value) + inline virtual void setLineWidth(double __value) { this->lineWidth = __value; } /*! \brief returns the property lineWidth. \details Description of the parameter lineWidth is:
\copydoc lineWidth
\see lineWidth for more information */ - inline virtual double get_lineWidth() const + inline virtual double getLineWidth() const { return this->lineWidth; } @@ -214,7 +214,7 @@ class LIB_EXPORT JKQTPXYLineGraph: public JKQTPXYGraph { /** \brief color for the shadow, or a lighter version of the line color, if transparent (default) */ QColor selectionLineColor; - /** \brief which plot style to use from the parent plotter (via JKQTPlotterBase::getPlotStyle() and JKQTPlotterBase::getNextStyle() ) */ + /** \brief which plot style to use from the parent plotter (via JKQTBasePlotter::getPlotStyle() and JKQTBasePlotter::getNextStyle() ) */ int parentPlotStyle; /** \brief color of the graph */ QColor color; @@ -327,21 +327,21 @@ class LIB_EXPORT JKQTPXYParametrizedScatterGraph: public JKQTPXYLineGraph, publi /*! \brief sets the property linewidthColumn to the specified \a __value. \details Description of the parameter linewidthColumn is:
\copydoc linewidthColumn
\see linewidthColumn for more information */ - inline virtual void set_linewidthColumn(int __value) + inline virtual void setLinewidthColumn(int __value) { this->linewidthColumn = __value; } /*! \brief returns the property linewidthColumn. \details Description of the parameter linewidthColumn is:
\copydoc linewidthColumn
\see linewidthColumn for more information */ - inline virtual int get_linewidthColumn() const + inline virtual int getLinewidthColumn() const { return this->linewidthColumn; } /*! \brief sets the property linewidthColumn to the specified \a __value, where __value is static_cast'ed from size_t to int. \details Description of the parameter linewidthColumn is:
\copydoc linewidthColumn
\see linewidthColumn for more information */ - inline virtual void set_linewidthColumn( size_t __value) { this->linewidthColumn = static_cast(__value); } + inline virtual void setLinewidthColumn( size_t __value) { this->linewidthColumn = static_cast(__value); } /*! \brief sets the property colorColumnContainsRGB to the specified \a __value. \details Description of the parameter colorColumnContainsRGB is:
\copydoc colorColumnContainsRGB
\see colorColumnContainsRGB for more information */ @@ -359,56 +359,56 @@ class LIB_EXPORT JKQTPXYParametrizedScatterGraph: public JKQTPXYLineGraph, publi /*! \brief sets the property gridModeForSymbolSize to the specified \a __value. \details Description of the parameter gridModeForSymbolSize is:
\copydoc gridModeForSymbolSize
\see gridModeForSymbolSize for more information */ - inline virtual void set_gridModeForSymbolSize(bool __value) + inline virtual void setGridModeForSymbolSize(bool __value) { this->gridModeForSymbolSize = __value; } /*! \brief returns the property gridModeForSymbolSize. \details Description of the parameter gridModeForSymbolSize is:
\copydoc gridModeForSymbolSize
\see gridModeForSymbolSize for more information */ - inline virtual bool get_gridModeForSymbolSize() const + inline virtual bool getGridModeForSymbolSize() const { return this->gridModeForSymbolSize; } /*! \brief sets the property gridDeltaX to the specified \a __value. \details Description of the parameter gridDeltaX is:
\copydoc gridDeltaX
\see gridDeltaX for more information */ - inline virtual void set_gridDeltaX(double __value) + inline virtual void setGridDeltaX(double __value) { this->gridDeltaX = __value; } /*! \brief returns the property gridDeltaX. \details Description of the parameter gridDeltaX is:
\copydoc gridDeltaX
\see gridDeltaX for more information */ - inline virtual double get_gridDeltaX() const + inline virtual double getGridDeltaX() const { return this->gridDeltaX; } /*! \brief sets the property gridDeltaY to the specified \a __value. \details Description of the parameter gridDeltaY is:
\copydoc gridDeltaY
\see gridDeltaY for more information */ - inline virtual void set_gridDeltaY(double __value) + inline virtual void setGridDeltaY(double __value) { this->gridDeltaY = __value; } /*! \brief returns the property gridDeltaY. \details Description of the parameter gridDeltaY is:
\copydoc gridDeltaY
\see gridDeltaY for more information */ - inline virtual double get_gridDeltaY() const + inline virtual double getGridDeltaY() const { return this->gridDeltaY; } /*! \brief sets the property gridSymbolFractionSize to the specified \a __value. \details Description of the parameter gridSymbolFractionSize is:
\copydoc gridSymbolFractionSize
\see gridSymbolFractionSize for more information */ - inline virtual void set_gridSymbolFractionSize(double __value) + inline virtual void setGridSymbolFractionSize(double __value) { this->gridSymbolFractionSize = __value; } /*! \brief returns the property gridSymbolFractionSize. \details Description of the parameter gridSymbolFractionSize is:
\copydoc gridSymbolFractionSize
\see gridSymbolFractionSize for more information */ - inline virtual double get_gridSymbolFractionSize() const + inline virtual double getGridSymbolFractionSize() const { return this->gridSymbolFractionSize; } @@ -643,14 +643,14 @@ class LIB_EXPORT JKQTPStepHorizontalGraph: public JKQTPXYGraph { /*! \brief sets the property lineWidth to the specified \a __value. \details Description of the parameter lineWidth is:
\copydoc lineWidth
\see lineWidth for more information */ - inline virtual void set_lineWidth(double __value) + inline virtual void setLineWidth(double __value) { this->lineWidth = __value; } /*! \brief returns the property lineWidth. \details Description of the parameter lineWidth is:
\copydoc lineWidth
\see lineWidth for more information */ - inline virtual double get_lineWidth() const + inline virtual double getLineWidth() const { return this->lineWidth; } @@ -714,7 +714,7 @@ class LIB_EXPORT JKQTPStepHorizontalGraph: public JKQTPXYGraph { /** \brief specifies whether the steps elongate to the left, the right, or are centered around the \f$ x_i \f$ values. */ JKQTPStepType stepType; - /** \brief which plot style to use from the parent plotter (via JKQTPlotterBase::getPlotStyle() and JKQTPlotterBase::getNextStyle() ) */ + /** \brief which plot style to use from the parent plotter (via JKQTBasePlotter::getPlotStyle() and JKQTBasePlotter::getNextStyle() ) */ int parentPlotStyle; QBrush getBrush(JKQTPEnhancedPainter& painter) const; @@ -854,14 +854,14 @@ class LIB_EXPORT JKQTPHorizontalRange: public JKQTPGraph { /*! \brief sets the property lineWidth to the specified \a __value. \details Description of the parameter lineWidth is:
\copydoc lineWidth
\see lineWidth for more information */ - inline virtual void set_lineWidth(double __value) + inline virtual void setLineWidth(double __value) { this->lineWidth = __value; } /*! \brief returns the property lineWidth. \details Description of the parameter lineWidth is:
\copydoc lineWidth
\see lineWidth for more information */ - inline virtual double get_lineWidth() const + inline virtual double getLineWidth() const { return this->lineWidth; } @@ -1009,14 +1009,14 @@ class LIB_EXPORT JKQTPHorizontalRange: public JKQTPGraph { /*! \brief sets the property plotCenterLine to the specified \a __value. \details Description of the parameter plotCenterLine is:
\copydoc plotCenterLine
\see plotCenterLine for more information */ - inline virtual void set_plotCenterLine(bool __value) + inline virtual void setPlotCenterLine(bool __value) { this->plotCenterLine = __value; } /*! \brief returns the property plotCenterLine. \details Description of the parameter plotCenterLine is:
\copydoc plotCenterLine
\see plotCenterLine for more information */ - inline virtual bool get_plotCenterLine() const + inline virtual bool getPlotCenterLine() const { return this->plotCenterLine; } @@ -1037,14 +1037,14 @@ class LIB_EXPORT JKQTPHorizontalRange: public JKQTPGraph { /*! \brief sets the property plotRange to the specified \a __value. \details Description of the parameter plotRange is:
\copydoc plotRange
\see plotRange for more information */ - inline virtual void set_plotRange(bool __value) + inline virtual void setPlotRange(bool __value) { this->plotRange = __value; } /*! \brief returns the property plotRange. \details Description of the parameter plotRange is:
\copydoc plotRange
\see plotRange for more information */ - inline virtual bool get_plotRange() const + inline virtual bool getPlotRange() const { return this->plotRange; } @@ -1065,14 +1065,14 @@ class LIB_EXPORT JKQTPHorizontalRange: public JKQTPGraph { /*! \brief sets the property plotRangeLines to the specified \a __value. \details Description of the parameter plotRangeLines is:
\copydoc plotRangeLines
\see plotRangeLines for more information */ - inline virtual void set_plotRangeLines(bool __value) + inline virtual void setPlotRangeLines(bool __value) { this->plotRangeLines = __value; } /*! \brief returns the property plotRangeLines. \details Description of the parameter plotRangeLines is:
\copydoc plotRangeLines
\see plotRangeLines for more information */ - inline virtual bool get_plotRangeLines() const + inline virtual bool getPlotRangeLines() const { return this->plotRangeLines; } @@ -1114,7 +1114,7 @@ class LIB_EXPORT JKQTPHorizontalRange: public JKQTPGraph { /** \brief fill style, if the curve should be filled */ Qt::BrushStyle fillStyle; - /** \brief which plot style to use from the parent plotter (via JKQTPlotterBase::getPlotStyle() and JKQTPlotterBase::getNextStyle() ) */ + /** \brief which plot style to use from the parent plotter (via JKQTBasePlotter::getPlotStyle() and JKQTBasePlotter::getNextStyle() ) */ int parentPlotStyle; QBrush getBrush(JKQTPEnhancedPainter& painter) const; diff --git a/lib/jkqtplotter/jkqtpgraphsbarchart.cpp b/lib/jkqtplotter/jkqtpgraphsbarchart.cpp index a34eaae2a4..ab2da48a0a 100644 --- a/lib/jkqtplotter/jkqtpgraphsbarchart.cpp +++ b/lib/jkqtplotter/jkqtpgraphsbarchart.cpp @@ -108,7 +108,7 @@ void JKQTPBarVerticalGraph::draw(JKQTPEnhancedPainter& painter) { QPen p=painter.pen(); p.setColor(color); - p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, lineWidth*parent->get_lineWidthMultiplier()))); + p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, lineWidth*parent->getLineWidthMultiplier()))); p.setStyle(style); p.setJoinStyle(Qt::RoundJoin); @@ -135,9 +135,9 @@ void JKQTPBarVerticalGraph::draw(JKQTPEnhancedPainter& painter) { painter.save(); // double x0=transformX(0); -// if (parent->get_xAxis()->isLogAxis()) x0=transformX(parent->get_xAxis()->getMin()); +// if (parent->getXAxis()->isLogAxis()) x0=transformX(parent->getXAxis()->getMin()); double y0=transformY(0); - if (parent->get_yAxis()->isLogAxis()) y0=transformY(parent->get_yAxis()->getMin()); + if (parent->getYAxis()->isLogAxis()) y0=transformY(parent->getYAxis()->getMin()); double delta=1; double deltap=0; double deltam=0; @@ -154,7 +154,7 @@ void JKQTPBarVerticalGraph::draw(JKQTPEnhancedPainter& painter) { if (hasStackPar) { double stackLastY=getParentStackedMax(i); const double yvold=yv; - yv0=transformY(stackLastY)-(get_lineWidth()); + yv0=transformY(stackLastY)-(getLineWidth()); yv=stackLastY+yvold; } if (sr<0 && lr<0) { // only one x-value @@ -376,7 +376,7 @@ void JKQTPBarHorizontalGraph::draw(JKQTPEnhancedPainter& painter) { QPen p=painter.pen(); p.setColor(color); - p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, lineWidth*parent->get_lineWidthMultiplier()))); + p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, lineWidth*parent->getLineWidthMultiplier()))); p.setStyle(style); p.setJoinStyle(Qt::RoundJoin); @@ -402,9 +402,9 @@ void JKQTPBarHorizontalGraph::draw(JKQTPEnhancedPainter& painter) { if (imax<0) imax=0; double x0=transformX(0); - if (parent->get_xAxis()->isLogAxis()) x0=transformX(parent->get_xAxis()->getMin()); + if (parent->getXAxis()->isLogAxis()) x0=transformX(parent->getXAxis()->getMin()); // double y0=transformY(0); -// if (parent->get_yAxis()->isLogAxis()) y0=transformY(parent->get_yAxis()->getMin()); +// if (parent->getYAxis()->isLogAxis()) y0=transformY(parent->getYAxis()->getMin()); double delta=1; double deltap=0; double deltam=0; @@ -422,7 +422,7 @@ void JKQTPBarHorizontalGraph::draw(JKQTPEnhancedPainter& painter) { if (hasStackPar) { double stackLastX=getParentStackedMax(i); const double xvold=xv; - xv0=transformX(stackLastX)+(get_lineWidth()); + xv0=transformX(stackLastX)+(getLineWidth()); xv=stackLastX+xvold; } @@ -594,7 +594,7 @@ QBrush JKQTPBarVerticalGraph::getBrush(JKQTPEnhancedPainter& /*painter*/) const QPen JKQTPBarVerticalGraph::getLinePen(JKQTPEnhancedPainter& painter) const { QPen p; p.setColor(color); - p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH,parent->pt2px(painter, parent->get_lineWidthMultiplier()*lineWidth))); + p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH,parent->pt2px(painter, parent->getLineWidthMultiplier()*lineWidth))); p.setStyle(style); p.setJoinStyle(Qt::RoundJoin); p.setCapStyle(Qt::RoundCap); diff --git a/lib/jkqtplotter/jkqtpgraphsbarchart.h b/lib/jkqtplotter/jkqtpgraphsbarchart.h index d9f8c76690..880bcf59fe 100644 --- a/lib/jkqtplotter/jkqtpgraphsbarchart.h +++ b/lib/jkqtplotter/jkqtpgraphsbarchart.h @@ -157,14 +157,14 @@ class LIB_EXPORT JKQTPBarVerticalGraph: public JKQTPXYGraph { /*! \brief sets the property lineWidth to the specified \a __value. \details Description of the parameter lineWidth is:
\copydoc lineWidth
\see lineWidth for more information */ - inline virtual void set_lineWidth(double __value) + inline virtual void setLineWidth(double __value) { this->lineWidth = __value; } /*! \brief returns the property lineWidth. \details Description of the parameter lineWidth is:
\copydoc lineWidth
\see lineWidth for more information */ - inline virtual double get_lineWidth() const + inline virtual double getLineWidth() const { return this->lineWidth; } @@ -240,7 +240,7 @@ class LIB_EXPORT JKQTPBarVerticalGraph: public JKQTPXYGraph { */ double baseline; - /** \brief which plot style to use from the parent plotter (via JKQTPlotterBase::getPlotStyle() and JKQTPlotterBase::getNextStyle() ) */ + /** \brief which plot style to use from the parent plotter (via JKQTBasePlotter::getPlotStyle() and JKQTBasePlotter::getNextStyle() ) */ int parentPlotStyle; diff --git a/lib/jkqtplotter/jkqtpgraphsbase.cpp b/lib/jkqtplotter/jkqtpgraphsbase.cpp index 6db403cacf..8128b54cbe 100644 --- a/lib/jkqtplotter/jkqtpgraphsbase.cpp +++ b/lib/jkqtplotter/jkqtpgraphsbase.cpp @@ -40,7 +40,7 @@ JKQTPPlotElement::JKQTPPlotElement(JKQTBasePlotter* parent): } JKQTPPlotElement::JKQTPPlotElement(JKQTPlotter *parent): - QObject(parent->get_plotter()) + QObject(parent->getPlotter()) { title=""; visible=true; @@ -72,7 +72,7 @@ JKQTPGraph::~JKQTPGraph() QImage JKQTPPlotElement::generateKeyMarker(QSize size) { QImage img(size.width(),size.height(),QImage::Format_ARGB32); - if (parent) img.fill(parent->get_keyBackgroundColor()); + if (parent) img.fill(parent->getKeyBackgroundColor()); { JKQTPEnhancedPainter painter(&img); painter.setRenderHint(QPainter::Antialiasing, true); @@ -96,7 +96,7 @@ void JKQTPPlotElement::setParent(JKQTBasePlotter* parent) { void JKQTPPlotElement::setParent(JKQTPlotter *parent) { - setParent(parent->get_plotter()); + setParent(parent->getPlotter()); } @@ -144,19 +144,19 @@ void JKQTPPlotElement::drawOutside(JKQTPEnhancedPainter& /*painter*/, QRect /*le } double JKQTPPlotElement::transformX(double x) const { - return parent->get_xAxis()->x2p(x); + return parent->getXAxis()->x2p(x); } double JKQTPPlotElement::transformY(double y) const { - return parent->get_yAxis()->x2p(y); + return parent->getYAxis()->x2p(y); } double JKQTPPlotElement::backtransformX(double x) const { - return parent->get_xAxis()->p2x(x); + return parent->getXAxis()->p2x(x); } double JKQTPPlotElement::backtransformY(double y) const { - return parent->get_yAxis()->p2x(y); + return parent->getYAxis()->p2x(y); } @@ -445,7 +445,7 @@ QPen JKQTPSingleColumnGraph::getLinePen(JKQTPEnhancedPainter& painter) const { QPen p; p.setColor(color); - p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH,parent->pt2px(painter, parent->get_lineWidthMultiplier()*lineWidth))); + p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH,parent->pt2px(painter, parent->getLineWidthMultiplier()*lineWidth))); p.setStyle(style); p.setJoinStyle(Qt::RoundJoin); p.setCapStyle(Qt::RoundCap); @@ -540,7 +540,7 @@ void JKQTPGraphErrors::intPlotXYErrorIndicators(JKQTPEnhancedPainter& painter, J b.setStyle(errorFillStyle); QPen p=painter.pen(); p.setColor(errorColor); - p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, errorWidth*parent->get_lineWidthMultiplier()))); + p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, errorWidth*parent->getLineWidthMultiplier()))); p.setStyle(errorStyle); p.setJoinStyle(Qt::RoundJoin); p.setCapStyle(Qt::RoundCap); diff --git a/lib/jkqtplotter/jkqtpgraphsbase.h b/lib/jkqtplotter/jkqtpgraphsbase.h index 7ab94eaabe..2ec295661d 100644 --- a/lib/jkqtplotter/jkqtpgraphsbase.h +++ b/lib/jkqtplotter/jkqtpgraphsbase.h @@ -200,7 +200,7 @@ class LIB_EXPORT JKQTPPlotElement: public QObject { /** \brief this virtual base class of the (data-column based) graphs, * which are part of a JKQTPlotter plot and which use the coordinate system - * of the JKQTPlotter (i.e. the two coordinate axes get_xAxis() and get_yAxis()) + * of the JKQTPlotter (i.e. the two coordinate axes getXAxis() and getYAxis()) * as basis for the graphs * \ingroup jkqtplotter_basegraphs * @@ -513,14 +513,14 @@ class LIB_EXPORT JKQTPSingleColumnGraph: public JKQTPGraph { /*! \brief sets the property lineWidth to the specified \a __value. \details Description of the parameter lineWidth is:
\copydoc lineWidth
\see lineWidth for more information */ - inline virtual void set_lineWidth(double __value) + inline virtual void setLineWidth(double __value) { this->lineWidth = __value; } /*! \brief returns the property lineWidth. \details Description of the parameter lineWidth is:
\copydoc lineWidth
\see lineWidth for more information */ - inline virtual double get_lineWidth() const + inline virtual double getLineWidth() const { return this->lineWidth; } @@ -548,7 +548,7 @@ class LIB_EXPORT JKQTPSingleColumnGraph: public JKQTPGraph { /** \brief the column that contains the datapoints */ int dataColumn; - /** \brief which plot style to use from the parent plotter (via JKQTPlotterBase::getPlotStyle() and JKQTPlotterBase::getNextStyle() ) */ + /** \brief which plot style to use from the parent plotter (via JKQTBasePlotter::getPlotStyle() and JKQTBasePlotter::getNextStyle() ) */ int parentPlotStyle; /** \brief color of the graph */ diff --git a/lib/jkqtplotter/jkqtpgraphsboxplot.cpp b/lib/jkqtplotter/jkqtpgraphsboxplot.cpp index 4cb3b46592..c63f4e2f29 100644 --- a/lib/jkqtplotter/jkqtpgraphsboxplot.cpp +++ b/lib/jkqtplotter/jkqtpgraphsboxplot.cpp @@ -112,7 +112,7 @@ void JKQTPBoxplotVerticalGraph::draw(JKQTPEnhancedPainter& painter) { QPen p=painter.pen(); p.setColor(color); - p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, lineWidth*parent->get_lineWidthMultiplier()))); + p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, lineWidth*parent->getLineWidthMultiplier()))); p.setJoinStyle(Qt::RoundJoin); p.setJoinStyle(Qt::RoundJoin); p.setCapStyle(Qt::RoundCap); @@ -230,7 +230,7 @@ void JKQTPBoxplotVerticalGraph::draw(JKQTPEnhancedPainter& painter) { if (percentile25Column>=0 && percentile75Column>=0) painter.drawRect(QRectF(xmi, p75, fabs(xma-xmi), fabs(p75-p25))); if (medianColumn>=0) lines_p.append(QLineF(xmi+p.widthF()/2.0, median, xma-p.widthF()/2.0, median)); if (meanColumn>=0 && JKQTPIsOKFloat(mean)) { - JKQTPPlotSymbol(painter, x, mean, meanSymbol, parent->pt2px(painter, meanSymbolSize), parent->pt2px(painter, meanSymbolWidth*parent->get_lineWidthMultiplier()), color, fillColor); + JKQTPPlotSymbol(painter, x, mean, meanSymbol, parent->pt2px(painter, meanSymbolSize), parent->pt2px(painter, meanSymbolWidth*parent->getLineWidthMultiplier()), color, fillColor); } @@ -373,7 +373,7 @@ void JKQTPBoxplotVerticalGraph::drawKeyMarker(JKQTPEnhancedPainter& painter, QRe QPen p=painter.pen(); p.setJoinStyle(Qt::RoundJoin); p.setCapStyle(Qt::RoundCap); p.setColor(color); - p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, lineWidth*parent->get_lineWidthMultiplier()))); + p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, lineWidth*parent->getLineWidthMultiplier()))); p.setJoinStyle(Qt::RoundJoin); QPen pw=p; pw.setStyle(whiskerStyle); @@ -418,7 +418,7 @@ void JKQTPBoxplotHorizontalGraph::drawKeyMarker(JKQTPEnhancedPainter& painter, Q painter.save(); QPen p=painter.pen(); p.setColor(color); - p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, lineWidth*parent->get_lineWidthMultiplier()))); + p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, lineWidth*parent->getLineWidthMultiplier()))); p.setJoinStyle(Qt::RoundJoin); p.setJoinStyle(Qt::RoundJoin); p.setCapStyle(Qt::RoundCap); @@ -583,7 +583,7 @@ void JKQTPBoxplotHorizontalGraph::draw(JKQTPEnhancedPainter& painter) { QPen p=painter.pen(); p.setColor(color); - p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, lineWidth*parent->get_lineWidthMultiplier()))); + p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, lineWidth*parent->getLineWidthMultiplier()))); p.setJoinStyle(Qt::RoundJoin); p.setJoinStyle(Qt::RoundJoin); p.setCapStyle(Qt::RoundCap); @@ -703,7 +703,7 @@ void JKQTPBoxplotHorizontalGraph::draw(JKQTPEnhancedPainter& painter) { if (medianColumn>=0) lines_p.append(QLineF(median, ymi-p.widthF()/2.0, median, yma+p.widthF()/2.0)); if (meanColumn>=0 && JKQTPIsOKFloat(mean)) { - JKQTPPlotSymbol(painter, mean, y, meanSymbol, parent->pt2px(painter, meanSymbolSize), parent->pt2px(painter, meanSymbolWidth*parent->get_lineWidthMultiplier()), color, fillColor); + JKQTPPlotSymbol(painter, mean, y, meanSymbol, parent->pt2px(painter, meanSymbolSize), parent->pt2px(painter, meanSymbolWidth*parent->getLineWidthMultiplier()), color, fillColor); } //first=true; @@ -814,7 +814,7 @@ void JKQTPBoxplotVerticalElement::draw(JKQTPEnhancedPainter& painter) { QPen p=painter.pen(); p.setColor(color); - p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, lineWidth*parent->get_lineWidthMultiplier()))); + p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, lineWidth*parent->getLineWidthMultiplier()))); p.setJoinStyle(Qt::RoundJoin); p.setJoinStyle(Qt::RoundJoin); p.setCapStyle(Qt::RoundCap); @@ -871,7 +871,7 @@ void JKQTPBoxplotVerticalElement::draw(JKQTPEnhancedPainter& painter) { if (drawMean) { double mean=transformY(this->mean); - JKQTPPlotSymbol(painter, x, mean, meanSymbol, parent->pt2px(painter, meanSymbolSize), parent->pt2px(painter, meanSymbolWidth*parent->get_lineWidthMultiplier()), color, fillColor); + JKQTPPlotSymbol(painter, x, mean, meanSymbol, parent->pt2px(painter, meanSymbolSize), parent->pt2px(painter, meanSymbolWidth*parent->getLineWidthMultiplier()), color, fillColor); } @@ -941,7 +941,7 @@ void JKQTPBoxplotVerticalElement::drawKeyMarker(JKQTPEnhancedPainter& painter, Q painter.save(); QPen p=painter.pen(); p.setColor(color); - p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, lineWidth*parent->get_lineWidthMultiplier()))); + p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, lineWidth*parent->getLineWidthMultiplier()))); p.setJoinStyle(Qt::RoundJoin); p.setJoinStyle(Qt::RoundJoin); p.setCapStyle(Qt::RoundCap); @@ -988,7 +988,7 @@ void JKQTPBoxplotHorizontalElement::drawKeyMarker(JKQTPEnhancedPainter& painter, painter.save(); QPen p=painter.pen(); p.setColor(color); - p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, lineWidth*parent->get_lineWidthMultiplier()))); + p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, lineWidth*parent->getLineWidthMultiplier()))); p.setJoinStyle(Qt::RoundJoin); p.setJoinStyle(Qt::RoundJoin); p.setCapStyle(Qt::RoundCap); @@ -1102,7 +1102,7 @@ void JKQTPBoxplotHorizontalElement::draw(JKQTPEnhancedPainter& painter) { QPen p=painter.pen(); p.setColor(color); - p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, lineWidth*parent->get_lineWidthMultiplier()))); + p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, lineWidth*parent->getLineWidthMultiplier()))); p.setJoinStyle(Qt::RoundJoin); p.setJoinStyle(Qt::RoundJoin); p.setCapStyle(Qt::RoundCap); @@ -1160,7 +1160,7 @@ void JKQTPBoxplotHorizontalElement::draw(JKQTPEnhancedPainter& painter) { if (drawMean) { double mean=transformY(this->mean); - JKQTPPlotSymbol(painter, mean, y, meanSymbol, parent->pt2px(painter, meanSymbolSize), parent->pt2px(painter, meanSymbolWidth*parent->get_lineWidthMultiplier()), color, fillColor); + JKQTPPlotSymbol(painter, mean, y, meanSymbol, parent->pt2px(painter, meanSymbolSize), parent->pt2px(painter, meanSymbolWidth*parent->getLineWidthMultiplier()), color, fillColor); } } @@ -1177,7 +1177,7 @@ void JKQTPBoxplotHorizontalElement::draw(JKQTPEnhancedPainter& painter) { QPen JKQTPBoxplotVerticalGraph::getLinePen(JKQTPEnhancedPainter& painter) const { QPen p; p.setColor(color); - p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH,parent->pt2px(painter, parent->get_lineWidthMultiplier()*lineWidth))); + p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH,parent->pt2px(painter, parent->getLineWidthMultiplier()*lineWidth))); p.setJoinStyle(Qt::RoundJoin); p.setCapStyle(Qt::RoundCap); @@ -1243,7 +1243,7 @@ QBrush JKQTPBoxplotVerticalElement::getBrush(JKQTPEnhancedPainter& /*painter*/) QPen JKQTPBoxplotVerticalElement::getLinePen(JKQTPEnhancedPainter& painter) const { QPen p; p.setColor(color); - p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH,parent->pt2px(painter, parent->get_lineWidthMultiplier()*lineWidth))); + p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH,parent->pt2px(painter, parent->getLineWidthMultiplier()*lineWidth))); p.setJoinStyle(Qt::RoundJoin); p.setCapStyle(Qt::RoundCap); diff --git a/lib/jkqtplotter/jkqtpgraphsboxplot.h b/lib/jkqtplotter/jkqtpgraphsboxplot.h index 764f835139..0f4ec40964 100644 --- a/lib/jkqtplotter/jkqtpgraphsboxplot.h +++ b/lib/jkqtplotter/jkqtpgraphsboxplot.h @@ -328,14 +328,14 @@ class LIB_EXPORT JKQTPBoxplotVerticalGraph: public JKQTPGraph { /*! \brief sets the property lineWidth to the specified \a __value. \details Description of the parameter lineWidth is:
\copydoc lineWidth
\see lineWidth for more information */ - inline virtual void set_lineWidth(double __value) + inline virtual void setLineWidth(double __value) { this->lineWidth = __value; } /*! \brief returns the property lineWidth. \details Description of the parameter lineWidth is:
\copydoc lineWidth
\see lineWidth for more information */ - inline virtual double get_lineWidth() const + inline virtual double getLineWidth() const { return this->lineWidth; } @@ -398,7 +398,7 @@ class LIB_EXPORT JKQTPBoxplotVerticalGraph: public JKQTPGraph { } protected: - /** \brief which plot style to use from the parent plotter (via JKQTPlotterBase::getPlotStyle() and JKQTPlotterBase::getNextStyle() ) */ + /** \brief which plot style to use from the parent plotter (via JKQTBasePlotter::getPlotStyle() and JKQTBasePlotter::getNextStyle() ) */ int parentPlotStyle; /** \brief the column that contains the x-component of the datapoints */ @@ -693,14 +693,14 @@ class LIB_EXPORT JKQTPBoxplotVerticalElement: public JKQTPPlotObject { /*! \brief sets the property lineWidth to the specified \a __value. \details Description of the parameter lineWidth is:
\copydoc lineWidth
\see lineWidth for more information */ - inline virtual void set_lineWidth(double __value) + inline virtual void setLineWidth(double __value) { this->lineWidth = __value; } /*! \brief returns the property lineWidth. \details Description of the parameter lineWidth is:
\copydoc lineWidth
\see lineWidth for more information */ - inline virtual double get_lineWidth() const + inline virtual double getLineWidth() const { return this->lineWidth; } @@ -805,7 +805,7 @@ class LIB_EXPORT JKQTPBoxplotVerticalElement: public JKQTPPlotObject { } protected: - /** \brief which plot style to use from the parent plotter (via JKQTPlotterBase::getPlotStyle() and JKQTPlotterBase::getNextStyle() ) */ + /** \brief which plot style to use from the parent plotter (via JKQTBasePlotter::getPlotStyle() and JKQTBasePlotter::getNextStyle() ) */ int parentPlotStyle; /** \brief the column that contains the x-component of the datapoints */ diff --git a/lib/jkqtplotter/jkqtpgraphsevaluatedfunction.cpp b/lib/jkqtplotter/jkqtpgraphsevaluatedfunction.cpp index a3d91cb029..be58b4df2a 100644 --- a/lib/jkqtplotter/jkqtpgraphsevaluatedfunction.cpp +++ b/lib/jkqtplotter/jkqtpgraphsevaluatedfunction.cpp @@ -142,7 +142,7 @@ void JKQTPXFunctionLineGraph::clearData() { data=nullptr; } -void JKQTPXFunctionLineGraph::set_plotFunction(const jkqtpPlotFunctionType &__value) +void JKQTPXFunctionLineGraph::setPlotFunction(const jkqtpPlotFunctionType &__value) { simplePlotFunction=jkqtpSimplePlotFunctionType(); plotFunction = __value; @@ -151,7 +151,7 @@ void JKQTPXFunctionLineGraph::set_plotFunction(const jkqtpPlotFunctionType &__va clearData(); } -void JKQTPXFunctionLineGraph::set_plotFunction(const jkqtpSimplePlotFunctionType &__value) +void JKQTPXFunctionLineGraph::setPlotFunction(const jkqtpSimplePlotFunctionType &__value) { plotFunction=jkqtpPlotFunctionType(); simplePlotFunction=__value; @@ -160,7 +160,7 @@ void JKQTPXFunctionLineGraph::set_plotFunction(const jkqtpSimplePlotFunctionType clearData(); } -void JKQTPXFunctionLineGraph::set_plotFunction(jkqtpPlotFunctionType &&__value) +void JKQTPXFunctionLineGraph::setPlotFunction(jkqtpPlotFunctionType &&__value) { simplePlotFunction=jkqtpSimplePlotFunctionType(); plotFunction = std::move(__value); @@ -168,7 +168,7 @@ void JKQTPXFunctionLineGraph::set_plotFunction(jkqtpPlotFunctionType &&__value) clearData(); } -void JKQTPXFunctionLineGraph::set_plotFunction(jkqtpSimplePlotFunctionType &&__value) +void JKQTPXFunctionLineGraph::setPlotFunction(jkqtpSimplePlotFunctionType &&__value) { plotFunction=jkqtpPlotFunctionType(); simplePlotFunction=std::move(__value); @@ -177,7 +177,7 @@ void JKQTPXFunctionLineGraph::set_plotFunction(jkqtpSimplePlotFunctionType &&__v clearData(); } -jkqtpPlotFunctionType JKQTPXFunctionLineGraph::get_plotFunction() const +jkqtpPlotFunctionType JKQTPXFunctionLineGraph::getPlotFunction() const { return plotFunction; } @@ -249,7 +249,7 @@ void JKQTPXFunctionLineGraph::createPlotData(bool collectParams) { d->f=func(xmin); d->next=nullptr; data=d; - /*if (parent && parent->get_xAxis()->isLogAxis()) { + /*if (parent && parent->getXAxis()->isLogAxis()) { for (double x=log(xmin)+logdelta0; xnext = new doublePair; d->next->x=exp(x+(static_cast(rand())/static_cast(RAND_MAX)-0.5)*delta0/2.0); @@ -339,7 +339,7 @@ void JKQTPXFunctionLineGraph::refine(doublePair* a, doublePair* b, unsigned int double delta=bx - ax; //double logdelta=log(bx) - log(ax); double xmid=ax+(delta)/2.0; - /*if (parent && parent->get_xAxis()->isLogAxis()) { + /*if (parent && parent->getXAxis()->isLogAxis()) { xmid=log(a->x)+(logdelta)/2.0; xmid=xmid+(static_cast(rand())/static_cast(RAND_MAX)-0.5)*delta/5.0; xmid=exp(xmid); @@ -385,7 +385,7 @@ void JKQTPXFunctionLineGraph::draw(JKQTPEnhancedPainter& painter) { QPen p=painter.pen(); p.setColor(color); - p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, lineWidth*parent->get_lineWidthMultiplier()))); + p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, lineWidth*parent->getLineWidthMultiplier()))); p.setStyle(style); p.setJoinStyle(Qt::RoundJoin); p.setJoinStyle(Qt::RoundJoin); @@ -394,7 +394,7 @@ void JKQTPXFunctionLineGraph::draw(JKQTPEnhancedPainter& painter) { QPen ep=painter.pen(); ep.setColor(errorColor); - ep.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, errorLineWidth*parent->get_lineWidthMultiplier()))); + ep.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, errorLineWidth*parent->getLineWidthMultiplier()))); ep.setStyle(errorStyle); ep.setJoinStyle(Qt::RoundJoin); @@ -413,17 +413,17 @@ void JKQTPXFunctionLineGraph::draw(JKQTPEnhancedPainter& painter) { // double ymeold=-1; // double x0=transformX(0); -// if (parent->get_xAxis()->isLogAxis()) x0=transformX(parent->get_xAxis()->getMin()); +// if (parent->getXAxis()->isLogAxis()) x0=transformX(parent->getXAxis()->getMin()); double y0=transformY(0); - if (parent->get_yAxis()->isLogAxis()) y0=transformY(parent->get_yAxis()->getMin()); + if (parent->getYAxis()->isLogAxis()) y0=transformY(parent->getYAxis()->getMin()); bool first=false; doublePair* d=data; //QPainterPath pa, pfill; //QPainterPath pel, pef; QPolygonF filledPolygon, linePolygon, errorLineTop, errorLineBottom; QList epTop, epBottom; - double yami=qMin(transformY(parent->get_yAxis()->getMin()),transformY(parent->get_yAxis()->getMax())); - double yama=qMax(transformY(parent->get_yAxis()->getMin()),transformY(parent->get_yAxis()->getMax())); + double yami=qMin(transformY(parent->getYAxis()->getMin()),transformY(parent->getYAxis()->getMax())); + double yama=qMax(transformY(parent->getYAxis()->getMin()),transformY(parent->getYAxis()->getMax())); double dypix=fabs(yama-yami); yami=yami-2*dypix; yama=yama+2*dypix; @@ -525,7 +525,7 @@ void JKQTPXFunctionLineGraph::draw(JKQTPEnhancedPainter& painter) { if (JKQTPIsOKFloat(xv) && JKQTPIsOKFloat(yv)) { double x=transformX(xv); double y=transformY(yv); - JKQTPPlotSymbol(painter, x, y, JKQTPCross, 6,1*parent->get_lineWidthMultiplier(), c, QColor(Qt::transparent)); + JKQTPPlotSymbol(painter, x, y, JKQTPCross, 6,1*parent->getLineWidthMultiplier(), c, QColor(Qt::transparent)); } d=d->next; } @@ -572,7 +572,7 @@ void JKQTPYFunctionLineGraph::draw(JKQTPEnhancedPainter& painter) { QPen p=painter.pen(); p.setColor(color); - p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, lineWidth*parent->get_lineWidthMultiplier()))); + p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, lineWidth*parent->getLineWidthMultiplier()))); p.setStyle(style); p.setJoinStyle(Qt::RoundJoin); p.setJoinStyle(Qt::RoundJoin); @@ -581,7 +581,7 @@ void JKQTPYFunctionLineGraph::draw(JKQTPEnhancedPainter& painter) { QPen ep=painter.pen(); ep.setColor(errorColor); - ep.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, errorLineWidth*parent->get_lineWidthMultiplier()))); + ep.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, errorLineWidth*parent->getLineWidthMultiplier()))); ep.setStyle(errorStyle); ep.setJoinStyle(Qt::RoundJoin); @@ -600,9 +600,9 @@ void JKQTPYFunctionLineGraph::draw(JKQTPEnhancedPainter& painter) { double xmeold=-1; double x0=transformX(0); - if (parent->get_xAxis()->isLogAxis()) x0=transformX(parent->get_xAxis()->getMin()); + if (parent->getXAxis()->isLogAxis()) x0=transformX(parent->getXAxis()->getMin()); // double y0=transformY(0); -// if (parent->get_yAxis()->isLogAxis()) y0=transformY(parent->get_yAxis()->getMin()); +// if (parent->getYAxis()->isLogAxis()) y0=transformY(parent->getYAxis()->getMin()); bool first=false; doublePair* d=data; @@ -705,7 +705,7 @@ void JKQTPYFunctionLineGraph::draw(JKQTPEnhancedPainter& painter) { if (JKQTPIsOKFloat(xv) && JKQTPIsOKFloat(yv)) { double x=transformX(xv); double y=transformY(yv); - JKQTPPlotSymbol(painter, x, y, JKQTPCross, 6, 1*parent->get_lineWidthMultiplier(), c, QColor(Qt::transparent)); + JKQTPPlotSymbol(painter, x, y, JKQTPCross, 6, 1*parent->getLineWidthMultiplier(), c, QColor(Qt::transparent)); } d=d->next; } @@ -765,7 +765,7 @@ QBrush JKQTPXFunctionLineGraph::getBrush(JKQTPEnhancedPainter& /*painter*/) cons QPen JKQTPXFunctionLineGraph::getLinePen(JKQTPEnhancedPainter &painter) const { QPen p; p.setColor(color); - p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH,parent->pt2px(painter, parent->get_lineWidthMultiplier()*lineWidth))); + p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH,parent->pt2px(painter, parent->getLineWidthMultiplier()*lineWidth))); p.setStyle(style); p.setJoinStyle(Qt::RoundJoin); p.setCapStyle(Qt::RoundCap); @@ -783,7 +783,7 @@ QBrush JKQTPXFunctionLineGraph::getErrorBrush(JKQTPEnhancedPainter& /*painter*/) QPen JKQTPXFunctionLineGraph::getErrorLinePen(JKQTPEnhancedPainter& painter) const { QPen p; p.setColor(errorColor); - p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH,parent->pt2px(painter, parent->get_lineWidthMultiplier()*errorLineWidth))); + p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH,parent->pt2px(painter, parent->getLineWidthMultiplier()*errorLineWidth))); p.setStyle(errorStyle); p.setJoinStyle(Qt::RoundJoin); p.setCapStyle(Qt::RoundCap); @@ -844,7 +844,7 @@ void JKQTPXFunctionLineGraph::set_errorParams(const QVector &errorParams void JKQTPXFunctionLineGraph::setSpecialFunction(JKQTPXFunctionLineGraph::SpecialFunction function) { if (function==JKQTPXFunctionLineGraph::Polynomial) { - set_plotFunction([](double x, void* param) { + setPlotFunction([](double x, void* param) { double res=0; QVector* d=static_cast*>(param); if (d && d->size()>0) { @@ -859,7 +859,7 @@ void JKQTPXFunctionLineGraph::setSpecialFunction(JKQTPXFunctionLineGraph::Specia return res; }); } - else if (function==JKQTPXFunctionLineGraph::Exponential) set_plotFunction([](double x, void* param) { + else if (function==JKQTPXFunctionLineGraph::Exponential) setPlotFunction([](double x, void* param) { double res=0; QVector* d=static_cast*>(param); if (d) { @@ -871,7 +871,7 @@ void JKQTPXFunctionLineGraph::setSpecialFunction(JKQTPXFunctionLineGraph::Specia } return res; }); - else if (function==JKQTPXFunctionLineGraph::PowerLaw) set_plotFunction([](double x, void* param) { + else if (function==JKQTPXFunctionLineGraph::PowerLaw) setPlotFunction([](double x, void* param) { double res=0; QVector* d=static_cast*>(param); if (d) { diff --git a/lib/jkqtplotter/jkqtpgraphsevaluatedfunction.h b/lib/jkqtplotter/jkqtpgraphsevaluatedfunction.h index 279ce0351c..d669f651d4 100644 --- a/lib/jkqtplotter/jkqtpgraphsevaluatedfunction.h +++ b/lib/jkqtplotter/jkqtpgraphsevaluatedfunction.h @@ -170,14 +170,14 @@ class LIB_EXPORT JKQTPXFunctionLineGraph: public JKQTPGraph { /*! \brief sets the property lineWidth to the specified \a __value. \details Description of the parameter lineWidth is:
\copydoc lineWidth
\see lineWidth for more information */ - inline virtual void set_lineWidth(double __value) + inline virtual void setLineWidth(double __value) { this->lineWidth = __value; } /*! \brief returns the property lineWidth. \details Description of the parameter lineWidth is:
\copydoc lineWidth
\see lineWidth for more information */ - inline virtual double get_lineWidth() const + inline virtual double getLineWidth() const { return this->lineWidth; } @@ -200,24 +200,24 @@ class LIB_EXPORT JKQTPXFunctionLineGraph: public JKQTPGraph { * * \details Description of the parameter varname is:
\copydoc plotFunction
* \see plotFunction for more information */ - virtual void set_plotFunction (jkqtpPlotFunctionType && __value); + virtual void setPlotFunction (jkqtpPlotFunctionType && __value); /** \brief sets the property plotFunction to the specified \a __value. * * \details Description of the parameter varname is:
\copydoc plotFunction
* \see plotFunction for more information */ - virtual void set_plotFunction (const jkqtpPlotFunctionType & __value); + virtual void setPlotFunction (const jkqtpPlotFunctionType & __value); /** \brief sets the property plotFunction to the specified \a __value. * * \details Description of the parameter plotFunction is:
\copydoc plotFunction
* \see plotFunction for more information */ - virtual void set_plotFunction (jkqtpSimplePlotFunctionType && __value); + virtual void setPlotFunction (jkqtpSimplePlotFunctionType && __value); /** \brief sets the property plotFunction to the specified \a __value. * * \details Description of the parameter plotFunction is:
\copydoc plotFunction
* \see plotFunction for more information */ - virtual void set_plotFunction (const jkqtpSimplePlotFunctionType & __value); + virtual void setPlotFunction (const jkqtpSimplePlotFunctionType & __value); /*! \brief returns the property plotFunction. \see plotFunction for more information */ \ - virtual jkqtpPlotFunctionType get_plotFunction () const; + virtual jkqtpPlotFunctionType getPlotFunction () const; /*! \brief returns the property simplePlotFunction. \see simplePlotFunction for more information */ \ virtual jkqtpSimplePlotFunctionType get_simplePlotFunction () const; @@ -316,14 +316,14 @@ class LIB_EXPORT JKQTPXFunctionLineGraph: public JKQTPGraph { /*! \brief sets the property plotRefinement to the specified \a __value. \details Description of the parameter plotRefinement is:
\copydoc plotRefinement
\see plotRefinement for more information */ - inline virtual void set_plotRefinement(bool __value) + inline virtual void setPlotRefinement(bool __value) { this->plotRefinement = __value; } /*! \brief returns the property plotRefinement. \details Description of the parameter plotRefinement is:
\copydoc plotRefinement
\see plotRefinement for more information */ - inline virtual bool get_plotRefinement() const + inline virtual bool getPlotRefinement() const { return this->plotRefinement; } @@ -527,7 +527,7 @@ class LIB_EXPORT JKQTPXFunctionLineGraph: public JKQTPGraph { /** \brief returns, which special function is set (or if any is set) */ SpecialFunction getFunctionType() const; protected: - /** \brief which plot style to use from the parent plotter (via JKQTPlotterBase::getPlotStyle() and JKQTPlotterBase::getNextStyle() ) */ + /** \brief which plot style to use from the parent plotter (via JKQTBasePlotter::getPlotStyle() and JKQTBasePlotter::getNextStyle() ) */ int parentPlotStyle; struct doublePair { diff --git a/lib/jkqtplotter/jkqtpgraphsfilledcurve.cpp b/lib/jkqtplotter/jkqtpgraphsfilledcurve.cpp index f95279ddbe..6711bd7f4f 100644 --- a/lib/jkqtplotter/jkqtpgraphsfilledcurve.cpp +++ b/lib/jkqtplotter/jkqtpgraphsfilledcurve.cpp @@ -96,7 +96,7 @@ void JKQTPFilledCurveXGraph::draw(JKQTPEnhancedPainter& painter) { QPen p=painter.pen(); p.setColor(color); - p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, lineWidth*parent->get_lineWidthMultiplier()))); + p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, lineWidth*parent->getLineWidthMultiplier()))); p.setStyle(style); p.setJoinStyle(Qt::RoundJoin); p.setCapStyle(Qt::RoundCap); @@ -128,15 +128,15 @@ void JKQTPFilledCurveXGraph::draw(JKQTPEnhancedPainter& painter) { double xold=-1; //double yold=-1; // double x0=transformX(baseline); -// if (parent->get_xAxis()->isLogAxis()) { -// if (baseline>0 && baseline>parent->get_xAxis()->getMin()) x0=transformX(baseline); -// else x0=transformX(parent->get_xAxis()->getMin()); +// if (parent->getXAxis()->isLogAxis()) { +// if (baseline>0 && baseline>parent->getXAxis()->getMin()) x0=transformX(baseline); +// else x0=transformX(parent->getXAxis()->getMin()); // } double y0=transformY(baseline); - if (parent->get_yAxis()->isLogAxis()) { - y0=transformY(parent->get_yAxis()->getMin()); - if (baseline>0 && baseline>parent->get_yAxis()->getMin()) y0=transformY(baseline); - else y0=transformY(parent->get_yAxis()->getMin()); + if (parent->getYAxis()->isLogAxis()) { + y0=transformY(parent->getYAxis()->getMin()); + if (baseline>0 && baseline>parent->getYAxis()->getMin()) y0=transformY(baseline); + else y0=transformY(parent->getYAxis()->getMin()); } bool first=true; intSortData(); @@ -271,7 +271,7 @@ void JKQTPFilledCurveYGraph::draw(JKQTPEnhancedPainter& painter) { QPen p=painter.pen(); p.setColor(color); - p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, lineWidth*parent->get_lineWidthMultiplier()))); + p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, lineWidth*parent->getLineWidthMultiplier()))); p.setStyle(style); p.setJoinStyle(Qt::RoundJoin); p.setCapStyle(Qt::RoundCap); @@ -304,15 +304,15 @@ void JKQTPFilledCurveYGraph::draw(JKQTPEnhancedPainter& painter) { //double xold=-1; double yold=-1; double x0=transformX(baseline); - if (parent->get_xAxis()->isLogAxis()) { - if (baseline>0 && baseline>parent->get_xAxis()->getMin()) x0=transformX(baseline); - else x0=transformX(parent->get_xAxis()->getMin()); + if (parent->getXAxis()->isLogAxis()) { + if (baseline>0 && baseline>parent->getXAxis()->getMin()) x0=transformX(baseline); + else x0=transformX(parent->getXAxis()->getMin()); } /*double y0=transformY(baseline); - if (parent->get_yAxis()->isLogAxis()) { - y0=transformY(parent->get_yAxis()->getMin()); - if (baseline>0 && baseline>parent->get_yAxis()->getMin()) y0=transformY(baseline); - else y0=transformY(parent->get_yAxis()->getMin()); + if (parent->getYAxis()->isLogAxis()) { + y0=transformY(parent->getYAxis()->getMin()); + if (baseline>0 && baseline>parent->getYAxis()->getMin()) y0=transformY(baseline); + else y0=transformY(parent->getYAxis()->getMin()); }*/ bool first=true; intSortData(); @@ -394,7 +394,7 @@ void JKQTPFilledCurveYGraph::draw(JKQTPEnhancedPainter& painter) { QPen JKQTPFilledCurveXGraph::getLinePen(JKQTPEnhancedPainter& painter) const { QPen p; p.setColor(color); - p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH,parent->pt2px(painter, parent->get_lineWidthMultiplier()*lineWidth))); + p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH,parent->pt2px(painter, parent->getLineWidthMultiplier()*lineWidth))); p.setStyle(style); p.setJoinStyle(Qt::RoundJoin); p.setCapStyle(Qt::RoundCap); @@ -572,7 +572,7 @@ void JKQTPFilledVerticalRangeGraph::draw(JKQTPEnhancedPainter &painter) QPen p=painter.pen(); p.setColor(color); - p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, lineWidth*parent->get_lineWidthMultiplier()))); + p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, lineWidth*parent->getLineWidthMultiplier()))); p.setStyle(style); p.setJoinStyle(Qt::RoundJoin); p.setCapStyle(Qt::RoundCap); @@ -688,7 +688,7 @@ QPen JKQTPFilledVerticalRangeGraph::getLinePen(JKQTPEnhancedPainter &painter) co { QPen p; p.setColor(color); - p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, lineWidth*parent->get_lineWidthMultiplier()))); + p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, lineWidth*parent->getLineWidthMultiplier()))); p.setStyle(style); p.setJoinStyle(Qt::RoundJoin); p.setCapStyle(Qt::RoundCap); diff --git a/lib/jkqtplotter/jkqtpgraphsfilledcurve.h b/lib/jkqtplotter/jkqtpgraphsfilledcurve.h index 9fe45841bd..9c9f9e6705 100644 --- a/lib/jkqtplotter/jkqtpgraphsfilledcurve.h +++ b/lib/jkqtplotter/jkqtpgraphsfilledcurve.h @@ -93,14 +93,14 @@ class LIB_EXPORT JKQTPFilledCurveXGraph: public JKQTPXYGraph { /*! \brief sets the property lineWidth to the specified \a __value. \details Description of the parameter lineWidth is:
\copydoc lineWidth
\see lineWidth for more information */ - inline virtual void set_lineWidth(double __value) + inline virtual void setLineWidth(double __value) { this->lineWidth = __value; } /*! \brief returns the property lineWidth. \details Description of the parameter lineWidth is:
\copydoc lineWidth
\see lineWidth for more information */ - inline virtual double get_lineWidth() const + inline virtual double getLineWidth() const { return this->lineWidth; } @@ -183,7 +183,7 @@ class LIB_EXPORT JKQTPFilledCurveXGraph: public JKQTPXYGraph { /** \brief color for the shadow, or a lighter version of the line color, if transparent (default) */ QColor selectionLineColor; - /** \brief which plot style to use from the parent plotter (via JKQTPlotterBase::getPlotStyle() and JKQTPlotterBase::getNextStyle() ) */ + /** \brief which plot style to use from the parent plotter (via JKQTBasePlotter::getPlotStyle() and JKQTBasePlotter::getNextStyle() ) */ int parentPlotStyle; /** \brief color of the graph */ @@ -438,7 +438,7 @@ class LIB_EXPORT JKQTPFilledVerticalRangeGraph: public JKQTPXYGraph { /** \brief color for the shadow, or a lighter version of the line color, if transparent (default) */ QColor selectionLineColor; - /** \brief which plot style to use from the parent plotter (via JKQTPlotterBase::getPlotStyle() and JKQTPlotterBase::getNextStyle() ) */ + /** \brief which plot style to use from the parent plotter (via JKQTBasePlotter::getPlotStyle() and JKQTBasePlotter::getNextStyle() ) */ int parentPlotStyle; /** \brief color of the graph */ diff --git a/lib/jkqtplotter/jkqtpgraphsgeometric.cpp b/lib/jkqtplotter/jkqtpgraphsgeometric.cpp index 94aa1fa78e..413580f0f2 100644 --- a/lib/jkqtplotter/jkqtpgraphsgeometric.cpp +++ b/lib/jkqtplotter/jkqtpgraphsgeometric.cpp @@ -53,7 +53,7 @@ QPen JKQTPGeoBaseLine::getPen(JKQTPEnhancedPainter& painter) { QPen p; p.setColor(color); p.setStyle(style); - p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, lineWidth*parent->get_lineWidthMultiplier()))); + p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, lineWidth*parent->getLineWidthMultiplier()))); return p; } @@ -170,12 +170,12 @@ bool JKQTPGeoText::getYMinMax(double& miny, double& maxy, double& smallestGreate void JKQTPGeoText::draw(JKQTPEnhancedPainter& painter) { painter.save(); #ifdef USE_XITS_FONTS - parent->get_mathText()->useXITS(); + parent->getMathText()->useXITS(); #endif - parent->get_mathText()->set_fontSize(fontSize*parent->get_fontSizeMultiplier()); - parent->get_mathText()->set_fontColor(color); - parent->get_mathText()->parse(text); - parent->get_mathText()->draw(painter, transformX(x), transformY(y)); + parent->getMathText()->setFontSize(fontSize*parent->getFontSizeMultiplier()); + parent->getMathText()->setFontColor(color); + parent->getMathText()->parse(text); + parent->getMathText()->draw(painter, transformX(x), transformY(y)); painter.restore(); } @@ -290,10 +290,10 @@ bool JKQTPGeoInfiniteLine::getYMinMax(double& miny, double& maxy, double& smalle void JKQTPGeoInfiniteLine::draw(JKQTPEnhancedPainter& painter) { - double xmin=parent->get_xAxis()->getMin(); - double xmax=parent->get_xAxis()->getMax(); - double ymin=parent->get_yAxis()->getMin(); - double ymax=parent->get_yAxis()->getMax(); + double xmin=parent->getXAxis()->getMin(); + double xmax=parent->getXAxis()->getMax(); + double ymin=parent->getYAxis()->getMin(); + double ymax=parent->getYAxis()->getMax(); QRectF bbox(QPointF(xmin, ymin), QPointF(xmax, ymax)); bool doDraw=false; double x2=x, y2=y; @@ -971,7 +971,7 @@ void JKQTPGeoSymbol::drawKeyMarker(JKQTPEnhancedPainter &painter, QRectF &rect) const double minSize=qMin(rect.width(), rect.height()); double symbolSize=parent->pt2px(painter, this->symbolSize); if (symbolSize>minSize*0.9) symbolSize=minSize*0.9; - double symbolWidth=parent->pt2px(painter, this->symbolWidth*parent->get_lineWidthMultiplier()); + double symbolWidth=parent->pt2px(painter, this->symbolWidth*parent->getLineWidthMultiplier()); if (symbolWidth>0.3*symbolSize) symbolWidth=0.3*symbolSize; painter.save(); diff --git a/lib/jkqtplotter/jkqtpgraphsgeometric.h b/lib/jkqtplotter/jkqtpgraphsgeometric.h index 784ff36f66..092d68068f 100644 --- a/lib/jkqtplotter/jkqtpgraphsgeometric.h +++ b/lib/jkqtplotter/jkqtpgraphsgeometric.h @@ -90,14 +90,14 @@ class LIB_EXPORT JKQTPGeoBaseLine: public JKQTPPlotObject { /*! \brief sets the property lineWidth to the specified \a __value. \details Description of the parameter lineWidth is:
\copydoc lineWidth
\see lineWidth for more information */ - inline virtual void set_lineWidth(double __value) + inline virtual void setLineWidth(double __value) { this->lineWidth = __value; } /*! \brief returns the property lineWidth. \details Description of the parameter lineWidth is:
\copydoc lineWidth
\see lineWidth for more information */ - inline virtual double get_lineWidth() const + inline virtual double getLineWidth() const { return this->lineWidth; } @@ -439,14 +439,14 @@ class LIB_EXPORT JKQTPGeoText: public JKQTPPlotObject { /*! \brief sets the property fontSize to the specified \a __value. \details Description of the parameter fontSize is:
\copydoc fontSize
\see fontSize for more information */ - inline virtual void set_fontSize(double __value) + inline virtual void setFontSize(double __value) { this->fontSize = __value; } /*! \brief returns the property fontSize. \details Description of the parameter fontSize is:
\copydoc fontSize
\see fontSize for more information */ - inline virtual double get_fontSize() const + inline virtual double getFontSize() const { return this->fontSize; } diff --git a/lib/jkqtplotter/jkqtpgraphsimage.cpp b/lib/jkqtplotter/jkqtpgraphsimage.cpp index 3915fe9325..d9cf8cf370 100644 --- a/lib/jkqtplotter/jkqtpgraphsimage.cpp +++ b/lib/jkqtplotter/jkqtpgraphsimage.cpp @@ -271,8 +271,8 @@ void JKQTPImage::saveImagePlotAsImage(const QString &filename, const QByteArray { if (parent && image) { parent->loadUserSettings(); - QString currentSaveDirectory=parent->get_currentSaveDirectory(); - QString currentFileFormat=parent->get_currentFileFormat(); + QString currentSaveDirectory=parent->getCurrentSaveDirectory(); + QString currentFileFormat=parent->getCurrentFileFormat(); QString fn=filename; QStringList filt; QList writerformats=QImageWriter::supportedImageFormats(); @@ -288,8 +288,8 @@ void JKQTPImage::saveImagePlotAsImage(const QString &filename, const QByteArray if (!fn.isEmpty()) currentSaveDirectory=QFileInfo(fn).absolutePath(); } - parent->set_currentFileFormat(currentFileFormat); - parent->set_currentSaveDirectory(currentSaveDirectory); + parent->setCurrentFileFormat(currentFileFormat); + parent->setCurrentSaveDirectory(currentSaveDirectory); parent->saveUserSettings(); if (!fn.isEmpty()) { int filtID=filt.indexOf(selFormat); @@ -650,43 +650,43 @@ void JKQTPMathImage::initJKQTPMathImage() { connect(actCopyPalette, SIGNAL(triggered()), this, SLOT(copyColorbarPlotAsImage())); colorBarRightAxis=new JKQTPVerticalIndependentAxis(0, 100, 0, 100, parent); - if (parent) colorBarRightAxis->loadSettings(parent->get_yAxis()); + if (parent) colorBarRightAxis->loadSettings(parent->getYAxis()); colorBarRightAxis->set_drawMode1(JKQTPCADMline); colorBarRightAxis->set_drawMode2(JKQTPCADMcomplete); - colorBarRightAxis->set_axisLabel(""); + colorBarRightAxis->setAxisLabel(""); colorBarRightAxis->set_minTicks(5); colorBarRightAxis->set_minorTicks(0); colorBarRightAxis->set_tickOutsideLength(0); colorBarRightAxis->set_minorTickOutsideLength(0); - colorBarRightAxis->set_showZeroAxis(false); + colorBarRightAxis->setShowZeroAxis(false); colorBarTopAxis=new JKQTPHorizontalIndependentAxis(0, 100, 0, 100, parent); - if (parent) colorBarTopAxis->loadSettings(parent->get_xAxis()); + if (parent) colorBarTopAxis->loadSettings(parent->getXAxis()); colorBarTopAxis->set_drawMode1(JKQTPCADMline); colorBarTopAxis->set_drawMode2(JKQTPCADMcomplete); - colorBarTopAxis->set_axisLabel(""); + colorBarTopAxis->setAxisLabel(""); colorBarTopAxis->set_minTicks(3); colorBarTopAxis->set_minorTicks(0); colorBarTopAxis->set_tickOutsideLength(0); colorBarTopAxis->set_minorTickOutsideLength(0); - colorBarTopAxis->set_showZeroAxis(false); + colorBarTopAxis->setShowZeroAxis(false); modifierColorBarTopAxis=new JKQTPVerticalIndependentAxis(0, 100, 0, 100, parent); - if (parent) modifierColorBarTopAxis->loadSettings(parent->get_xAxis()); + if (parent) modifierColorBarTopAxis->loadSettings(parent->getXAxis()); modifierColorBarTopAxis->set_drawMode1(JKQTPCADMline); modifierColorBarTopAxis->set_drawMode2(JKQTPCADMcomplete); - modifierColorBarTopAxis->set_axisLabel(""); + modifierColorBarTopAxis->setAxisLabel(""); modifierColorBarTopAxis->set_minTicks(3); - modifierColorBarTopAxis->set_showZeroAxis(false); + modifierColorBarTopAxis->setShowZeroAxis(false); modifierColorBarTopAxis->set_minorTicks(0); modifierColorBarTopAxis->set_tickOutsideLength(0); modifierColorBarTopAxis->set_minorTickOutsideLength(0); modifierColorBarRightAxis=new JKQTPHorizontalIndependentAxis (0, 100, 0, 100, parent); - if (parent) modifierColorBarRightAxis->loadSettings(parent->get_yAxis()); + if (parent) modifierColorBarRightAxis->loadSettings(parent->getYAxis()); modifierColorBarRightAxis->set_drawMode1(JKQTPCADMline); modifierColorBarRightAxis->set_drawMode2(JKQTPCADMcomplete); - modifierColorBarRightAxis->set_axisLabel(""); + modifierColorBarRightAxis->setAxisLabel(""); modifierColorBarRightAxis->set_minTicks(5); - modifierColorBarRightAxis->set_showZeroAxis(false); + modifierColorBarRightAxis->setShowZeroAxis(false); modifierColorBarRightAxis->set_minorTicks(0); modifierColorBarRightAxis->set_tickOutsideLength(0); modifierColorBarRightAxis->set_minorTickOutsideLength(0); @@ -695,8 +695,8 @@ void JKQTPMathImage::initJKQTPMathImage() { this->colorBarTopVisible=true; this->colorBarRightVisible=true; this->palette=JKQTPMathImageGRAY; - this->imageNameFontName=parent->get_keyFont(); - this->imageNameFontSize=parent->get_keyFontSize(); + this->imageNameFontName=parent->getKeyFont(); + this->imageNameFontSize=parent->getKeyFontSize(); this->imageName=""; this->showColorBar=true; this->colorBarWidth=14; @@ -781,8 +781,8 @@ void JKQTPMathImage::saveImagePlotAsImage(const QString &filename, const QByteAr { if (parent) { parent->loadUserSettings(); - QString currentSaveDirectory=parent->get_currentSaveDirectory(); - QString currentFileFormat=parent->get_currentFileFormat(); + QString currentSaveDirectory=parent->getCurrentSaveDirectory(); + QString currentFileFormat=parent->getCurrentFileFormat(); QString fn=filename; QStringList filt; QList writerformats=QImageWriter::supportedImageFormats(); @@ -798,8 +798,8 @@ void JKQTPMathImage::saveImagePlotAsImage(const QString &filename, const QByteAr if (!fn.isEmpty()) currentSaveDirectory=QFileInfo(fn).absolutePath(); } - parent->set_currentFileFormat(currentFileFormat); - parent->set_currentSaveDirectory(currentSaveDirectory); + parent->setCurrentFileFormat(currentFileFormat); + parent->setCurrentSaveDirectory(currentSaveDirectory); parent->saveUserSettings(); if (!fn.isEmpty()) { int filtID=filt.indexOf(selFormat); @@ -831,8 +831,8 @@ void JKQTPMathImage::saveColorbarPlotAsImage(const QString &filename, const QByt { if (parent) { parent->loadUserSettings(); - QString currentSaveDirectory=parent->get_currentSaveDirectory(); - QString currentFileFormat=parent->get_currentFileFormat(); + QString currentSaveDirectory=parent->getCurrentSaveDirectory(); + QString currentFileFormat=parent->getCurrentFileFormat(); QString fn=filename; QStringList filt; QList writerformats=QImageWriter::supportedImageFormats(); @@ -848,8 +848,8 @@ void JKQTPMathImage::saveColorbarPlotAsImage(const QString &filename, const QByt if (!fn.isEmpty()) currentSaveDirectory=QFileInfo(fn).absolutePath(); } - parent->set_currentFileFormat(currentFileFormat); - parent->set_currentSaveDirectory(currentSaveDirectory); + parent->setCurrentFileFormat(currentFileFormat); + parent->setCurrentSaveDirectory(currentSaveDirectory); parent->saveUserSettings(); if (!fn.isEmpty()) { int filtID=filt.indexOf(selFormat); @@ -894,15 +894,15 @@ void JKQTPMathImage::getOutsideSize(JKQTPEnhancedPainter& painter, int& leftSpac if (colorBarRightVisible) { rightSpace+=parent->pt2px(painter, colorBarWidth+colorBarOffset); colorBarRightAxis->setRange(internalDataMin, internalDataMax); - colorBarRightAxis->set_axisWidth(colorBarRelativeHeight*parent->get_plotHeight()); + colorBarRightAxis->setAxisWidth(colorBarRelativeHeight*parent->getPlotHeight()); modifierColorBarRightAxis->setRange(internalModifierMin, internalModifierMax); - modifierColorBarRightAxis->set_axisWidth(parent->pt2px(painter, colorBarModifiedWidth)); + modifierColorBarRightAxis->setAxisWidth(parent->pt2px(painter, colorBarModifiedWidth)); QSize s=colorBarRightAxis->getSize2(painter); - /*parent->get_mathText()->set_fontSize(imageNameFontSize*parent->get_fontSizeMultiplier()); - parent->get_mathText()->set_fontRoman(imageNameFontName); - parent->get_mathText()->parse(imageName); - QSizeF names=parent->get_mathText()->getSize(painter);*/ - QSizeF names=parent->getTextSizeSize(imageNameFontName, imageNameFontSize*parent->get_fontSizeMultiplier(), imageName, painter); + /*parent->getMathText()->setFontSize(imageNameFontSize*parent->getFontSizeMultiplier()); + parent->getMathText()->setFontRoman(imageNameFontName); + parent->getMathText()->parse(imageName); + QSizeF names=parent->getMathText()->getSize(painter);*/ + QSizeF names=parent->getTextSizeSize(imageNameFontName, imageNameFontSize*parent->getFontSizeMultiplier(), imageName, painter); rightSpace+=parent->pt2px(painter, colorBarWidth+colorBarOffset)+qMax((double)s.width(), (double)names.width()); //qDebug()<<"osr: "<pt2px(painter, colorBarWidth+colorBarOffset); colorBarTopAxis->setRange(internalDataMin, internalDataMax); - colorBarTopAxis->set_axisWidth(colorBarRelativeHeight*parent->get_plotWidth()); + colorBarTopAxis->setAxisWidth(colorBarRelativeHeight*parent->getPlotWidth()); modifierColorBarTopAxis->setRange(internalModifierMin, internalModifierMax); - modifierColorBarTopAxis->set_axisWidth(parent->pt2px(painter, colorBarModifiedWidth)); + modifierColorBarTopAxis->setAxisWidth(parent->pt2px(painter, colorBarModifiedWidth)); QSize s=colorBarTopAxis->getSize2(painter); - /*parent->get_mathText()->set_fontSize(imageNameFontSize*parent->get_fontSizeMultiplier()); - parent->get_mathText()->set_fontRoman(imageNameFontName); - parent->get_mathText()->parse(imageName); - QSizeF names=parent->get_mathText()->getSize(painter);*/ - QSizeF names=parent->getTextSizeSize(imageNameFontName, imageNameFontSize*parent->get_fontSizeMultiplier(), imageName, painter); + /*parent->getMathText()->setFontSize(imageNameFontSize*parent->getFontSizeMultiplier()); + parent->getMathText()->setFontRoman(imageNameFontName); + parent->getMathText()->parse(imageName); + QSizeF names=parent->getMathText()->getSize(painter);*/ + QSizeF names=parent->getTextSizeSize(imageNameFontName, imageNameFontSize*parent->getFontSizeMultiplier(), imageName, painter); //qDebug()<pt2px(painter, colorBarWidth+colorBarOffset); topSpace+=parent->pt2px(painter, colorBarWidth+colorBarOffset)+qMax((double)s.height(), (double)names.height()); @@ -946,7 +946,7 @@ void JKQTPMathImage::drawOutside(JKQTPEnhancedPainter& painter, QRect /*leftSpac QImage b=drawOutsidePalette(200); - QSizeF names=parent->getTextSizeSize(imageNameFontName, imageNameFontSize*parent->get_fontSizeMultiplier(), imageName, painter); + QSizeF names=parent->getTextSizeSize(imageNameFontName, imageNameFontSize*parent->getFontSizeMultiplier(), imageName, painter); double icolorBarRelativeHeight=colorBarRelativeHeight; int barHeight=rightSpace.height()*icolorBarRelativeHeight; @@ -961,31 +961,31 @@ void JKQTPMathImage::drawOutside(JKQTPEnhancedPainter& painter, QRect /*leftSpac QRect cb(rightSpace.x()+parent->pt2px(painter, colorBarOffset), rightSpace.top()+(rightSpace.height()-barHeight)/2, parent->pt2px(painter, (modifierMode==ModifyNone)?colorBarWidth:colorBarModifiedWidth), barHeight); painter.drawImage(cb, b.mirrored(true, false)); QPen p=painter.pen(); - p.setColor(colorBarRightAxis->get_axisColor()); - p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, colorBarRightAxis->get_lineWidth()*parent->get_lineWidthMultiplier()))); + p.setColor(colorBarRightAxis->getAxisColor()); + p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, colorBarRightAxis->getLineWidth()*parent->getLineWidthMultiplier()))); painter.setPen(p); painter.drawRect(cb); colorBarRightAxis->setRange(internalDataMin, internalDataMax); - colorBarRightAxis->set_axisWidth(cb.height()); - colorBarRightAxis->set_axisOffset(cb.top()); + colorBarRightAxis->setAxisWidth(cb.height()); + colorBarRightAxis->setAxisOffset(cb.top()); colorBarRightAxis->set_otherAxisOffset(cb.left()); colorBarRightAxis->set_otherAxisWidth(cb.width()); colorBarRightAxis->drawAxes(painter); if (modifierMode!=ModifyNone) { modifierColorBarRightAxis->setRange(internalModifierMin, internalModifierMax); - modifierColorBarRightAxis->set_axisWidth(parent->pt2px(painter, colorBarModifiedWidth)); - modifierColorBarRightAxis->set_axisOffset(cb.left()); + modifierColorBarRightAxis->setAxisWidth(parent->pt2px(painter, colorBarModifiedWidth)); + modifierColorBarRightAxis->setAxisOffset(cb.left()); modifierColorBarRightAxis->set_otherAxisOffset(cb.top()); modifierColorBarRightAxis->set_otherAxisWidth(cb.height()); modifierColorBarRightAxis->drawAxes(painter); } - parent->get_mathText()->set_fontSize(imageNameFontSize*parent->get_fontSizeMultiplier()); - parent->get_mathText()->set_fontRoman(imageNameFontName); - parent->get_mathText()->parse(imageName); - parent->get_mathText()->draw(painter, Qt::AlignHCenter|Qt::AlignVCenter, QRect(rightSpace.x(), rightSpace.y(), rightSpace.width(), (rightSpace.height()-barHeight)/2)); + parent->getMathText()->setFontSize(imageNameFontSize*parent->getFontSizeMultiplier()); + parent->getMathText()->setFontRoman(imageNameFontName); + parent->getMathText()->parse(imageName); + parent->getMathText()->draw(painter, Qt::AlignHCenter|Qt::AlignVCenter, QRect(rightSpace.x(), rightSpace.y(), rightSpace.width(), (rightSpace.height()-barHeight)/2)); painter.restore(); } @@ -999,7 +999,7 @@ void JKQTPMathImage::drawOutside(JKQTPEnhancedPainter& painter, QRect /*leftSpac QImage b=drawOutsidePalette(200); - QSizeF names=parent->getTextSizeSize(imageNameFontName, imageNameFontSize*parent->get_fontSizeMultiplier(), imageName, painter); + QSizeF names=parent->getTextSizeSize(imageNameFontName, imageNameFontSize*parent->getFontSizeMultiplier(), imageName, painter); double icolorBarRelativeHeight=colorBarRelativeHeight; int barWidth=topSpace.width()*icolorBarRelativeHeight; @@ -1016,32 +1016,32 @@ void JKQTPMathImage::drawOutside(JKQTPEnhancedPainter& painter, QRect /*leftSpac rm.rotate(90); painter.drawImage(cb, b.transformed(rm)); QPen p=painter.pen(); - p.setColor(colorBarTopAxis->get_axisColor()); - p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, colorBarTopAxis->get_lineWidth()*parent->get_lineWidthMultiplier()))); + p.setColor(colorBarTopAxis->getAxisColor()); + p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, colorBarTopAxis->getLineWidth()*parent->getLineWidthMultiplier()))); painter.setPen(p); painter.drawRect(cb); colorBarTopAxis->setRange(internalDataMin, internalDataMax); - colorBarTopAxis->set_axisWidth(cb.width()); - colorBarTopAxis->set_axisOffset(cb.left()); + colorBarTopAxis->setAxisWidth(cb.width()); + colorBarTopAxis->setAxisOffset(cb.left()); colorBarTopAxis->set_otherAxisOffset(cb.top()); colorBarTopAxis->set_otherAxisWidth(cb.height()); colorBarTopAxis->drawAxes(painter); if (modifierMode!=ModifyNone) { modifierColorBarTopAxis->setRange(internalModifierMin, internalModifierMax); - modifierColorBarTopAxis->set_axisWidth(parent->pt2px(painter, colorBarModifiedWidth)); - modifierColorBarTopAxis->set_axisOffset(cb.top()); + modifierColorBarTopAxis->setAxisWidth(parent->pt2px(painter, colorBarModifiedWidth)); + modifierColorBarTopAxis->setAxisOffset(cb.top()); modifierColorBarTopAxis->set_otherAxisOffset(cb.left()); modifierColorBarTopAxis->set_otherAxisWidth(cb.width()); modifierColorBarTopAxis->drawAxes(painter); } - parent->get_mathText()->set_fontSize(imageNameFontSize*parent->get_fontSizeMultiplier()); - parent->get_mathText()->set_fontRoman(imageNameFontName); - parent->get_mathText()->parse(imageName); - parent->get_mathText()->draw(painter, Qt::AlignHCenter|Qt::AlignVCenter, QRect(topSpace.right()-(topSpace.width()-barWidth)/2, topSpace.y(), (topSpace.width()-barWidth)/2, topSpace.height())); + parent->getMathText()->setFontSize(imageNameFontSize*parent->getFontSizeMultiplier()); + parent->getMathText()->setFontRoman(imageNameFontName); + parent->getMathText()->parse(imageName); + parent->getMathText()->draw(painter, Qt::AlignHCenter|Qt::AlignVCenter, QRect(topSpace.right()-(topSpace.width()-barWidth)/2, topSpace.y(), (topSpace.width()-barWidth)/2, topSpace.height())); painter.restore(); } @@ -1413,7 +1413,7 @@ JKQTPOverlayImageEnhanced::JKQTPOverlayImageEnhanced(JKQTPlotter *parent): } void JKQTPOverlayImageEnhanced::drawKeyMarker(JKQTPEnhancedPainter& painter, QRectF& rect) { if (drawAsRectangles) JKQTPOverlayImage::drawKeyMarker(painter, rect); - else JKQTPPlotSymbol(painter, rect.center().x(), rect.center().y(), symbol, qMin(rect.width(), rect.height()), parent->pt2px(painter, symbolWidth*parent->get_lineWidthMultiplier()), trueColor, trueColor.lighter()); + else JKQTPPlotSymbol(painter, rect.center().x(), rect.center().y(), symbol, qMin(rect.width(), rect.height()), parent->pt2px(painter, symbolWidth*parent->getLineWidthMultiplier()), trueColor, trueColor.lighter()); } void JKQTPOverlayImageEnhanced::draw(JKQTPEnhancedPainter& painter) { @@ -1448,7 +1448,7 @@ void JKQTPOverlayImageEnhanced::draw(JKQTPEnhancedPainter& painter) { } else { QPointF p=(p1+p2)/2.0; if (data[ix+iy*Nx]) { - JKQTPPlotSymbol(painter, p.x(), p.y(), symbol, fabs(p2.x()-p1.x())*symbolSizeFactor, parent->pt2px(painter, symbolWidth*parent->get_lineWidthMultiplier()), trueColor, trueColor.lighter()); + JKQTPPlotSymbol(painter, p.x(), p.y(), symbol, fabs(p2.x()-p1.x())*symbolSizeFactor, parent->pt2px(painter, symbolWidth*parent->getLineWidthMultiplier()), trueColor, trueColor.lighter()); } } } @@ -1483,64 +1483,64 @@ void JKQTPRGBMathImage::initObject() rgbMode=JKQTPRGBMathImageModeRGBMode; colorBarRightAxis=new JKQTPVerticalIndependentAxis(0, 100, 0, 100, parent); - if (parent) colorBarRightAxis->loadSettings(parent->get_yAxis()); + if (parent) colorBarRightAxis->loadSettings(parent->getYAxis()); colorBarRightAxis->set_drawMode1(JKQTPCADMline); colorBarRightAxis->set_drawMode2(JKQTPCADMcomplete); - colorBarRightAxis->set_axisLabel(""); + colorBarRightAxis->setAxisLabel(""); colorBarRightAxis->set_minTicks(5); colorBarRightAxis->set_minorTicks(0); colorBarRightAxis->set_tickOutsideLength(0); colorBarRightAxis->set_minorTickOutsideLength(0); - colorBarRightAxis->set_showZeroAxis(false); + colorBarRightAxis->setShowZeroAxis(false); colorBarTopAxis=new JKQTPHorizontalIndependentAxis(0, 100, 0, 100, parent); - if (parent) colorBarTopAxis->loadSettings(parent->get_xAxis()); + if (parent) colorBarTopAxis->loadSettings(parent->getXAxis()); colorBarTopAxis->set_drawMode1(JKQTPCADMline); colorBarTopAxis->set_drawMode2(JKQTPCADMcomplete); - colorBarTopAxis->set_axisLabel(""); + colorBarTopAxis->setAxisLabel(""); colorBarTopAxis->set_minTicks(3); colorBarTopAxis->set_minorTicks(0); colorBarTopAxis->set_tickOutsideLength(0); colorBarTopAxis->set_minorTickOutsideLength(0); - colorBarTopAxis->set_showZeroAxis(false); + colorBarTopAxis->setShowZeroAxis(false); colorBarRightAxisG=new JKQTPVerticalIndependentAxis(0, 100, 0, 100, parent); - if (parent) colorBarRightAxisG->loadSettings(parent->get_yAxis()); + if (parent) colorBarRightAxisG->loadSettings(parent->getYAxis()); colorBarRightAxisG->set_drawMode1(JKQTPCADMline); colorBarRightAxisG->set_drawMode2(JKQTPCADMcomplete); - colorBarRightAxisG->set_axisLabel(""); + colorBarRightAxisG->setAxisLabel(""); colorBarRightAxisG->set_minTicks(5); - colorBarRightAxisG->set_showZeroAxis(false); + colorBarRightAxisG->setShowZeroAxis(false); colorBarRightAxisG->set_minorTicks(0); colorBarRightAxisG->set_tickOutsideLength(0); colorBarRightAxisG->set_minorTickOutsideLength(0); colorBarTopAxisG=new JKQTPHorizontalIndependentAxis(0, 100, 0, 100, parent); - if (parent) colorBarTopAxisG->loadSettings(parent->get_xAxis()); + if (parent) colorBarTopAxisG->loadSettings(parent->getXAxis()); colorBarTopAxisG->set_drawMode1(JKQTPCADMline); colorBarTopAxisG->set_drawMode2(JKQTPCADMcomplete); - colorBarTopAxisG->set_axisLabel(""); + colorBarTopAxisG->setAxisLabel(""); colorBarTopAxisG->set_minTicks(3); - colorBarTopAxisG->set_showZeroAxis(false); + colorBarTopAxisG->setShowZeroAxis(false); colorBarTopAxisG->set_minorTicks(0); colorBarTopAxisG->set_tickOutsideLength(0); colorBarTopAxisG->set_minorTickOutsideLength(0); colorBarRightAxisB=new JKQTPVerticalIndependentAxis(0, 100, 0, 100, parent); - if (parent) colorBarRightAxisB->loadSettings(parent->get_yAxis()); + if (parent) colorBarRightAxisB->loadSettings(parent->getYAxis()); colorBarRightAxisB->set_drawMode1(JKQTPCADMline); colorBarRightAxisB->set_drawMode2(JKQTPCADMcomplete); - colorBarRightAxisB->set_axisLabel(""); + colorBarRightAxisB->setAxisLabel(""); colorBarRightAxisB->set_minTicks(5); - colorBarRightAxisB->set_showZeroAxis(false); + colorBarRightAxisB->setShowZeroAxis(false); colorBarRightAxisB->set_minorTicks(0); colorBarRightAxisB->set_tickOutsideLength(0); colorBarRightAxisB->set_minorTickOutsideLength(0); colorBarTopAxisB=new JKQTPHorizontalIndependentAxis(0, 100, 0, 100, parent); - if (parent) colorBarTopAxisB->loadSettings(parent->get_xAxis()); + if (parent) colorBarTopAxisB->loadSettings(parent->getXAxis()); colorBarTopAxisB->set_drawMode1(JKQTPCADMline); colorBarTopAxisB->set_drawMode2(JKQTPCADMcomplete); - colorBarTopAxisB->set_axisLabel(""); + colorBarTopAxisB->setAxisLabel(""); colorBarTopAxisB->set_minTicks(3); - colorBarTopAxisB->set_showZeroAxis(false); + colorBarTopAxisB->setShowZeroAxis(false); colorBarTopAxisB->set_minorTicks(0); colorBarTopAxisB->set_tickOutsideLength(0); colorBarTopAxisB->set_minorTickOutsideLength(0); @@ -1548,8 +1548,8 @@ void JKQTPRGBMathImage::initObject() this->colorBarTopVisible=true; this->colorBarRightVisible=true; - this->imageNameFontName=parent->get_keyFont(); - this->imageNameFontSize=parent->get_keyFontSize(); + this->imageNameFontName=parent->getKeyFont(); + this->imageNameFontSize=parent->getKeyFontSize(); this->imageName=""; this->showColorBar=true; this->colorBarWidth=14; @@ -1642,29 +1642,29 @@ void JKQTPRGBMathImage::getOutsideSize(JKQTPEnhancedPainter& painter, int& leftS if (colorBarRightVisible) { if (!colorbarsSideBySide || (colorbarsSideBySide && !firstC)) rightSpace+=parent->pt2px(painter, colorBarWidth+colorBarOffset); colorBarRightAxis->setRange(internalDataMin, internalDataMax); - colorBarRightAxis->set_axisWidth(sizeFactor*colorBarRelativeHeight*parent->get_plotHeight()); - colorBarRightAxisB->set_axisLabel(imageName); + colorBarRightAxis->setAxisWidth(sizeFactor*colorBarRelativeHeight*parent->getPlotHeight()); + colorBarRightAxisB->setAxisLabel(imageName); QSize s=colorBarRightAxis->getSize2(painter); if (!colorbarsSideBySide || (colorbarsSideBySide && !firstC)) rightSpace+=parent->pt2px(painter, colorBarWidth+colorBarOffset)+(double)s.width(); /*QSize s=colorBarRightAxis->getSize2(painter); - parent->get_mathText()->set_fontSize(imageNameFontSize*parent->get_fontSizeMultiplier()); - parent->get_mathText()->set_fontRoman(imageNameFontName); - parent->get_mathText()->parse(imageName); - QSizeF names=parent->get_mathText()->getSize(painter); + parent->getMathText()->setFontSize(imageNameFontSize*parent->getFontSizeMultiplier()); + parent->getMathText()->setFontRoman(imageNameFontName); + parent->getMathText()->parse(imageName); + QSizeF names=parent->getMathText()->getSize(painter); if (!colorbarsSideBySide || (colorbarsSideBySide && !firstC)) rightSpace+=colorBarWidth+colorBarOffset+qMax((double)s.width(), (double)names.width());*/ } if (colorBarTopVisible) { //if (!colorbarsSideBySide || (colorbarsSideBySide && !firstC)) topSpace+=parent->pt2px(painter, colorBarWidth+colorBarOffset); colorBarTopAxis->setRange(internalDataMin, internalDataMax); - colorBarTopAxis->set_axisWidth(sizeFactor*colorBarRelativeHeight*parent->get_plotWidth()); - colorBarTopAxisB->set_axisLabel(imageName); + colorBarTopAxis->setAxisWidth(sizeFactor*colorBarRelativeHeight*parent->getPlotWidth()); + colorBarTopAxisB->setAxisLabel(imageName); QSize s=colorBarTopAxisB->getSize2(painter); if (!colorbarsSideBySide || (colorbarsSideBySide && !firstC)) topSpace+=parent->pt2px(painter, colorBarWidth+colorBarOffset)+(double)s.height(); /*QSize s=colorBarTopAxis->getSize2(painter); - parent->get_mathText()->set_fontSize(imageNameFontSize*parent->get_fontSizeMultiplier()); - parent->get_mathText()->set_fontRoman(imageNameFontName); - parent->get_mathText()->parse(imageName); - QSizeF names=parent->get_mathText()->getSize(painter); + parent->getMathText()->setFontSize(imageNameFontSize*parent->getFontSizeMultiplier()); + parent->getMathText()->setFontRoman(imageNameFontName); + parent->getMathText()->parse(imageName); + QSizeF names=parent->getMathText()->getSize(painter); if (!colorbarsSideBySide || (colorbarsSideBySide && !firstC)) topSpace+=colorBarWidth+colorBarOffset+qMax((double)s.height(), (double)names.height());*/ } firstC=true; @@ -1675,29 +1675,29 @@ void JKQTPRGBMathImage::getOutsideSize(JKQTPEnhancedPainter& painter, int& leftS if (colorBarRightVisible) { if (!colorbarsSideBySide || (colorbarsSideBySide && !firstC)) rightSpace+=parent->pt2px(painter, colorBarWidth+colorBarOffset); colorBarRightAxisG->setRange(internalDataMinG, internalDataMaxG); - colorBarRightAxisG->set_axisWidth(sizeFactor*colorBarRelativeHeight*parent->get_plotHeight()); - colorBarRightAxisB->set_axisLabel(imageNameG); + colorBarRightAxisG->setAxisWidth(sizeFactor*colorBarRelativeHeight*parent->getPlotHeight()); + colorBarRightAxisB->setAxisLabel(imageNameG); QSize s=colorBarRightAxis->getSize2(painter); if (!colorbarsSideBySide || (colorbarsSideBySide && !firstC)) rightSpace+=parent->pt2px(painter, colorBarWidth+colorBarOffset)+(double)s.width(); /*QSize s=colorBarRightAxis->getSize2(painter); - parent->get_mathText()->set_fontSize(imageNameFontSize*parent->get_fontSizeMultiplier()); - parent->get_mathText()->set_fontRoman(imageNameFontName); - parent->get_mathText()->parse(imageNameG); - QSizeF names=parent->get_mathText()->getSize(painter); + parent->getMathText()->setFontSize(imageNameFontSize*parent->getFontSizeMultiplier()); + parent->getMathText()->setFontRoman(imageNameFontName); + parent->getMathText()->parse(imageNameG); + QSizeF names=parent->getMathText()->getSize(painter); if (!colorbarsSideBySide || (colorbarsSideBySide && !firstC)) rightSpace+=colorBarWidth+colorBarOffset+qMax((double)s.width(), (double)names.width());*/ } if (colorBarTopVisible) { //if (!colorbarsSideBySide || (colorbarsSideBySide && !firstC)) topSpace+=parent->pt2px(painter, colorBarWidth+colorBarOffset); colorBarTopAxisG->setRange(internalDataMinG, internalDataMaxG); - colorBarTopAxisG->set_axisWidth(sizeFactor*colorBarRelativeHeight*parent->get_plotWidth()); - colorBarTopAxisB->set_axisLabel(imageNameG); + colorBarTopAxisG->setAxisWidth(sizeFactor*colorBarRelativeHeight*parent->getPlotWidth()); + colorBarTopAxisB->setAxisLabel(imageNameG); QSize s=colorBarTopAxisB->getSize2(painter); if (!colorbarsSideBySide || (colorbarsSideBySide && !firstC)) topSpace+=parent->pt2px(painter, colorBarWidth+colorBarOffset)+(double)s.height(); /*QSize s=colorBarTopAxisG->getSize2(painter); - parent->get_mathText()->set_fontSize(imageNameFontSize*parent->get_fontSizeMultiplier()); - parent->get_mathText()->set_fontRoman(imageNameFontName); - parent->get_mathText()->parse(imageNameG); - QSizeF names=parent->get_mathText()->getSize(painter); + parent->getMathText()->setFontSize(imageNameFontSize*parent->getFontSizeMultiplier()); + parent->getMathText()->setFontRoman(imageNameFontName); + parent->getMathText()->parse(imageNameG); + QSizeF names=parent->getMathText()->getSize(painter); if (!colorbarsSideBySide || (colorbarsSideBySide && !firstC)) topSpace+=colorBarWidth+colorBarOffset+qMax((double)s.height(), (double)names.height());*/ } firstC=true; @@ -1708,28 +1708,28 @@ void JKQTPRGBMathImage::getOutsideSize(JKQTPEnhancedPainter& painter, int& leftS if (colorBarRightVisible) { if (!colorbarsSideBySide || (colorbarsSideBySide && !firstC)) rightSpace+=parent->pt2px(painter, colorBarWidth+colorBarOffset); colorBarRightAxisB->setRange(internalDataMinB, internalDataMaxB); - colorBarRightAxisB->set_axisWidth(sizeFactor*colorBarRelativeHeight*parent->get_plotHeight()); - colorBarRightAxisB->set_axisLabel(imageNameB); + colorBarRightAxisB->setAxisWidth(sizeFactor*colorBarRelativeHeight*parent->getPlotHeight()); + colorBarRightAxisB->setAxisLabel(imageNameB); QSize s=colorBarRightAxis->getSize2(painter); if (!colorbarsSideBySide || (colorbarsSideBySide && !firstC)) rightSpace+=parent->pt2px(painter, colorBarWidth+colorBarOffset)+(double)s.width(); /* - parent->get_mathText()->set_fontSize(imageNameFontSize*parent->get_fontSizeMultiplier()); - parent->get_mathText()->set_fontRoman(imageNameFontName); - parent->get_mathText()->parse(imageNameB); - QSizeF names=parent->get_mathText()->getSize(painter); + parent->getMathText()->setFontSize(imageNameFontSize*parent->getFontSizeMultiplier()); + parent->getMathText()->setFontRoman(imageNameFontName); + parent->getMathText()->parse(imageNameB); + QSizeF names=parent->getMathText()->getSize(painter); if (!colorbarsSideBySide || (colorbarsSideBySide && !firstC)) rightSpace+=colorBarWidth+colorBarOffset+qMax((double)s.width(), (double)names.width());*/ } if (colorBarTopVisible) { //if (!colorbarsSideBySide || (colorbarsSideBySide && !firstC)) topSpace+=parent->pt2px(painter, colorBarWidth+colorBarOffset); colorBarTopAxisB->setRange(internalDataMinB, internalDataMaxB); - colorBarTopAxisB->set_axisWidth(sizeFactor*colorBarRelativeHeight*parent->get_plotWidth()); - colorBarTopAxisB->set_axisLabel(imageNameB); + colorBarTopAxisB->setAxisWidth(sizeFactor*colorBarRelativeHeight*parent->getPlotWidth()); + colorBarTopAxisB->setAxisLabel(imageNameB); QSize s=colorBarTopAxisB->getSize2(painter); if (!colorbarsSideBySide || (colorbarsSideBySide && !firstC)) topSpace+=parent->pt2px(painter, colorBarWidth+colorBarOffset)+(double)s.height(); - /*parent->get_mathText()->set_fontSize(imageNameFontSize*parent->get_fontSizeMultiplier()); - parent->get_mathText()->set_fontRoman(imageNameFontName); - parent->get_mathText()->parse(imageNameB); - QSizeF names=parent->get_mathText()->getSize(painter); + /*parent->getMathText()->setFontSize(imageNameFontSize*parent->getFontSizeMultiplier()); + parent->getMathText()->setFontRoman(imageNameFontName); + parent->getMathText()->parse(imageNameB); + QSizeF names=parent->getMathText()->getSize(painter); if (!colorbarsSideBySide || (colorbarsSideBySide && !firstC)) topSpace+=colorBarWidth+colorBarOffset+qMax((double)s.height(), (double)names.height());*/ } firstC=true; @@ -1901,19 +1901,19 @@ void JKQTPRGBMathImage::drawOutside(JKQTPEnhancedPainter& painter, QRect /*leftS QRect cb(rX, rY, parent->pt2px(painter, colorBarWidth), gbarHeight); painter.drawImage(cb, l[li].paletteImage.mirrored(true, false)); QPen p=painter.pen(); - p.setColor(l[li].colorBarRightAxis->get_axisColor()); - p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, l[li].colorBarRightAxis->get_lineWidth()*parent->get_lineWidthMultiplier()))); + p.setColor(l[li].colorBarRightAxis->getAxisColor()); + p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, l[li].colorBarRightAxis->getLineWidth()*parent->getLineWidthMultiplier()))); painter.setPen(p); painter.drawRect(cb); l[li].colorBarRightAxis->setRange(l[li].internalDataMin, l[li].internalDataMax); - l[li].colorBarRightAxis->set_axisWidth(cb.height()); - l[li].colorBarRightAxis->set_axisOffset(cb.top()); + l[li].colorBarRightAxis->setAxisWidth(cb.height()); + l[li].colorBarRightAxis->setAxisOffset(cb.top()); l[li].colorBarRightAxis->set_otherAxisOffset(cb.left()); l[li].colorBarRightAxis->set_otherAxisWidth(cb.width()); - l[li].colorBarRightAxis->set_labelFontSize(imageNameFontSize*parent->get_fontSizeMultiplier()); + l[li].colorBarRightAxis->set_labelFontSize(imageNameFontSize*parent->getFontSizeMultiplier()); l[li].colorBarRightAxis->set_labelFont(imageNameFontName); - l[li].colorBarRightAxis->set_axisLabel(l[li].name); + l[li].colorBarRightAxis->setAxisLabel(l[li].name); l[li].colorBarRightAxis->drawAxes(painter); painter.restore(); @@ -1933,20 +1933,20 @@ void JKQTPRGBMathImage::drawOutside(JKQTPEnhancedPainter& painter, QRect /*leftS mt.rotate(90); painter.drawImage(cb, l[li].paletteImage.transformed(mt)); QPen p=painter.pen(); - p.setColor(l[li].colorBarTopAxis->get_axisColor()); - p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, l[li].colorBarTopAxis->get_lineWidth()*parent->get_lineWidthMultiplier()))); + p.setColor(l[li].colorBarTopAxis->getAxisColor()); + p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, l[li].colorBarTopAxis->getLineWidth()*parent->getLineWidthMultiplier()))); painter.setPen(p); painter.drawRect(cb); l[li].colorBarTopAxis->setRange(l[li].internalDataMin, l[li].internalDataMax); - l[li].colorBarTopAxis->set_axisWidth(cb.width()); - l[li].colorBarTopAxis->set_axisOffset(cb.left()); + l[li].colorBarTopAxis->setAxisWidth(cb.width()); + l[li].colorBarTopAxis->setAxisOffset(cb.left()); l[li].colorBarTopAxis->set_otherAxisOffset(cb.top()); l[li].colorBarTopAxis->set_otherAxisWidth(cb.height()); - l[li].colorBarTopAxis->set_labelFontSize(imageNameFontSize*parent->get_fontSizeMultiplier()); + l[li].colorBarTopAxis->set_labelFontSize(imageNameFontSize*parent->getFontSizeMultiplier()); l[li].colorBarTopAxis->set_labelFont(imageNameFontName); - l[li].colorBarTopAxis->set_axisLabel(l[li].name); + l[li].colorBarTopAxis->setAxisLabel(l[li].name); l[li].colorBarTopAxis->drawAxes(painter); painter.restore(); @@ -2120,8 +2120,8 @@ void JKQTPRGBMathImage::saveImagePlotAsImage(const QString &filename, const QByt { if (parent) { parent->loadUserSettings(); - QString currentSaveDirectory=parent->get_currentSaveDirectory(); - QString currentFileFormat=parent->get_currentFileFormat(); + QString currentSaveDirectory=parent->getCurrentSaveDirectory(); + QString currentFileFormat=parent->getCurrentFileFormat(); QString fn=filename; QStringList filt; QList writerformats=QImageWriter::supportedImageFormats(); @@ -2137,8 +2137,8 @@ void JKQTPRGBMathImage::saveImagePlotAsImage(const QString &filename, const QByt if (!fn.isEmpty()) currentSaveDirectory=QFileInfo(fn).absolutePath(); } - parent->set_currentFileFormat(currentFileFormat); - parent->set_currentSaveDirectory(currentSaveDirectory); + parent->setCurrentFileFormat(currentFileFormat); + parent->setCurrentSaveDirectory(currentSaveDirectory); parent->saveUserSettings(); if (!fn.isEmpty()) { int filtID=filt.indexOf(selFormat); @@ -2623,8 +2623,8 @@ void JKQTPOverlayImage::saveImagePlotAsImage(const QString &filename, const QByt { if (parent) { parent->loadUserSettings(); - QString currentSaveDirectory=parent->get_currentSaveDirectory(); - QString currentFileFormat=parent->get_currentFileFormat(); + QString currentSaveDirectory=parent->getCurrentSaveDirectory(); + QString currentFileFormat=parent->getCurrentFileFormat(); QString fn=filename; QStringList filt; QList writerformats=QImageWriter::supportedImageFormats(); @@ -2640,8 +2640,8 @@ void JKQTPOverlayImage::saveImagePlotAsImage(const QString &filename, const QByt if (!fn.isEmpty()) currentSaveDirectory=QFileInfo(fn).absolutePath(); } - parent->set_currentFileFormat(currentFileFormat); - parent->set_currentSaveDirectory(currentSaveDirectory); + parent->setCurrentFileFormat(currentFileFormat); + parent->setCurrentSaveDirectory(currentSaveDirectory); parent->saveUserSettings(); if (!fn.isEmpty()) { int filtID=filt.indexOf(selFormat); @@ -2694,7 +2694,7 @@ void JKQTPContour::draw(JKQTPEnhancedPainter &painter) QPen p; p.setStyle(style); p.setColor(lineColor); - p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, lineWidth*parent->get_lineWidthMultiplier()))); + p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, lineWidth*parent->getLineWidthMultiplier()))); painter.setPen(p); QImage colorLevels = getPaletteImage(palette,numberOfLevels); diff --git a/lib/jkqtplotter/jkqtpgraphsimage.h b/lib/jkqtplotter/jkqtpgraphsimage.h index 75e09af510..a6392edf66 100644 --- a/lib/jkqtplotter/jkqtpgraphsimage.h +++ b/lib/jkqtplotter/jkqtpgraphsimage.h @@ -484,7 +484,7 @@ class LIB_EXPORT JKQTPMathImage: public JKQTPMathImageBase { /*! \brief returns the property rangeMinFailAction. \details Description of the parameter rangeMinFailAction is:
\copydoc rangeMinFailAction
\see rangeMinFailAction for more information */ - inline virtual JKQTPMathImageColorRangeFailAction get_rangeMinFailAction() const + inline virtual JKQTPMathImageColorRangeFailAction getAction_rangeMinFail() const { return this->rangeMinFailAction; } @@ -498,7 +498,7 @@ class LIB_EXPORT JKQTPMathImage: public JKQTPMathImageBase { /*! \brief returns the property rangeMaxFailAction. \details Description of the parameter rangeMaxFailAction is:
\copydoc rangeMaxFailAction
\see rangeMaxFailAction for more information */ - inline virtual JKQTPMathImageColorRangeFailAction get_rangeMaxFailAction() const + inline virtual JKQTPMathImageColorRangeFailAction getAction_rangeMaxFail() const { return this->rangeMaxFailAction; } @@ -561,14 +561,14 @@ class LIB_EXPORT JKQTPMathImage: public JKQTPMathImageBase { /*! \brief sets the property showColorBar to the specified \a __value. \details Description of the parameter showColorBar is:
\copydoc showColorBar
\see showColorBar for more information */ - inline virtual void set_showColorBar(bool __value) + inline virtual void setShowColorBar(bool __value) { this->showColorBar = __value; } /*! \brief returns the property showColorBar. \details Description of the parameter showColorBar is:
\copydoc showColorBar
\see showColorBar for more information */ - inline virtual bool get_showColorBar() const + inline virtual bool getShowColorBar() const { return this->showColorBar; } @@ -1005,14 +1005,14 @@ class LIB_EXPORT JKQTPRGBMathImage: public JKQTPMathImageBase { /*! \brief sets the property showColorBar to the specified \a __value. \details Description of the parameter showColorBar is:
\copydoc showColorBar
\see showColorBar for more information */ - inline virtual void set_showColorBar(bool __value) + inline virtual void setShowColorBar(bool __value) { this->showColorBar = __value; } /*! \brief returns the property showColorBar. \details Description of the parameter showColorBar is:
\copydoc showColorBar
\see showColorBar for more information */ - inline virtual bool get_showColorBar() const + inline virtual bool getShowColorBar() const { return this->showColorBar; } @@ -1905,14 +1905,14 @@ class LIB_EXPORT JKQTPContour: public JKQTPMathImage { /*! \brief sets the property lineColor to the specified \a __value. \details Description of the parameter lineColor is:
\copydoc lineColor
\see lineColor for more information */ - inline virtual void set_lineColor(const QColor & __value) + inline virtual void setLineColor(const QColor & __value) { this->lineColor = __value; } /*! \brief returns the property lineColor. \details Description of the parameter lineColor is:
\copydoc lineColor
\see lineColor for more information */ - inline virtual QColor get_lineColor() const + inline virtual QColor getLineColor() const { return this->lineColor; } @@ -1933,14 +1933,14 @@ class LIB_EXPORT JKQTPContour: public JKQTPMathImage { /*! \brief sets the property lineWidth to the specified \a __value. \details Description of the parameter lineWidth is:
\copydoc lineWidth
\see lineWidth for more information */ - inline virtual void set_lineWidth(double __value) + inline virtual void setLineWidth(double __value) { this->lineWidth = __value; } /*! \brief returns the property lineWidth. \details Description of the parameter lineWidth is:
\copydoc lineWidth
\see lineWidth for more information */ - inline virtual double get_lineWidth() const + inline virtual double getLineWidth() const { return this->lineWidth; } diff --git a/lib/jkqtplotter/jkqtpgraphsimpulses.cpp b/lib/jkqtplotter/jkqtpgraphsimpulses.cpp index 45a3f1c532..7b009c362b 100644 --- a/lib/jkqtplotter/jkqtpgraphsimpulses.cpp +++ b/lib/jkqtplotter/jkqtpgraphsimpulses.cpp @@ -75,7 +75,7 @@ void JKQTPImpulsesHorizontalGraph::draw(JKQTPEnhancedPainter& painter) { QPen p=painter.pen(); p.setColor(color); - p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, lineWidth*parent->get_lineWidthMultiplier()))); + p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, lineWidth*parent->getLineWidthMultiplier()))); p.setStyle(Qt::SolidLine); p.setCapStyle(Qt::FlatCap); @@ -99,15 +99,15 @@ void JKQTPImpulsesHorizontalGraph::draw(JKQTPEnhancedPainter& painter) { //double xold=-1; //double yold=-1; double x0=transformX(baseline); - if (parent->get_xAxis()->isLogAxis()) { - if (baseline>0 && baseline>parent->get_xAxis()->getMin()) x0=transformX(baseline); - else x0=transformX(parent->get_xAxis()->getMin()); + if (parent->getXAxis()->isLogAxis()) { + if (baseline>0 && baseline>parent->getXAxis()->getMin()) x0=transformX(baseline); + else x0=transformX(parent->getXAxis()->getMin()); } // double y0=transformY(baseline); -// if (parent->get_yAxis()->isLogAxis()) { -// y0=transformY(parent->get_yAxis()->getMin()); -// if (baseline>0 && baseline>parent->get_yAxis()->getMin()) y0=transformY(baseline); -// else y0=transformY(parent->get_yAxis()->getMin()); +// if (parent->getYAxis()->isLogAxis()) { +// y0=transformY(parent->getYAxis()->getMin()); +// if (baseline>0 && baseline>parent->getYAxis()->getMin()) y0=transformY(baseline); +// else y0=transformY(parent->getYAxis()->getMin()); // } //bool first=false; QVector lines; @@ -143,7 +143,7 @@ void JKQTPImpulsesHorizontalGraph::drawKeyMarker(JKQTPEnhancedPainter& painter, p.setColor(color); p.setStyle(Qt::SolidLine); p.setCapStyle(Qt::FlatCap); - p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH,qMin(parent->pt2px(painter, qMax(.01, lineWidth)), rect.height()/2.0)*parent->get_lineWidthMultiplier())); + p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH,qMin(parent->pt2px(painter, qMax(.01, lineWidth)), rect.height()/2.0)*parent->getLineWidthMultiplier())); painter.setPen(p); int y=rect.top()+rect.height()/2.0; painter.drawLine(rect.left(), y, rect.right(), y); @@ -189,7 +189,7 @@ void JKQTPImpulsesVerticalGraph::draw(JKQTPEnhancedPainter& painter) { QPen p=painter.pen(); p.setColor(color); - p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, lineWidth*parent->get_lineWidthMultiplier()))); + p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(painter, lineWidth*parent->getLineWidthMultiplier()))); p.setStyle(Qt::SolidLine); p.setCapStyle(Qt::FlatCap); @@ -214,15 +214,15 @@ void JKQTPImpulsesVerticalGraph::draw(JKQTPEnhancedPainter& painter) { //double yold=-1; //bool first=false; // double x0=transformX(baseline); -// if (parent->get_xAxis()->isLogAxis()) { -// if (baseline>0 && baseline>parent->get_xAxis()->getMin()) x0=transformX(baseline); -// else x0=transformX(parent->get_xAxis()->getMin()); +// if (parent->getXAxis()->isLogAxis()) { +// if (baseline>0 && baseline>parent->getXAxis()->getMin()) x0=transformX(baseline); +// else x0=transformX(parent->getXAxis()->getMin()); // } double y0=transformY(baseline); - if (parent->get_yAxis()->isLogAxis()) { - y0=transformY(parent->get_yAxis()->getMin()); - if (baseline>0 && baseline>parent->get_yAxis()->getMin()) y0=transformY(baseline); - else y0=transformY(parent->get_yAxis()->getMin()); + if (parent->getYAxis()->isLogAxis()) { + y0=transformY(parent->getYAxis()->getMin()); + if (baseline>0 && baseline>parent->getYAxis()->getMin()) y0=transformY(baseline); + else y0=transformY(parent->getYAxis()->getMin()); } QVector lines; intSortData(); @@ -256,7 +256,7 @@ void JKQTPImpulsesVerticalGraph::draw(JKQTPEnhancedPainter& painter) { QPen JKQTPImpulsesHorizontalGraph::getPen(JKQTPEnhancedPainter& painter) const { QPen p; p.setColor(color); - p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH,parent->pt2px(painter, parent->get_lineWidthMultiplier()*lineWidth))); + p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH,parent->pt2px(painter, parent->getLineWidthMultiplier()*lineWidth))); return p; } diff --git a/lib/jkqtplotter/jkqtpgraphsimpulses.h b/lib/jkqtplotter/jkqtpgraphsimpulses.h index d7def1077f..0719026f8f 100644 --- a/lib/jkqtplotter/jkqtpgraphsimpulses.h +++ b/lib/jkqtplotter/jkqtpgraphsimpulses.h @@ -63,14 +63,14 @@ class LIB_EXPORT JKQTPImpulsesHorizontalGraph: public JKQTPXYGraph { /*! \brief sets the property lineWidth to the specified \a __value. \details Description of the parameter lineWidth is:
\copydoc lineWidth
\see lineWidth for more information */ - inline virtual void set_lineWidth(double __value) + inline virtual void setLineWidth(double __value) { this->lineWidth = __value; } /*! \brief returns the property lineWidth. \details Description of the parameter lineWidth is:
\copydoc lineWidth
\see lineWidth for more information */ - inline virtual double get_lineWidth() const + inline virtual double getLineWidth() const { return this->lineWidth; } @@ -95,7 +95,7 @@ class LIB_EXPORT JKQTPImpulsesHorizontalGraph: public JKQTPXYGraph { double lineWidth; protected: - /** \brief which plot style to use from the parent plotter (via JKQTPlotterBase::getPlotStyle() and JKQTPlotterBase::getNextStyle() ) */ + /** \brief which plot style to use from the parent plotter (via JKQTBasePlotter::getPlotStyle() and JKQTBasePlotter::getNextStyle() ) */ int parentPlotStyle; /** \brief baseline of the plot (NOTE: 0 is interpreted as until plot border in log-mode!!!) diff --git a/lib/jkqtplotter/jkqtpgraphsparsedfunction.cpp b/lib/jkqtplotter/jkqtpgraphsparsedfunction.cpp index 62dfd8184b..c47498c6f3 100644 --- a/lib/jkqtplotter/jkqtpgraphsparsedfunction.cpp +++ b/lib/jkqtplotter/jkqtpgraphsparsedfunction.cpp @@ -36,7 +36,7 @@ JKQTPXParsedFunctionLineGraph::JKQTPXParsedFunctionLineGraph(JKQTBasePlotter *pa function=""; parameterColumn=-1; set_params(&fdata); - set_plotFunction(&JKQTPXParsedFunctionLineGraph::JKQTPXParsedFunctionLineGraphFunction); + setPlotFunction(&JKQTPXParsedFunctionLineGraph::JKQTPXParsedFunctionLineGraphFunction); efdata.parser=new JKQTPMathParser(); efdata.node=nullptr; @@ -56,7 +56,7 @@ JKQTPXParsedFunctionLineGraph::JKQTPXParsedFunctionLineGraph(JKQTPlotter *parent function=""; parameterColumn=-1; set_params(&fdata); - set_plotFunction(&JKQTPXParsedFunctionLineGraph::JKQTPXParsedFunctionLineGraphFunction); + setPlotFunction(&JKQTPXParsedFunctionLineGraph::JKQTPXParsedFunctionLineGraphFunction); efdata.parser=new JKQTPMathParser(); efdata.node=nullptr; @@ -130,7 +130,7 @@ void JKQTPXParsedFunctionLineGraph::createPlotData(bool /*collectParams*/) } set_params(&fdata); - set_plotFunction(JKQTPXParsedFunctionLineGraphFunction); + setPlotFunction(JKQTPXParsedFunctionLineGraphFunction); set_errorParams(&efdata); set_errorPlotFunction(JKQTPXParsedFunctionLineGraphFunction); @@ -199,7 +199,7 @@ JKQTPYParsedFunctionLineGraph::JKQTPYParsedFunctionLineGraph(JKQTBasePlotter *pa function=""; parameterColumn=-1; set_params(&fdata); - set_plotFunction(&JKQTPYParsedFunctionLineGraph::JKQTPYParsedFunctionLineGraphFunction); + setPlotFunction(&JKQTPYParsedFunctionLineGraph::JKQTPYParsedFunctionLineGraphFunction); efdata.parser=new JKQTPMathParser(); efdata.node=nullptr; @@ -219,7 +219,7 @@ JKQTPYParsedFunctionLineGraph::JKQTPYParsedFunctionLineGraph(JKQTPlotter *parent function=""; parameterColumn=-1; set_params(&fdata); - set_plotFunction(&JKQTPYParsedFunctionLineGraph::JKQTPYParsedFunctionLineGraphFunction); + setPlotFunction(&JKQTPYParsedFunctionLineGraph::JKQTPYParsedFunctionLineGraphFunction); efdata.parser=new JKQTPMathParser(); efdata.node=nullptr; @@ -294,7 +294,7 @@ void JKQTPYParsedFunctionLineGraph::createPlotData(bool /*collectParams*/) } set_params(&fdata); - set_plotFunction(JKQTPYParsedFunctionLineGraphFunction); + setPlotFunction(JKQTPYParsedFunctionLineGraphFunction); set_errorParams(&efdata); set_errorPlotFunction(JKQTPYParsedFunctionLineGraphFunction); diff --git a/lib/jkqtplotter/jkqtpgraphsparsedfunction.h b/lib/jkqtplotter/jkqtpgraphsparsedfunction.h index 71578cdd8c..b18bb444cd 100644 --- a/lib/jkqtplotter/jkqtpgraphsparsedfunction.h +++ b/lib/jkqtplotter/jkqtpgraphsparsedfunction.h @@ -106,7 +106,7 @@ class LIB_EXPORT JKQTPXParsedFunctionLineGraph: public JKQTPXFunctionLineGraph { JKQTPXParsedFunctionLineGraphFunctionData efdata; // hide functions that should not be used in this class! - using JKQTPXFunctionLineGraph::set_plotFunction; + using JKQTPXFunctionLineGraph::setPlotFunction; using JKQTPXFunctionLineGraph::set_params; using JKQTPXFunctionLineGraph::set_errorPlotFunction; using JKQTPXFunctionLineGraph::set_errorParams; @@ -192,7 +192,7 @@ class LIB_EXPORT JKQTPYParsedFunctionLineGraph: public JKQTPYFunctionLineGraph { JKQTPYParsedFunctionLineGraphFunctionData efdata; // hide functions that should not be used in this class! - using JKQTPXFunctionLineGraph::set_plotFunction; + using JKQTPXFunctionLineGraph::setPlotFunction; using JKQTPXFunctionLineGraph::set_params; using JKQTPXFunctionLineGraph::set_errorPlotFunction; using JKQTPXFunctionLineGraph::set_errorParams; diff --git a/lib/jkqtplotter/jkqtpgraphssinglecolumnsymbols.cpp b/lib/jkqtplotter/jkqtpgraphssinglecolumnsymbols.cpp index 7c8e7746ac..fd804c8dfe 100644 --- a/lib/jkqtplotter/jkqtpgraphssinglecolumnsymbols.cpp +++ b/lib/jkqtplotter/jkqtpgraphssinglecolumnsymbols.cpp @@ -185,7 +185,7 @@ void JKQTPSingleColumnSymbolsGraph::draw(JKQTPEnhancedPainter &painter) } plotSymbols.append(QPointF(x,y)); if (JKQTPIsOKFloat(xv) && JKQTPIsOKFloat(yv)) { - JKQTPPlotSymbol(painter, x, y, symbol, symSize, parent->pt2px(painter, symbolWidth*parent->get_lineWidthMultiplier()), color, fillColor); + JKQTPPlotSymbol(painter, x, y, symbol, symSize, parent->pt2px(painter, symbolWidth*parent->getLineWidthMultiplier()), color, fillColor); } } } else { @@ -211,7 +211,7 @@ void JKQTPSingleColumnSymbolsGraph::draw(JKQTPEnhancedPainter &painter) plotSymbols.append(QPointF(x,y)); if (JKQTPIsOKFloat(xv) && JKQTPIsOKFloat(yv)) { plotSymbols.append(QPointF(x,y)); - JKQTPPlotSymbol(painter, x, y, symbol, symSize, parent->pt2px(painter, symbolWidth*parent->get_lineWidthMultiplier()), color, fillColor); + JKQTPPlotSymbol(painter, x, y, symbol, symSize, parent->pt2px(painter, symbolWidth*parent->getLineWidthMultiplier()), color, fillColor); } } } @@ -229,9 +229,9 @@ void JKQTPSingleColumnSymbolsGraph::drawKeyMarker(JKQTPEnhancedPainter &painter, const double maxSize=qMax(rect.width(), rect.height()); double symbolSize=parent->pt2px(painter, this->symbolSize); if (symbolSize>minSize*0.9) symbolSize=minSize*0.9; - double symbolWidth=parent->pt2px(painter, this->symbolWidth*parent->get_lineWidthMultiplier()); + double symbolWidth=parent->pt2px(painter, this->symbolWidth*parent->getLineWidthMultiplier()); if (symbolWidth>0.3*symbolSize) symbolWidth=0.3*symbolSize; - double lineWidth=parent->pt2px(painter, this->lineWidth*parent->get_lineWidthMultiplier()); + double lineWidth=parent->pt2px(painter, this->lineWidth*parent->getLineWidthMultiplier()); if (lineWidth>0.5*maxSize) lineWidth=0.5*maxSize; painter.save(); @@ -249,7 +249,7 @@ void JKQTPSingleColumnSymbolsGraph::drawKeyMarker(JKQTPEnhancedPainter &painter, QPen JKQTPSingleColumnSymbolsGraph::getSymbolPen(JKQTPEnhancedPainter& painter) const { QPen p; p.setColor(color); - p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH,parent->pt2px(painter, parent->get_lineWidthMultiplier()*symbolWidth))); + p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH,parent->pt2px(painter, parent->getLineWidthMultiplier()*symbolWidth))); p.setStyle(style); p.setJoinStyle(Qt::RoundJoin); p.setCapStyle(Qt::RoundCap); diff --git a/lib/jkqtplotter/jkqtplotter.cpp b/lib/jkqtplotter/jkqtplotter.cpp index e5459f52f7..66d7807a2b 100644 --- a/lib/jkqtplotter/jkqtplotter.cpp +++ b/lib/jkqtplotter/jkqtplotter.cpp @@ -78,18 +78,18 @@ void JKQTPlotter::init(bool datastore_internal, QWidget* parent, JKQTPDatastore* doDrawing=false; magnification=1; plotter=new JKQTBasePlotter(datastore_internal, this, datast); - plotter->set_emitSignals(false); - plotter->set_backgroundColor(palette().color(QPalette::Window));//QPalette::Window - plotter->set_def_backgroundColor(palette().color(QPalette::Window));//QPalette::Window - //plotter->set_plotBackgroundColor(palette().color(QPalette::Base)); - //plotter->set_def_plotBackgroundColor((palette().color(QPalette::Base)); + plotter->setEmittingSignalsEnabled(false); + plotter->setBackgroundColor(palette().color(QPalette::Window));//QPalette::Window + plotter->setDefaultBackgroundColor(palette().color(QPalette::Window));//QPalette::Window + //plotter->setPlotBackgroundColor(palette().color(QPalette::Base)); + //plotter->setDefaultPlotBackgroundColor((palette().color(QPalette::Base)); mousePosX=0; mousePosY=0; rightMouseButtonAction=JKQTPlotter::RightMouseButtonContextMenu; - connect(plotter, SIGNAL(plotUpdated()), this, SLOT(update_plot())); - connect(plotter, SIGNAL(overlaysUpdated()), this, SLOT(replot_overlays())); + connect(plotter, SIGNAL(plotUpdated()), this, SLOT(replotPlot())); + connect(plotter, SIGNAL(overlaysUpdated()), this, SLOT(replotOverlays())); connect(plotter, SIGNAL(beforePlotScalingRecalculate()), this, SLOT(intBeforePlotScalingRecalculate())); connect(plotter, SIGNAL(zoomChangedLocally(double, double, double, double, JKQTBasePlotter*)), this, SLOT(pzoomChangedLocally(double, double, double, double, JKQTBasePlotter*))); @@ -135,14 +135,14 @@ void JKQTPlotter::init(bool datastore_internal, QWidget* parent, JKQTPDatastore* //move(32,32); resize(400,300); doDrawing=true; - plotter->set_emitSignals(true); - update_plot(); + plotter->setEmittingSignalsEnabled(true); + replotPlot(); } JKQTPlotter::~JKQTPlotter() { - disconnect(plotter, SIGNAL(plotUpdated()), this, SLOT(update_plot())); - disconnect(plotter, SIGNAL(overlaysUpdated()), this, SLOT(replot_overlays())); + disconnect(plotter, SIGNAL(plotUpdated()), this, SLOT(replotPlot())); + disconnect(plotter, SIGNAL(overlaysUpdated()), this, SLOT(replotOverlays())); disconnect(plotter, SIGNAL(beforePlotScalingRecalculate()), this, SLOT(intBeforePlotScalingRecalculate())); disconnect(plotter, SIGNAL(zoomChangedLocally(double, double, double, double, JKQTBasePlotter*)), this, SLOT(pzoomChangedLocally(double, double, double, double, JKQTBasePlotter*))); delete plotter; @@ -158,17 +158,17 @@ void JKQTPlotter::updateToolbarActions() } -void JKQTPlotter::set_toolbarIconSize(int value) { +void JKQTPlotter::setToolbarIconSize(int value) { toolbarIconSize=value; QSize s=QSize(toolbarIconSize, toolbarIconSize); toolbar->setIconSize(s); } -int JKQTPlotter::get_toolbarIconSize() { +int JKQTPlotter::getToolbarIconSize() { return toolbarIconSize; } -void JKQTPlotter::set_displayToolbar(bool __value) +void JKQTPlotter::setToolbarVisible(bool __value) { if (this->displayToolbar != __value) { this->displayToolbar = __value; @@ -176,12 +176,12 @@ void JKQTPlotter::set_displayToolbar(bool __value) } } -bool JKQTPlotter::get_displayToolbar() const +bool JKQTPlotter::isToolbarVisible() const { return this->displayToolbar; } -void JKQTPlotter::set_toolbarAlwaysOn(bool __value) +void JKQTPlotter::setToolbarAlwaysOn(bool __value) { if (this->toolbarAlwaysOn != __value) { this->toolbarAlwaysOn = __value; @@ -189,23 +189,23 @@ void JKQTPlotter::set_toolbarAlwaysOn(bool __value) } } -bool JKQTPlotter::get_toolbarAlwaysOn() const +bool JKQTPlotter::isToolbarAlwaysOn() const { return this->toolbarAlwaysOn; } -void JKQTPlotter::set_displayMousePosition(bool __value) +void JKQTPlotter::setMousePositionShown(bool __value) { this->displayMousePosition = __value; } -bool JKQTPlotter::get_displayMousePosition() const +bool JKQTPlotter::isMousePositionShown() const { return this->displayMousePosition; } -void JKQTPlotter::set_userActionColor(const QColor &__value) +void JKQTPlotter::setUserActionColor(const QColor &__value) { if (this->userActionColor != __value) { this->userActionColor = __value; @@ -213,12 +213,12 @@ void JKQTPlotter::set_userActionColor(const QColor &__value) } } -QColor JKQTPlotter::get_userActionColor() const +QColor JKQTPlotter::getUserActionColor() const { return this->userActionColor; } -void JKQTPlotter::set_userActionCompositionMode(const QPainter::CompositionMode &__value) +void JKQTPlotter::setUserActionCompositionMode(const QPainter::CompositionMode &__value) { if (this->userActionCompositionMode != __value) { this->userActionCompositionMode = __value; @@ -226,12 +226,12 @@ void JKQTPlotter::set_userActionCompositionMode(const QPainter::CompositionMode } } -QPainter::CompositionMode JKQTPlotter::get_userActionCompositionMode() const +QPainter::CompositionMode JKQTPlotter::getUserActionCompositionMode() const { return this->userActionCompositionMode; } -void JKQTPlotter::set_mouseActionMode(const JKQTPlotter::MouseActionModes &__value) +void JKQTPlotter::setMouseActionMode(const JKQTPlotter::MouseActionModes &__value) { if (this->mouseActionMode != __value) { this->mouseActionMode = __value; @@ -239,7 +239,7 @@ void JKQTPlotter::set_mouseActionMode(const JKQTPlotter::MouseActionModes &__val } } -JKQTPlotter::MouseActionModes JKQTPlotter::get_mouseActionMode() const +JKQTPlotter::MouseActionModes JKQTPlotter::getMouseActionMode() const { return this->mouseActionMode; } @@ -248,11 +248,11 @@ void JKQTPlotter::loadSettings(QSettings& settings, QString group) { plotter->loadSettings(settings, group); - set_toolbarIconSize(settings.value(group+"toolbar_icon_size", toolbarIconSize).toInt()); + setToolbarIconSize(settings.value(group+"toolbar_icon_size", toolbarIconSize).toInt()); mousePositionTemplate=settings.value(group+"mouse_position_template", mousePositionTemplate).toString(); userActionColor=QColor(settings.value(group+"zoomrect_color", jkqtp_QColor2String(userActionColor)).toString()); - update_plot(); + replotPlot(); } void JKQTPlotter::saveSettings(QSettings& settings, QString group) { @@ -358,8 +358,8 @@ void JKQTPlotter::mouseMoveEvent ( QMouseEvent * event ) { } // emit clicked signal, if event occured inside plot only - if ( (event->x()/magnification>=plotter->get_iplotBorderLeft()) && (event->x()/magnification<=plotter->get_plotWidth()+plotter->get_iplotBorderLeft()) && - ((event->y()-getPlotYOffset())/magnification>=plotter->get_iplotBorderTop()) && ((event->y()-getPlotYOffset())/magnification<=plotter->get_plotHeight()+plotter->get_iplotBorderTop()) ) { + if ( (event->x()/magnification>=plotter->getInternalPlotBorderLeft()) && (event->x()/magnification<=plotter->getPlotWidth()+plotter->getInternalPlotBorderLeft()) && + ((event->y()-getPlotYOffset())/magnification>=plotter->getInternalPlotBorderTop()) && ((event->y()-getPlotYOffset())/magnification<=plotter->getPlotHeight()+plotter->getInternalPlotBorderTop()) ) { emit plotMouseMove(plotter->p2x(event->x()/magnification), plotter->p2y((event->y()-getPlotYOffset())/magnification)); } } @@ -384,22 +384,22 @@ void JKQTPlotter::mousePressEvent ( QMouseEvent * event ){ mouseLastClickX=event->x(); mouseLastClickY=event->y(); if (rightMouseButtonAction==JKQTPlotter::RightMouseButtonZoom) { - double xmin=plotter->p2x((long)round((double)plotter->get_iplotBorderLeft()-(double)plotter->get_plotWidth()/2.0)); - double xmax=plotter->p2x((long)round((double)plotter->get_iplotBorderLeft()+1.5*(double)plotter->get_plotWidth())); - double ymin=plotter->p2y((long)round((double)plotter->get_iplotBorderTop()+1.5*(double)plotter->get_plotHeight())); - double ymax=plotter->p2y((long)round((double)plotter->get_iplotBorderTop()-(double)plotter->get_plotHeight()/2.0)); - if (plotter->get_xAxis()->isLogAxis()) { + double xmin=plotter->p2x((long)round((double)plotter->getInternalPlotBorderLeft()-(double)plotter->getPlotWidth()/2.0)); + double xmax=plotter->p2x((long)round((double)plotter->getInternalPlotBorderLeft()+1.5*(double)plotter->getPlotWidth())); + double ymin=plotter->p2y((long)round((double)plotter->getInternalPlotBorderTop()+1.5*(double)plotter->getPlotHeight())); + double ymax=plotter->p2y((long)round((double)plotter->getInternalPlotBorderTop()-(double)plotter->getPlotHeight()/2.0)); + if (plotter->getXAxis()->isLogAxis()) { if (xmin<=0) xmin=1; if (xmax<=0) xmax=10; } - if (plotter->get_yAxis()->isLogAxis()) { + if (plotter->getYAxis()->isLogAxis()) { if (ymin<=0) ymin=1; if (ymax<=0) ymax=10; } - /*plotter->get_xAxis->setRange(xmin, xmax); - plotter->get_yAxis->setRange(ymin, ymax);*/ - //update_plot(); - /*if (plotter->get_emitSignals())*/ emit zoomChangedLocally(xmin, xmax, ymin, ymax, this); + /*plotter->getXAxis->setRange(xmin, xmax); + plotter->getYAxis->setRange(ymin, ymax);*/ + //replotPlot(); + /*if (plotter->isEmittingSignalsEnabled())*/ emit zoomChangedLocally(xmin, xmax, ymin, ymax, this); plotter->setXY(xmin, xmax, ymin, ymax); //update(); event->accept(); @@ -411,8 +411,8 @@ void JKQTPlotter::mousePressEvent ( QMouseEvent * event ){ } // emit clicked signal, if event occured inside plot only - if ( (event->x()/magnification>=plotter->get_iplotBorderLeft()) && (event->x()/magnification<=plotter->get_plotWidth()+plotter->get_iplotBorderLeft()) && - ((event->y()-getPlotYOffset())/magnification>=plotter->get_iplotBorderTop()) && ((event->y()-getPlotYOffset())/magnification<=plotter->get_plotHeight()+plotter->get_iplotBorderTop()) ) { + if ( (event->x()/magnification>=plotter->getInternalPlotBorderLeft()) && (event->x()/magnification<=plotter->getPlotWidth()+plotter->getInternalPlotBorderLeft()) && + ((event->y()-getPlotYOffset())/magnification>=plotter->getInternalPlotBorderTop()) && ((event->y()-getPlotYOffset())/magnification<=plotter->getPlotHeight()+plotter->getInternalPlotBorderTop()) ) { emit plotMouseClicked(plotter->p2x(event->x()/magnification), plotter->p2y((event->y()-getPlotYOffset())/magnification), event->modifiers(), event->button()); event->accept(); } @@ -465,8 +465,8 @@ void JKQTPlotter::mouseReleaseEvent ( QMouseEvent * event ){ void JKQTPlotter::mouseDoubleClickEvent ( QMouseEvent * event ){ // only react on double clicks inside the widget - if ( (event->x()/magnification>=plotter->get_iplotBorderLeft()) && (event->x()/magnification<=plotter->get_plotWidth()+plotter->get_iplotBorderLeft()) && - ((event->y()-getPlotYOffset())/magnification>=plotter->get_iplotBorderTop()) && ((event->y()-getPlotYOffset())/magnification<=plotter->get_plotHeight()+plotter->get_iplotBorderTop()) ) { + if ( (event->x()/magnification>=plotter->getInternalPlotBorderLeft()) && (event->x()/magnification<=plotter->getPlotWidth()+plotter->getInternalPlotBorderLeft()) && + ((event->y()-getPlotYOffset())/magnification>=plotter->getInternalPlotBorderTop()) && ((event->y()-getPlotYOffset())/magnification<=plotter->getPlotHeight()+plotter->getInternalPlotBorderTop()) ) { mouseLastClickX=event->x(); mouseLastClickY=event->y(); @@ -483,16 +483,16 @@ void JKQTPlotter::mouseDoubleClickEvent ( QMouseEvent * event ){ if (rightMouseButtonAction==JKQTPlotter::RightMouseButtonZoom && event->button()==Qt::RightButton) { double factor=4.0; if (event->button()==Qt::RightButton) factor=1; - double xmin=plotter->p2x((long)round((double)event->x()/magnification-(double)plotter->get_plotWidth()/factor)); - double xmax=plotter->p2x((long)round((double)event->x()/magnification+(double)plotter->get_plotWidth()/factor)); - double ymin=plotter->p2y((long)round((double)event->y()/magnification-(double)getPlotYOffset()+(double)plotter->get_plotHeight()/factor)); - double ymax=plotter->p2y((long)round((double)event->y()/magnification-(double)getPlotYOffset()-(double)plotter->get_plotHeight()/factor)); + double xmin=plotter->p2x((long)round((double)event->x()/magnification-(double)plotter->getPlotWidth()/factor)); + double xmax=plotter->p2x((long)round((double)event->x()/magnification+(double)plotter->getPlotWidth()/factor)); + double ymin=plotter->p2y((long)round((double)event->y()/magnification-(double)getPlotYOffset()+(double)plotter->getPlotHeight()/factor)); + double ymax=plotter->p2y((long)round((double)event->y()/magnification-(double)getPlotYOffset()-(double)plotter->getPlotHeight()/factor)); event->accept(); //xAxis->setRange(xmin, xmax); //yAxis->setRange(ymin, ymax); - //update_plot(); - /*if (plotter->get_emitSignals())*/ emit zoomChangedLocally(xmin, xmax, ymin, ymax, this); + //replotPlot(); + /*if (plotter->isEmittingSignalsEnabled())*/ emit zoomChangedLocally(xmin, xmax, ymin, ymax, this); plotter->setXY(xmin, xmax, ymin, ymax); update(); } @@ -515,23 +515,23 @@ void JKQTPlotter::keyReleaseEvent(QKeyEvent *event) { void JKQTPlotter::wheelEvent ( QWheelEvent * event ) { // only react on wheel turns inside the widget, turning forward will zoom out and turning backwards will zoom in by a factor of 2 - if ( (event->x()/magnification>=plotter->get_iplotBorderLeft()) && (event->x()/magnification<=plotter->get_plotWidth()+plotter->get_iplotBorderLeft()) && - ((event->y()-getPlotYOffset())/magnification>=plotter->get_iplotBorderTop()) && ((event->y()-getPlotYOffset())/magnification<=plotter->get_plotHeight()+plotter->get_iplotBorderTop()) ) { + if ( (event->x()/magnification>=plotter->getInternalPlotBorderLeft()) && (event->x()/magnification<=plotter->getPlotWidth()+plotter->getInternalPlotBorderLeft()) && + ((event->y()-getPlotYOffset())/magnification>=plotter->getInternalPlotBorderTop()) && ((event->y()-getPlotYOffset())/magnification<=plotter->getPlotHeight()+plotter->getInternalPlotBorderTop()) ) { double factor=pow(2.0, 1.0*(double)event->delta()/120.0)*2.0; //std::cout<<(double)event->delta()/120.0<<": "<p2x((long)round((double)event->x()/magnification-(double)plotter->get_plotWidth()/factor)); - double xmax=plotter->p2x((long)round((double)event->x()/magnification+(double)plotter->get_plotWidth()/factor)); - double ymin=plotter->p2y((long)round((double)event->y()/magnification-(double)getPlotYOffset()+(double)plotter->get_plotHeight()/factor)); - double ymax=plotter->p2y((long)round((double)event->y()/magnification-(double)getPlotYOffset()-(double)plotter->get_plotHeight()/factor)); + double xmin=plotter->p2x((long)round((double)event->x()/magnification-(double)plotter->getPlotWidth()/factor)); + double xmax=plotter->p2x((long)round((double)event->x()/magnification+(double)plotter->getPlotWidth()/factor)); + double ymin=plotter->p2y((long)round((double)event->y()/magnification-(double)getPlotYOffset()+(double)plotter->getPlotHeight()/factor)); + double ymax=plotter->p2y((long)round((double)event->y()/magnification-(double)getPlotYOffset()-(double)plotter->getPlotHeight()/factor)); //std::cout<<"t="< "<accept(); - /*if (plotter->get_emitSignals())*/ emit zoomChangedLocally(xmin, xmax, ymin, ymax, this); + /*if (plotter->isEmittingSignalsEnabled())*/ emit zoomChangedLocally(xmin, xmax, ymin, ymax, this); plotter->setXY(xmin, xmax, ymin, ymax); //update(); /*xAxis->setRange(xmin, xmax); yAxis->setRange(ymin, ymax); - //update_plot(); + //replotPlot(); if (emitSignals) emit zoomChangedLocally(xAxis->getMin(), xAxis->getMax(), yAxis->getMin(), yAxis->getMax(), this);*/ } else { event->ignore(); } } @@ -553,28 +553,28 @@ void JKQTPlotter::initContextMenu() qDeleteAll(contextSubMenus); contextSubMenus.clear(); - contextMenu->addAction(plotter->get_actSaveData()); - contextMenu->addAction(plotter->get_actSavePlot()); - contextMenu->addAction(plotter->get_actPrint()); + contextMenu->addAction(plotter->getActionSaveData()); + contextMenu->addAction(plotter->getActionSavePlot()); + contextMenu->addAction(plotter->getActionPrint()); contextMenu->addSeparator(); - contextMenu->addAction(plotter->get_actCopyPixelImage()); - contextMenu->addAction(plotter->get_actCopyData()); - contextMenu->addAction(plotter->get_actCopyMatlab()); + contextMenu->addAction(plotter->getActionCopyPixelImage()); + contextMenu->addAction(plotter->getActionCopyData()); + contextMenu->addAction(plotter->getActionCopyMatlab()); contextMenu->addSeparator(); - contextMenu->addAction(plotter->get_actShowPlotData()); + contextMenu->addAction(plotter->getActionShowPlotData()); contextMenu->addSeparator(); - contextMenu->addAction(plotter->get_actZoomAll()); - contextMenu->addAction(plotter->get_actZoomIn()); - contextMenu->addAction(plotter->get_actZoomOut()); + contextMenu->addAction(plotter->getActionZoomAll()); + contextMenu->addAction(plotter->getActionZoomIn()); + contextMenu->addAction(plotter->getActionZoomOut()); contextMenu->addSeparator(); QMenu* menVisibleGroup=new QMenu(tr("Graph Visibility"), contextMenu); - for (size_t i=0; igetGraphCount(); i++) { - QString tit=get_plotter()->getGraph(i)->get_title(); + for (size_t i=0; igetGraphCount(); i++) { + QString tit=getPlotter()->getGraph(i)->get_title(); if (tit.isEmpty()) tit=tr("Graph %1").arg(static_cast(i)); QAction* act=new QAction(tit, menVisibleGroup); act->setCheckable(true); - act->setChecked(get_plotter()->getGraph(i)->get_visible()); - act->setIcon(QIcon(QPixmap::fromImage(get_plotter()->getGraph(i)->generateKeyMarker(QSize(16,16))))); + act->setChecked(getPlotter()->getGraph(i)->get_visible()); + act->setIcon(QIcon(QPixmap::fromImage(getPlotter()->getGraph(i)->generateKeyMarker(QSize(16,16))))); act->setData(static_cast(i)); connect(act, SIGNAL(toggled(bool)), this, SLOT(reactGraphVisible(bool))); menVisibleGroup->addAction(act); @@ -587,7 +587,7 @@ void JKQTPlotter::initContextMenu() } bool hasSep=false; - JKQTBasePlotter::AdditionalActionsMap lst=get_plotter()->get_lstAdditionalPlotterActions(); + JKQTBasePlotter::AdditionalActionsMap lst=getPlotter()->getLstAdditionalPlotterActions(); JKQTBasePlotter::AdditionalActionsMapIterator it(lst); while (it.hasNext()) { it.next(); @@ -649,21 +649,6 @@ void JKQTPlotter::updateCursor() { } } -void JKQTPlotter::update_overlays() { - if (!doDrawing) return; - disconnect(plotter, SIGNAL(plotUpdated()), this, SLOT(update_plot())); - disconnect(plotter, SIGNAL(overlaysUpdated()), this, SLOT(replot_overlays())); - image=imageNoOverlays; - JKQTPEnhancedPainter painter(&image); - if (painter.isActive()) { - painter.scale(magnification, magnification); - plotter->drawNonGridOverlays(painter); - } - oldImage=image; - connect(plotter, SIGNAL(plotUpdated()), this, SLOT(update_plot())); - connect(plotter, SIGNAL(overlaysUpdated()), this, SLOT(replot_overlays())); - update(); -} void JKQTPlotter::synchronizeXAxis(double newxmin, double newxmax, double /*newymin*/, double /*newymax*/, JKQTPlotter * /*sender*/) { setX(newxmin, newxmax); @@ -677,13 +662,13 @@ void JKQTPlotter::synchronizeXYAxis(double newxmin, double newxmax, double newym setXY(newxmin, newxmax, newymin, newymax); } -void JKQTPlotter::replot_overlays() { +void JKQTPlotter::replotOverlays() { #ifdef JKQTBP_AUTOTIMER - JKQTPAutoOutputTimer jkaaot(QString("JKQTPlotter::replot_overlays()")); + JKQTPAutoOutputTimer jkaaot(QString("JKQTPlotter::replotOverlays()")); #endif if (!doDrawing) return; - disconnect(plotter, SIGNAL(plotUpdated()), this, SLOT(update_plot())); - disconnect(plotter, SIGNAL(overlaysUpdated()), this, SLOT(replot_overlays())); + disconnect(plotter, SIGNAL(plotUpdated()), this, SLOT(replotPlot())); + disconnect(plotter, SIGNAL(overlaysUpdated()), this, SLOT(replotOverlays())); image=imageNoOverlays; JKQTPEnhancedPainter painter(&image); if (painter.isActive()) { @@ -691,54 +676,35 @@ void JKQTPlotter::replot_overlays() { plotter->drawNonGridOverlays(painter); } oldImage=image; - connect(plotter, SIGNAL(plotUpdated()), this, SLOT(update_plot())); - connect(plotter, SIGNAL(overlaysUpdated()), this, SLOT(replot_overlays())); + connect(plotter, SIGNAL(plotUpdated()), this, SLOT(replotPlot())); + connect(plotter, SIGNAL(overlaysUpdated()), this, SLOT(replotOverlays())); repaint(); } -void JKQTPlotter::update_plot() { +void JKQTPlotter::replotPlot() { #ifdef JKQTBP_AUTOTIMER - JKQTPAutoOutputTimer jkaaot(QString("JKQTPlotter::update_plot()")); + JKQTPAutoOutputTimer jkaaot(QString("JKQTPlotter::replotPlot()")); #endif if (!doDrawing) return; - disconnect(plotter, SIGNAL(plotUpdated()), this, SLOT(update_plot())); - disconnect(plotter, SIGNAL(overlaysUpdated()), this, SLOT(replot_overlays())); + disconnect(plotter, SIGNAL(plotUpdated()), this, SLOT(replotPlot())); + disconnect(plotter, SIGNAL(overlaysUpdated()), this, SLOT(replotOverlays())); plotter->resize(width()/magnification, height()/magnification-getPlotYOffset()); JKQTPEnhancedPainter painter(&image); if (painter.isActive()) { painter.scale(magnification, magnification); //QTime t; //t.start(); - plotter->drawNonGrid(painter, QPoint(0,0), false);//, QRect(QPoint(0,0), QSize(plotter->get_plotWidth(), plotter->get_plotHeight()))); + plotter->drawNonGrid(painter, QPoint(0,0), false);//, QRect(QPoint(0,0), QSize(plotter->getPlotWidth(), plotter->getPlotHeight()))); //qDebug()<<"drawNonGrid"<drawNonGridOverlays(painter); } oldImage=image; - connect(plotter, SIGNAL(plotUpdated()), this, SLOT(update_plot())); - connect(plotter, SIGNAL(overlaysUpdated()), this, SLOT(replot_overlays())); + connect(plotter, SIGNAL(plotUpdated()), this, SLOT(replotPlot())); + connect(plotter, SIGNAL(overlaysUpdated()), this, SLOT(replotOverlays())); update(); } -void JKQTPlotter::replot_plot() { -#ifdef JKQTBP_AUTOTIMER - JKQTPAutoOutputTimer jkaaot(QString("JKQTPlotter::replot_plot()")); -#endif - if (!doDrawing) return; - disconnect(plotter, SIGNAL(plotUpdated()), this, SLOT(update_plot())); - disconnect(plotter, SIGNAL(overlaysUpdated()), this, SLOT(replot_overlays())); - - plotter->resize(width()/magnification, height()/magnification-getPlotYOffset()); - JKQTPEnhancedPainter painter(&image); - if (painter.isActive()) { - painter.scale(magnification, magnification); - plotter->drawNonGrid(painter);//, QRect(QPoint(0,0), QSize(plotter->get_plotWidth(), plotter->get_plotHeight()))); - } - oldImage=image; - connect(plotter, SIGNAL(plotUpdated()), this, SLOT(update_plot())); - connect(plotter, SIGNAL(overlaysUpdated()), this, SLOT(replot_overlays())); - repaint(); -} @@ -758,7 +724,7 @@ void JKQTPlotter::paintEvent(QPaintEvent *event){ p->drawRect(geometry()); p->restore(); if (displayMousePosition ) { - p->drawText(plotter->get_iplotBorderLeft(), getPlotYOffset()-1, mousePositionTemplate.arg(mousePosX).arg(mousePosY)); + p->drawText(plotter->getInternalPlotBorderLeft(), getPlotYOffset()-1, mousePositionTemplate.arg(mousePosX).arg(mousePosY)); } int plotImageWidth=width(); @@ -814,7 +780,7 @@ void JKQTPlotter::delayedResizeEvent() sizeChanged=true; } - if (sizeChanged) update_plot(); + if (sizeChanged) replotPlot(); } void JKQTPlotter::leaveEvent(QEvent * /*event*/) { @@ -843,7 +809,7 @@ QSize JKQTPlotter::minimumSizeHint() const { if (minSize.width()>m.width()) m.setWidth(minSize.width()); if (minSize.height()>m.height()) m.setHeight(minSize.height()); - return m;//QSize((int)round((plotter->get_iplotBorderLeft()+plotter->get_iplotBorderRight())*1.5), (int)round((plotter->get_iplotBorderTop()+plotter->get_iplotBorderBottom())*1.5)); + return m;//QSize((int)round((plotter->getInternalPlotBorderLeft()+plotter->getInternalPlotBorderRight())*1.5), (int)round((plotter->getInternalPlotBorderTop()+plotter->getInternalPlotBorderBottom())*1.5)); } QSize JKQTPlotter::sizeHint() const { @@ -854,8 +820,8 @@ QSize JKQTPlotter::sizeHint() const { void JKQTPlotter::masterPlotScalingRecalculated() { if (masterPlotter) { - if (plotter->get_masterSynchronizeHeight()||plotter->get_masterSynchronizeWidth()) { - update_plot(); + if (plotter->getMasterSynchronizeHeight()||plotter->getMasterSynchronizeWidth()) { + replotPlot(); } } } @@ -864,25 +830,25 @@ void JKQTPlotter::synchronizeToMaster(JKQTPlotter* master, bool synchronizeWidth if (!master) { resetMasterSynchronization(); } - plotter->synchronizeToMaster(master->get_plotter(), synchronizeWidth, synchronizeHeight); + plotter->synchronizeToMaster(master->getPlotter(), synchronizeWidth, synchronizeHeight); masterPlotter=master; - if (masterPlotter) connect(masterPlotter->get_plotter(), SIGNAL(plotScalingRecalculated()), this, SLOT(masterPlotScalingRecalculated())); - update_plot(); + if (masterPlotter) connect(masterPlotter->getPlotter(), SIGNAL(plotScalingRecalculated()), this, SLOT(masterPlotScalingRecalculated())); + replotPlot(); } void JKQTPlotter::resetMasterSynchronization() { - if (masterPlotter) disconnect(masterPlotter->get_plotter(), SIGNAL(plotScalingRecalculated()), this, SLOT(masterPlotScalingRecalculated())); + if (masterPlotter) disconnect(masterPlotter->getPlotter(), SIGNAL(plotScalingRecalculated()), this, SLOT(masterPlotScalingRecalculated())); plotter->resetMasterSynchronization(); - update_plot(); + replotPlot(); } -bool JKQTPlotter::get_doDrawing() const { +bool JKQTPlotter::isPlotUpdateEnabled() const { return doDrawing; } void JKQTPlotter::pzoomChangedLocally(double newxmin, double newxmax, double newymin, double newymax, JKQTBasePlotter* /*sender*/) { emit zoomChangedLocally(newxmin, newxmax, newymin, newymax, this); - minSize=QSize(plotter->get_iplotBorderLeft()+plotter->get_iplotBorderRight()+10, plotter->get_iplotBorderTop()+plotter->get_iplotBorderBottom()+10); + minSize=QSize(plotter->getInternalPlotBorderLeft()+plotter->getInternalPlotBorderRight()+10, plotter->getInternalPlotBorderTop()+plotter->getInternalPlotBorderBottom()+10); } void JKQTPlotter::intBeforePlotScalingRecalculate() { @@ -893,40 +859,40 @@ void JKQTPlotter::reactGraphVisible(bool visible) { QAction* act=dynamic_cast(sender()); if (act) { - get_plotter()->setGraphVisible(act->data().toInt(), visible); + getPlotter()->setGraphVisible(act->data().toInt(), visible); } } -void JKQTPlotter::set_zoomByMouseRectangle(bool zomByrectangle) { +void JKQTPlotter::setZoomByMouseRectangle(bool zomByrectangle) { if (zomByrectangle) mouseActionMode=JKQTPlotter::ZoomRectangle; else mouseActionMode=JKQTPlotter::NoMouseAction; } -void JKQTPlotter::set_rightMouseButtonAction(const JKQTPlotter::RightMouseButtonAction &__value) +void JKQTPlotter::setRightMouseButtonAction(const JKQTPlotter::RightMouseButtonAction &__value) { this->rightMouseButtonAction = __value; } -JKQTPlotter::RightMouseButtonAction JKQTPlotter::get_rightMouseButtonAction() const +JKQTPlotter::RightMouseButtonAction JKQTPlotter::getActionRightMouseButton() const { return this->rightMouseButtonAction; } -void JKQTPlotter::set_leftDoubleClickAction(const JKQTPlotter::LeftDoubleClickAction &__value) +void JKQTPlotter::setLeftDoubleClickAction(const JKQTPlotter::LeftDoubleClickAction &__value) { this->leftDoubleClickAction = __value; } -JKQTPlotter::LeftDoubleClickAction JKQTPlotter::get_leftDoubleClickAction() const +JKQTPlotter::LeftDoubleClickAction JKQTPlotter::getActionLeftDoubleClick() const { return this->leftDoubleClickAction; } -QMenu *JKQTPlotter::get_menuSpecialContextMenu() const { +QMenu *JKQTPlotter::getMenuSpecialContextMenu() const { return this->menuSpecialContextMenu; } -void JKQTPlotter::set_menuSpecialContextMenu(QMenu *menu) +void JKQTPlotter::setMenuSpecialContextMenu(QMenu *menu) { menuSpecialContextMenu=menu; if (menuSpecialContextMenu) { @@ -935,39 +901,39 @@ void JKQTPlotter::set_menuSpecialContextMenu(QMenu *menu) } } -void JKQTPlotter::set_zoomByMouseWheel(bool __value) +void JKQTPlotter::setZoomByMouseWheel(bool __value) { this->zoomByMouseWheel = __value; } -bool JKQTPlotter::get_zoomByMouseWheel() const +bool JKQTPlotter::getZoomByMouseWheel() const { return this->zoomByMouseWheel; } -double JKQTPlotter::get_mouseContextX() const { +double JKQTPlotter::getMouseContextX() const { return this->mouseContextX; } -double JKQTPlotter::get_mouseContextY() const { +double JKQTPlotter::getMouseContextY() const { return this->mouseContextY; } -int JKQTPlotter::get_mouseLastClickX() const { +int JKQTPlotter::getMouseLastClickX() const { return this->mouseLastClickX; } -int JKQTPlotter::get_mouseLastClickY() const { +int JKQTPlotter::getMouseLastClickY() const { return this->mouseLastClickY; } void JKQTPlotter::setMagnification(double m) { magnification=m; - update_plot(); + replotPlot(); } -bool JKQTPlotter::get_zoomByMouseRectangle() const { +bool JKQTPlotter::getZoomByMouseRectangle() const { return (mouseActionMode==JKQTPlotter::ZoomRectangle); } @@ -977,19 +943,19 @@ void JKQTPlotter::modifyContextMenu(QMenu * /*menu*/) void JKQTPlotter::populateToolbar(QToolBar *toolbar) const { - toolbar->addAction(plotter->get_actSaveData()); - toolbar->addAction(plotter->get_actSavePlot()); - toolbar->addAction(plotter->get_actPrint()); + toolbar->addAction(plotter->getActionSaveData()); + toolbar->addAction(plotter->getActionSavePlot()); + toolbar->addAction(plotter->getActionPrint()); toolbar->addSeparator(); - toolbar->addAction(plotter->get_actCopyPixelImage()); - toolbar->addAction(plotter->get_actCopyData()); - toolbar->addAction(plotter->get_actCopyMatlab()); + toolbar->addAction(plotter->getActionCopyPixelImage()); + toolbar->addAction(plotter->getActionCopyData()); + toolbar->addAction(plotter->getActionCopyMatlab()); toolbar->addSeparator(); - toolbar->addAction(plotter->get_actShowPlotData()); + toolbar->addAction(plotter->getActionShowPlotData()); toolbar->addSeparator(); - toolbar->addAction(plotter->get_actZoomAll()); - toolbar->addAction(plotter->get_actZoomIn()); - toolbar->addAction(plotter->get_actZoomOut()); + toolbar->addAction(plotter->getActionZoomAll()); + toolbar->addAction(plotter->getActionZoomIn()); + toolbar->addAction(plotter->getActionZoomOut()); if (actions().size()>0) { toolbar->addSeparator(); @@ -1041,10 +1007,10 @@ void JKQTPlotter::openSpecialContextMenu(int x, int y) } -void JKQTPlotter::set_doDrawing(bool enable) +void JKQTPlotter::setPlotUpdateEnabled(bool enable) { doDrawing=enable; - plotter->set_emitSignals(enable); + plotter->setEmittingSignalsEnabled(enable); //qDebug()< + *
  • open a dialog with a table of the plot data: * - * - open a dialog with a table of the plot data: - * - * \image html jkqtplotter_datatabledialog.png - * - * - zoom into/out of the plot and determine an auto-zoom, which shows all of the plot data - * - switch the visibility of the different graphs in the plot - * . + * \image html jkqtplotter_datatabledialog.png "Data Table Dialog (with buttons to save or copy the data)" + *
  • + *
  • zoom into/out of the plot and determine an auto-zoom, which shows all of the plot data
  • + *
  • switch the visibility of the different graphs in the plot
  • + * * * \subsection JKQTPLOTTER_TOOLBAR Toolbar of JKQTPlotter * @@ -104,7 +113,7 @@ LIB_EXPORT void initJKQTPlotterResources(); * \image html jkqtplotter_toolbar_hidden.png "Hidden Toolbar" * \image html jkqtplotter_toolbar_shown.png "Shown Toolbar" * - * If toolbarAlwaysOn is set to \c true (set_toolbarAlwaysOn() ), the toolbar is always displayed: + * If toolbarAlwaysOn is set to \c true (setToolbarAlwaysOn() ), the toolbar is always displayed: * * \image html jkqtplotter_toolbar_alwayson.png * @@ -115,38 +124,64 @@ LIB_EXPORT void initJKQTPlotterResources(); * \subsection JKQTPLOTTER_ACTIONS QActions from a JKQTPlotter * Often you want to allow the suer to operate a plot from a user-defined QToolBar or a QMenu/QMenuBar in your * application (e.g. provide zooming commands ...). there are generally two ways to achieve this: - * # Simply connect home-brewn QAction instances to the slots provided by JKQTPlotter and JKQTBasePlotter. - * This also allows you to connect different plot properties to edit widgets in your forms. - * # For several functions (especially those also present in JKQTPlotter's context-emun, you can also find - * readily available QAction instances. these are available from JKQTBasePlotter (e.g. by JKQTBasePlotter::get_actPrint() ...). - * From JKQTPlotter you therefor have to use: get_plotter()->get_actPrint() - * . - * \see \subpage JKQTPlotterUserInteraction + *
      + *
    1. Simply connect home-brewn QAction instances to the slots provided by JKQTPlotter and JKQTBasePlotter. + * This also allows you to connect different plot properties to edit widgets in your forms. + * \code + * // add a checkbox to show and hide the position display label in the plot + * chkPositionDisplay=new QCheckBox(tr("show mouse cursor position"), this); + * chkPositionDisplay->setChecked(plot->isMousePositionShown()); + * connect(chkPositionDisplay, SIGNAL(toggled(bool)), plot, SLOT(setMousePositionShown(bool))); + * \endcode + *
    2. + *
    3. For several functions (especially those also present in JKQTPlotter's context-emun, you can also find + * readily available QAction instances. these are available from JKQTBasePlotter (e.g. by JKQTBasePlotter::getActionPrint() ...). + * From JKQTPlotter you therefor have to use: getPlotter()->getActionPrint() + * \code + * // add some of the default QActions from the JKQTPlotter to the window menu + * // Some of the are also available in the context menu and toolbar of the JKQTPlotter + * // others are not + * QMenu* menuPlot=menuBar()->addMenu("Plot-Menu"); + * menuPlot->addAction(plot->getPlotter()->getActionPrint()); + * QMenu* menuPlotS=menuPlot->addMenu("Save ..."); + * menuPlotS->addAction(plot->getPlotter()->getActionSaveData()); + * menuPlotS->addAction(plot->getPlotter()->getActionSavePDF()); // not available from JKQTPlotter by default + * menuPlotS->addAction(plot->getPlotter()->getActionSavePlot()); + * \endcode + *
    4. + *
    + * \see \ref JKQTPlotterUserInteraction * * * - * \subsection JKQTPLOTTER_USERMOUSEINTERACTION User Mouse-Interaction in JKQTPlotter + * \subsection JKQTPLOTTER_USERMOUSEINTERACTION Mouse-Interaction in JKQTPlotter * * * + * \see \ref JKQTPlotterUserInteraction * * * * \section JKQTPLOTTER_USEQTCREATOR How to use JKQTPlotter in the Qt Form Designer * * As JKQTPlotter is a standard Qt widget, you can also use it in Qt UI-files designed with the Qt From Designer (e.g. from within QTCreator). - * For this to work you have to use the "Promote QWidget"-feature of the form designer. The steps you need to take are detailed below: - * # add a new UI-file to your project and open it in the Form Editor. Then right-click the form and select `Promote Widgets ...`:
    - * \image html uidesigner_step1.png + * For this to work you have to use the Promote QWidget"-feature of the form designer. The steps you need to take are detailed below: + *
      + *
    1. add a new UI-file to your project and open it in the Form Editor. Then right-click the form and select `Promote Widgets ...`: * - * # In the dialog that opens, you have to define `JKQTPlotter` as a promotion to `QWidget` as shown below. Finally store the settings by clicking `Add` and closing the dialog with `Close`.
      - * \image html uidesigner_step2.png + * \image html uidesigner_step1.png + *
    2. + *
    3. In the dialog that opens, you have to define `JKQTPlotter` as a promotion to `QWidget` as shown below. Finally store the settings by clicking `Add` and closing the dialog with `Close`. * - * # Now you can add a `QWidget`from the side-bar to the form and then promote it to `JKQTPlotter`, by selecting and right-clicking the `QWidget` and then selecting `Promote To | JKQTPlotter`:
      - * \image html uidesigner_step3.png - * . + * \image html uidesigner_step2.png + *
    4. + *
    5. Now you can add a `QWidget`from the side-bar to the form and then promote it to `JKQTPlotter`, by selecting and right-clicking the `QWidget` and then selecting `Promote To | JKQTPlotter`: * - * \see \subpage JKQTPlotterQtCreator + * \image html uidesigner_step3.png + *
    6. + *
    + * + * \see \ref JKQTPlotterQtCreator * */ class LIB_EXPORT JKQTPlotter: public QWidget { @@ -204,43 +239,43 @@ class LIB_EXPORT JKQTPlotter: public QWidget { /** \brief set the width/height of the icons in the toolbar in pt */ - void set_toolbarIconSize(int value); + void setToolbarIconSize(int value); /** \brief get the width/height of the icons in the toolbar in pt */ - int get_toolbarIconSize(); + int getToolbarIconSize(); /** \brief returns the class internally used for plotting */ - JKQTBasePlotter* get_plotter() const { return plotter; } + JKQTBasePlotter* getPlotter() const { return plotter; } /** \brief returns the class internally used for plotting */ const JKQTBasePlotter* get_constplotter() const { return const_cast(plotter); } /*! \brief returns the property displayToolbar. \details Description of the parameter displayToolbar is:
    \copydoc displayToolbar
    \see displayToolbar for more information */ - virtual bool get_displayToolbar() const; + virtual bool isToolbarVisible() const; /*! \brief returns the property toolbarAlwaysOn. \details Description of the parameter toolbarAlwaysOn is:
    \copydoc toolbarAlwaysOn
    \see toolbarAlwaysOn for more information */ - virtual bool get_toolbarAlwaysOn() const; + virtual bool isToolbarAlwaysOn() const; /*! \brief returns the property displayMousePosition. \details Description of the parameter displayMousePosition is:
    \copydoc displayMousePosition
    \see displayMousePosition for more information */ - virtual bool get_displayMousePosition() const; + virtual bool isMousePositionShown() const; /*! \brief returns the property userActionColor. \details Description of the parameter userActionColor is:
    \copydoc userActionColor
    \see userActionColor for more information */ - virtual QColor get_userActionColor() const; + virtual QColor getUserActionColor() const; /*! \brief returns the property userActionCompositionMode. \details Description of the parameter userActionCompositionMode is:
    \copydoc userActionCompositionMode
    \see userActionCompositionMode for more information */ - virtual QPainter::CompositionMode get_userActionCompositionMode() const; + virtual QPainter::CompositionMode getUserActionCompositionMode() const; /*! \brief returns the current mouseActionMode. \details Description of the parameter mouseActionMode is:
    specifies the user-action mode this JKQtPlotter use when mouse events occur. * This allows you to e.g. draw rectangles or lines over the plot and receive a signal, when the drawing finishes
    \see mouseActionMode for more information */ - virtual MouseActionModes get_mouseActionMode() const; + virtual MouseActionModes getMouseActionMode() const; /** \brief loads the plot properties from a QSettings object */ virtual void loadSettings(QSettings& settings, QString group=QString("plots")); @@ -304,82 +339,73 @@ class LIB_EXPORT JKQTPlotter: public QWidget { inline void forceInternalDatastore() { plotter->forceInternalDatastore(); } /** \brief switch emitting of signals, such as zoomChangedLocally() ..., on (sig=true) or off (sig=false) */ - inline void set_emitSignals(bool sig) { plotter->set_emitSignals(sig); } + inline void setEmittingSignalsEnabled(bool sig) { plotter->setEmittingSignalsEnabled(sig); } /** \brief determine, whether emitting of signals, such as zoomChangedLocally() ..., is switched on or off */ - inline bool get_emitSignals() { return plotter; } + inline bool isEmittingSignalsEnabled() { return plotter; } - /** \brief returns, whether updating the plot is currently activated (e.g. you can deactivate this with set_doDrawing() while performing major updates on the plot) + /** \brief returns, whether updating the plot is currently activated (e.g. you can deactivate this with setPlotUpdateEnabled() while performing major updates on the plot) * - * \see set_doDrawing() + * \see setPlotUpdateEnabled() */ - bool get_doDrawing() const; + bool isPlotUpdateEnabled() const; /** \brief sets whether updating the plot is currently activated (e.g. you can sett his to \c false while performing major updates on the plot) * - * \see get_doDrawing(); + * \see isPlotUpdateEnabled(); */ - void set_doDrawing(bool enable); + void setPlotUpdateEnabled(bool enable); - /*! \brief returns the property rightMouseButtonAction. - \details Description of the parameter rightMouseButtonAction is:
    \copydoc rightMouseButtonAction
    + /*! \brief returns the property zoomByMouseRectangle. + \details Description of the parameter zoomByMouseRectangle is:
    \copydoc zoomByMouseRectangle
    \see rightMouseButtonAction for more information */ - bool get_zoomByMouseRectangle() const; - - /*! \brief sets the property rightMouseButtonAction to the specified \a __value. - \details Description of the parameter rightMouseButtonAction is:
    \copydoc rightMouseButtonAction
    - \see rightMouseButtonAction for more information */ - void set_rightMouseButtonAction(const RightMouseButtonAction & __value); + bool getZoomByMouseRectangle() const; /*! \brief returns the property rightMouseButtonAction. \details Description of the parameter rightMouseButtonAction is:
    \copydoc rightMouseButtonAction
    \see rightMouseButtonAction for more information */ - virtual RightMouseButtonAction get_rightMouseButtonAction() const; - /*! \brief sets the property leftDoubleClickAction to the specified \a __value. + virtual RightMouseButtonAction getActionRightMouseButton() const; + /*! \brief returns the property leftDoubleClickAction. \details Description of the parameter leftDoubleClickAction is:
    \copydoc leftDoubleClickAction
    \see leftDoubleClickAction for more information */ - void set_leftDoubleClickAction(const LeftDoubleClickAction & __value); - /*! \brief returns the property leftDoubleClickAction. - \details Description of the parameter leftDoubleClickAction is:
    \copydoc leftDoubleClickAction
    - \see leftDoubleClickAction for more information */ - virtual LeftDoubleClickAction get_leftDoubleClickAction() const; + virtual LeftDoubleClickAction getActionLeftDoubleClick() const; /*! \brief returns the property menuSpecialContextMenu. \details Description of the parameter menuSpecialContextMenu is:
    \copydoc menuSpecialContextMenu
    . \see menuSpecialContextMenu for more information */ - QMenu *get_menuSpecialContextMenu() const; + QMenu *getMenuSpecialContextMenu() const; /*! \brief set the property menuSpecialContextMenu. \details Description of the parameter menuSpecialContextMenu is:
    \copydoc menuSpecialContextMenu
    . \see menuSpecialContextMenu for more information */ - void set_menuSpecialContextMenu(QMenu* menu); + void setMenuSpecialContextMenu(QMenu* menu); /*! \brief sets the property zoomByMouseWheel to the specified \a __value. \details Description of the parameter zoomByMouseWheel is:
    \copydoc zoomByMouseWheel
    \see zoomByMouseWheel for more information */ - void set_zoomByMouseWheel(bool __value); + void setZoomByMouseWheel(bool __value); /*! \brief returns the property zoomByMouseWheel. \details Description of the parameter zoomByMouseWheel is:
    \copydoc zoomByMouseWheel
    \see zoomByMouseWheel for more information */ - virtual bool get_zoomByMouseWheel() const; + virtual bool getZoomByMouseWheel() const; /** \brief returns the property mouseContextX. \details Description of the parameter mouseContextX is:
    \copydoc mouseContextX
    . \see mouseContextX for more information */ - double get_mouseContextX() const; + double getMouseContextX() const; /** \brief returns the property mouseContextY. \details Description of the parameter mouseContextY is:
    \copydoc mouseContextY
    . \see mouseContextY for more information */ - double get_mouseContextY() const; + double getMouseContextY() const; /** \brief returns the property mouseLastClickX. \details Description of the parameter mouseLastClickX is:
    \copydoc mouseLastClickX
    . \see mouseLastClickX for more information */ - int get_mouseLastClickX() const; + int getMouseLastClickX() const; /** \brief returns the property mouseLastClickY. \details Description of the parameter mouseLastClickY is:
    \copydoc mouseLastClickY
    . \see mouseLastClickY for more information */ - int get_mouseLastClickY() const; + int getMouseLastClickY() const; /** \brief returns the coordinate axis object for the x-axis */ - inline JKQTPHorizontalAxis* get_xAxis() { return plotter->get_xAxis(); } + inline JKQTPHorizontalAxis* getXAxis() { return plotter->getXAxis(); } /** \brief returns the coordinate axis object for the y-axis */ - inline JKQTPVerticalAxis* get_yAxis() { return plotter->get_yAxis(); } + inline JKQTPVerticalAxis* getYAxis() { return plotter->getYAxis(); } /** \brief returns the coordinate axis object for the x-axis as a const pointer */ - inline const JKQTPHorizontalAxis* get_xAxis() const { return plotter->get_xAxis(); } + inline const JKQTPHorizontalAxis* getXAxis() const { return plotter->getXAxis(); } /** \brief returns the coordinate axis object for the y-axis as a const pointer */ - inline const JKQTPVerticalAxis* get_yAxis() const { return plotter->get_yAxis(); } + inline const JKQTPVerticalAxis* getYAxis() const { return plotter->getYAxis(); } /** \brief returns description of i'th graph */ inline JKQTPPlotElement* getGraph(size_t i) { return plotter->getGraph(i); } @@ -446,7 +472,7 @@ class LIB_EXPORT JKQTPlotter: public QWidget { /** \brief gets the next unused style id, i.e. the smalles number >=0 which is not contained in usedStyles */ inline int getNextStyle() { - return get_plotter()->getNextStyle(); + return getPlotter()->getNextStyle(); } /** \brief returns a QPen object for the i-th plot style */ @@ -455,13 +481,13 @@ class LIB_EXPORT JKQTPlotter: public QWidget { } /** \brief font face for key labels */ - inline QString get_keyFont() const { - return get_constplotter()->get_keyFont(); + inline QString getKeyFont() const { + return get_constplotter()->getKeyFont(); } /** \brief font size for key labels [in points] */ - inline double get_keyFontSize() const { - return get_constplotter()->get_keyFontSize(); + inline double getKeyFontSize() const { + return get_constplotter()->getKeyFontSize(); } public slots: /** \brief set the current plot magnification */ @@ -533,47 +559,50 @@ class LIB_EXPORT JKQTPlotter: public QWidget { /** \brief zooms out of the graph (the same as turning the mouse wheel) by the given factor */ inline void zoomOut(double factor=2.0) { plotter->zoomOut(factor); } - /** \brief update the plot */ - void update_plot(); + /** \brief update the plot and the overlays */ + void replotPlot(); - /** \brief update the plot and replot immediately */ - void replot_plot(); - - /** \brief update overlays only */ - void replot_overlays(); - - /** \brief update overlays only */ - void update_overlays(); + /** \brief replot overlays only (use replotPlot() to replot the plot and the overlays) */ + void replotOverlays(); /*! \brief sets the property displayToolbar to the specified \a __value. \details Description of the parameter displayToolbar is:
    \copydoc displayToolbar
    \see displayToolbar for more information */ - void set_displayToolbar(bool __value); + void setToolbarVisible(bool __value); /*! \brief sets the property toolbarAlwaysOn to the specified \a __value. \details Description of the parameter toolbarAlwaysOn is:
    \copydoc toolbarAlwaysOn
    \see toolbarAlwaysOn for more information */ - void set_toolbarAlwaysOn(bool __value); + void setToolbarAlwaysOn(bool __value); /*! \brief sets the property displayMousePosition to the specified \a __value. \details Description of the parameter displayMousePosition is:
    \copydoc displayMousePosition
    \see displayMousePosition for more information */ - void set_displayMousePosition(bool __value); + void setMousePositionShown(bool __value); /*! \brief sets the property userActionColor to the specified \a __value. \details Description of the parameter userActionColor is:
    \copydoc userActionColor
    \see userActionColor for more information */ - void set_userActionColor(const QColor & __value); + void setUserActionColor(const QColor & __value); /*! \brief sets the property userActionCompositionMode to the specified \a __value. \details Description of the parameter userActionCompositionMode is:
    \copydoc userActionCompositionMode
    \see userActionCompositionMode for more information */ - void set_userActionCompositionMode(const QPainter::CompositionMode & __value); + void setUserActionCompositionMode(const QPainter::CompositionMode & __value); /*! \brief sets the current mouseActionMode . \details Description of the parameter mouseActionMode is:
    specifies the user-action mode this JKQtPlotter use when mouse events occur. * This allows you to e.g. draw rectangles or lines over the plot and receive a signal, when the drawing finishes
    \see mouseActionMode for more information */ - void set_mouseActionMode(const MouseActionModes & __value); + void setMouseActionMode(const MouseActionModes & __value); + /*! \brief sets the property zoomByMouseRectangle to the specified \a __value. + \details Description of the parameter zoomByMouseRectangle is:
    \copydoc zoomByMouseRectangle
    + \see zoomByMouseRectangle for more information */ + void setZoomByMouseRectangle(bool zomByrectangle); + /*! \brief sets the property leftDoubleClickAction to the specified \a __value. + \details Description of the parameter leftDoubleClickAction is:
    \copydoc leftDoubleClickAction
    + \see leftDoubleClickAction for more information */ + void setLeftDoubleClickAction(const LeftDoubleClickAction & __value); + /*! \brief sets the property rightMouseButtonAction to the specified \a __value. \details Description of the parameter rightMouseButtonAction is:
    \copydoc rightMouseButtonAction
    \see rightMouseButtonAction for more information */ - void set_zoomByMouseRectangle(bool zomByrectangle); + void setRightMouseButtonAction(const RightMouseButtonAction & __value); /** \brief may be connected to zoomChangedLocally() of a different plot and synchronizes the local x-axis to the other x-axis */ @@ -665,7 +694,7 @@ class LIB_EXPORT JKQTPlotter: public QWidget { bool doDrawing; - /** \brief JKQTPlotterBase used to plot */ + /** \brief JKQTBasePlotter used to plot */ JKQTBasePlotter* plotter; diff --git a/lib/jkqtplottergui/jkqtpenhancedtableview.h b/lib/jkqtplottergui/jkqtpenhancedtableview.h index 01ec935738..37dbae8170 100644 --- a/lib/jkqtplottergui/jkqtpenhancedtableview.h +++ b/lib/jkqtplottergui/jkqtpenhancedtableview.h @@ -49,7 +49,7 @@ class LIB_EXPORT JKQTPEnhancedTableView : public QTableView { void paint(QPainter& painter, QRect pageRec=QRect()); QSizeF getTotalSize() const; - QAction* getPrintAction() const { return printAction; } + QAction* getActionPrint() const { return printAction; } signals: void keyPressed(int key, Qt::KeyboardModifiers modifiers, QString text); diff --git a/lib/jkqtplottergui/jkqtpgraphsmodel.h b/lib/jkqtplottergui/jkqtpgraphsmodel.h index 80f7943967..37ab0ceb5e 100644 --- a/lib/jkqtplottergui/jkqtpgraphsmodel.h +++ b/lib/jkqtplottergui/jkqtpgraphsmodel.h @@ -35,6 +35,9 @@ class JKQTBasePlotter; // forward /** \brief data model with all plots ina JKQTBasePlotter (+ allows to switch them visible/invisible) * \ingroup jkqtpgraphsmodel * + * This class is derived from QAbstractTableModel and implements a model where + * some properties are editable. It is designed to be used together with e.g. QListView. + * * \image html JKQTPGraphsModel.png */ class JKQTPGraphsModel : public QAbstractTableModel diff --git a/lib/jkqtplottergui/jkvanishqtoolbar.h b/lib/jkqtplottergui/jkvanishqtoolbar.h index 0bd9f18e99..a8b1b93031 100644 --- a/lib/jkqtplottergui/jkvanishqtoolbar.h +++ b/lib/jkqtplottergui/jkvanishqtoolbar.h @@ -31,6 +31,9 @@ /** \brief a modified a href="http://doc.trolltech.com/4.5/qtoolbar.html">QToolBar which vanishes when the mouse leaves the toolbar. * \ingroup jkqtptools_qtwidgets + * + * \image html jkqtplotter_toolbar_hidden.png "Hidden Toolbar" + * \image html jkqtplotter_toolbar_shown.png "Shown Toolbar" */ class LIB_EXPORT JKVanishQToolBar: public QToolBar { Q_OBJECT diff --git a/lib/jkqtplottertools/jkqtpimagetools.cpp b/lib/jkqtplottertools/jkqtpimagetools.cpp index db438c113e..3c5730b991 100644 --- a/lib/jkqtplottertools/jkqtpimagetools.cpp +++ b/lib/jkqtplottertools/jkqtpimagetools.cpp @@ -1828,30 +1828,30 @@ JKQTPColorPaletteTools::JKQTPColorPaletteTools(JKQTBasePlotter *parent) { cbParent=parent; colorBarRightAxis=new JKQTPVerticalIndependentAxis(0, 100, 0, 100, parent); - if (parent) colorBarRightAxis->loadSettings(parent->get_yAxis()); + if (parent) colorBarRightAxis->loadSettings(parent->getYAxis()); colorBarRightAxis->set_drawMode1(JKQTPCADMline); colorBarRightAxis->set_drawMode2(JKQTPCADMcomplete); - colorBarRightAxis->set_axisLabel(""); + colorBarRightAxis->setAxisLabel(""); colorBarRightAxis->set_minTicks(3); - colorBarRightAxis->set_showZeroAxis(false); + colorBarRightAxis->setShowZeroAxis(false); colorBarRightAxis->set_minorTicks(0); colorBarRightAxis->set_tickOutsideLength(0); colorBarRightAxis->set_minorTickOutsideLength(0); colorBarTopAxis=new JKQTPHorizontalIndependentAxis(0, 100, 0, 100, parent); - if (parent) colorBarTopAxis->loadSettings(parent->get_xAxis()); + if (parent) colorBarTopAxis->loadSettings(parent->getXAxis()); colorBarTopAxis->set_drawMode1(JKQTPCADMline); colorBarTopAxis->set_drawMode2(JKQTPCADMcomplete); - colorBarTopAxis->set_axisLabel(""); + colorBarTopAxis->setAxisLabel(""); colorBarTopAxis->set_minTicks(3); - colorBarTopAxis->set_showZeroAxis(false); + colorBarTopAxis->setShowZeroAxis(false); colorBarTopAxis->set_minorTicks(0); colorBarTopAxis->set_tickOutsideLength(0); colorBarTopAxis->set_minorTickOutsideLength(0); this->palette=JKQTPMathImageMATLAB; - this->imageNameFontName=parent->get_keyFont(); - this->imageNameFontSize=parent->get_keyFontSize(); + this->imageNameFontName=parent->getKeyFont(); + this->imageNameFontSize=parent->getKeyFontSize(); this->imageName=""; this->showColorBar=true; this->colorBarWidth=14; @@ -1885,25 +1885,25 @@ void JKQTPColorPaletteTools::cbGetOutsideSize(JKQTPEnhancedPainter& painter, int if (colorBarRightVisible) { rightSpace+=cbParent->pt2px(painter, colorBarWidth+colorBarOffset); colorBarRightAxis->setRange(internalDataMin, internalDataMax); - colorBarRightAxis->set_axisWidth(colorBarRelativeHeight*cbParent->get_plotHeight()); + colorBarRightAxis->setAxisWidth(colorBarRelativeHeight*cbParent->getPlotHeight()); QSize s=colorBarRightAxis->getSize2(painter); - /*cbParent->get_mathText()->set_fontSize(imageNameFontSize*cbParent->get_fontSizeMultiplier()); - cbParent->get_mathText()->set_fontRoman(imageNameFontName); - cbParent->get_mathText()->parse(imageName); - QSizeF names=cbParent->get_mathText()->getSize(painter);*/ - QSizeF names=cbParent->getTextSizeSize(imageNameFontName, imageNameFontSize*cbParent->get_fontSizeMultiplier(), imageName, painter); + /*cbParent->getMathText()->setFontSize(imageNameFontSize*cbParent->getFontSizeMultiplier()); + cbParent->getMathText()->setFontRoman(imageNameFontName); + cbParent->getMathText()->parse(imageName); + QSizeF names=cbParent->getMathText()->getSize(painter);*/ + QSizeF names=cbParent->getTextSizeSize(imageNameFontName, imageNameFontSize*cbParent->getFontSizeMultiplier(), imageName, painter); rightSpace+=cbParent->pt2px(painter, colorBarWidth+colorBarOffset)+qMax((double)s.width(), (double)names.width()); } if (colorBarTopVisible) { //topSpace+=cbParent->pt2px(painter, colorBarWidth+colorBarOffset); colorBarTopAxis->setRange(internalDataMin, internalDataMax); - colorBarTopAxis->set_axisWidth(colorBarRelativeHeight*cbParent->get_plotWidth()); + colorBarTopAxis->setAxisWidth(colorBarRelativeHeight*cbParent->getPlotWidth()); QSize s=colorBarTopAxis->getSize2(painter); - /*cbParent->get_mathText()->set_fontSize(imageNameFontSize*cbParent->get_fontSizeMultiplier()); - cbParent->get_mathText()->set_fontRoman(imageNameFontName); - cbParent->get_mathText()->parse(imageName); - QSizeF names=cbParent->get_mathText()->getSize(painter);*/ - QSizeF names=cbParent->getTextSizeSize(imageNameFontName, imageNameFontSize*cbParent->get_fontSizeMultiplier(), imageName, painter); + /*cbParent->getMathText()->setFontSize(imageNameFontSize*cbParent->getFontSizeMultiplier()); + cbParent->getMathText()->setFontRoman(imageNameFontName); + cbParent->getMathText()->parse(imageName); + QSizeF names=cbParent->getMathText()->getSize(painter);*/ + QSizeF names=cbParent->getTextSizeSize(imageNameFontName, imageNameFontSize*cbParent->getFontSizeMultiplier(), imageName, painter); topSpace+=cbParent->pt2px(painter, colorBarWidth+colorBarOffset)+qMax((double)s.height(), (double)names.height()); } } @@ -1932,11 +1932,11 @@ void JKQTPColorPaletteTools::cbDrawOutside(JKQTPEnhancedPainter& painter, QRect JKQTPImagePlot_array2image(d, h, 200, b, palette, 0, 199); - /*cbParent->get_mathText()->set_fontSize(imageNameFontSize*cbParent->get_fontSizeMultiplier()); - cbParent->get_mathText()->set_fontRoman(imageNameFontName); - cbParent->get_mathText()->parse(imageName); - QSizeF names=cbParent->get_mathText()->getSize(painter);*/ - QSizeF names=cbParent->getTextSizeSize(imageNameFontName, imageNameFontSize*cbParent->get_fontSizeMultiplier(), imageName, painter); + /*cbParent->getMathText()->setFontSize(imageNameFontSize*cbParent->getFontSizeMultiplier()); + cbParent->getMathText()->setFontRoman(imageNameFontName); + cbParent->getMathText()->parse(imageName); + QSizeF names=cbParent->getMathText()->getSize(painter);*/ + QSizeF names=cbParent->getTextSizeSize(imageNameFontName, imageNameFontSize*cbParent->getFontSizeMultiplier(), imageName, painter); double icolorBarRelativeHeight=colorBarRelativeHeight; int barHeight=rightSpace.height()*icolorBarRelativeHeight; @@ -1951,24 +1951,24 @@ void JKQTPColorPaletteTools::cbDrawOutside(JKQTPEnhancedPainter& painter, QRect QRect cb(rightSpace.x()+cbParent->pt2px(painter, colorBarOffset), rightSpace.top()+(rightSpace.height()-barHeight)/2, cbParent->pt2px(painter, colorBarWidth), barHeight); painter.drawImage(cb, b.mirrored(true, false)); QPen p=painter.pen(); - p.setColor(colorBarRightAxis->get_axisColor()); - p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, cbParent->pt2px(painter, colorBarRightAxis->get_lineWidth()*cbParent->get_lineWidthMultiplier()))); + p.setColor(colorBarRightAxis->getAxisColor()); + p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, cbParent->pt2px(painter, colorBarRightAxis->getLineWidth()*cbParent->getLineWidthMultiplier()))); painter.setPen(p); painter.drawRect(cb); colorBarRightAxis->setRange(internalDataMin, internalDataMax); - colorBarRightAxis->set_axisWidth(cb.height()); - colorBarRightAxis->set_axisOffset(cb.top()); + colorBarRightAxis->setAxisWidth(cb.height()); + colorBarRightAxis->setAxisOffset(cb.top()); colorBarRightAxis->set_otherAxisOffset(cb.left()); colorBarRightAxis->set_otherAxisWidth(cb.width()); colorBarRightAxis->drawAxes(painter); - cbParent->get_mathText()->set_fontSize(imageNameFontSize*cbParent->get_fontSizeMultiplier()); - cbParent->get_mathText()->set_fontRoman(imageNameFontName); - cbParent->get_mathText()->parse(imageName); - cbParent->get_mathText()->draw(painter, Qt::AlignHCenter|Qt::AlignVCenter, QRect(rightSpace.x(), rightSpace.y(), rightSpace.width(), (rightSpace.height()-barHeight)/2)); + cbParent->getMathText()->setFontSize(imageNameFontSize*cbParent->getFontSizeMultiplier()); + cbParent->getMathText()->setFontRoman(imageNameFontName); + cbParent->getMathText()->parse(imageName); + cbParent->getMathText()->draw(painter, Qt::AlignHCenter|Qt::AlignVCenter, QRect(rightSpace.x(), rightSpace.y(), rightSpace.width(), (rightSpace.height()-barHeight)/2)); painter.restore(); } @@ -1997,11 +1997,11 @@ void JKQTPColorPaletteTools::cbDrawOutside(JKQTPEnhancedPainter& painter, QRect - /*cbParent->get_mathText()->set_fontSize(imageNameFontSize*cbParent->get_fontSizeMultiplier()); - cbParent->get_mathText()->set_fontRoman(imageNameFontName); - cbParent->get_mathText()->parse(imageName); - QSizeF names=cbParent->get_mathText()->getSize(painter);*/ - QSizeF names=cbParent->getTextSizeSize(imageNameFontName, imageNameFontSize*cbParent->get_fontSizeMultiplier(), imageName, painter); + /*cbParent->getMathText()->setFontSize(imageNameFontSize*cbParent->getFontSizeMultiplier()); + cbParent->getMathText()->setFontRoman(imageNameFontName); + cbParent->getMathText()->parse(imageName); + QSizeF names=cbParent->getMathText()->getSize(painter);*/ + QSizeF names=cbParent->getTextSizeSize(imageNameFontName, imageNameFontSize*cbParent->getFontSizeMultiplier(), imageName, painter); double icolorBarRelativeHeight=colorBarRelativeHeight; int barWidth=topSpace.width()*icolorBarRelativeHeight; @@ -2018,25 +2018,25 @@ void JKQTPColorPaletteTools::cbDrawOutside(JKQTPEnhancedPainter& painter, QRect rm.rotate(90); painter.drawImage(cb, b.transformed(rm)); QPen p=painter.pen(); - p.setColor(colorBarTopAxis->get_axisColor()); - p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, cbParent->pt2px(painter, colorBarTopAxis->get_lineWidth()*cbParent->get_lineWidthMultiplier()))); + p.setColor(colorBarTopAxis->getAxisColor()); + p.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, cbParent->pt2px(painter, colorBarTopAxis->getLineWidth()*cbParent->getLineWidthMultiplier()))); painter.setPen(p); painter.drawRect(cb); colorBarTopAxis->setRange(internalDataMin, internalDataMax); - colorBarTopAxis->set_axisWidth(cb.width()); - colorBarTopAxis->set_axisOffset(cb.left()); + colorBarTopAxis->setAxisWidth(cb.width()); + colorBarTopAxis->setAxisOffset(cb.left()); colorBarTopAxis->set_otherAxisOffset(cb.top()); colorBarTopAxis->set_otherAxisWidth(cb.height()); colorBarTopAxis->drawAxes(painter); - cbParent->get_mathText()->set_fontSize(imageNameFontSize*cbParent->get_fontSizeMultiplier()); - cbParent->get_mathText()->set_fontRoman(imageNameFontName); - cbParent->get_mathText()->parse(imageName); - cbParent->get_mathText()->draw(painter, Qt::AlignHCenter|Qt::AlignVCenter, QRect(topSpace.right()-(topSpace.width()-barWidth)/2, topSpace.y(), (topSpace.width()-barWidth)/2, topSpace.height())); + cbParent->getMathText()->setFontSize(imageNameFontSize*cbParent->getFontSizeMultiplier()); + cbParent->getMathText()->setFontRoman(imageNameFontName); + cbParent->getMathText()->parse(imageName); + cbParent->getMathText()->draw(painter, Qt::AlignHCenter|Qt::AlignVCenter, QRect(topSpace.right()-(topSpace.width()-barWidth)/2, topSpace.y(), (topSpace.width()-barWidth)/2, topSpace.height())); painter.restore(); } diff --git a/lib/jkqtplottertools/jkqtpimagetools.h b/lib/jkqtplottertools/jkqtpimagetools.h index a6a76e008d..5da7e631c2 100644 --- a/lib/jkqtplottertools/jkqtpimagetools.h +++ b/lib/jkqtplottertools/jkqtpimagetools.h @@ -911,7 +911,7 @@ class LIB_EXPORT JKQTPColorPaletteTools { /*! \brief returns the property rangeMinFailAction. \details Description of the parameter rangeMinFailAction is:
    \copydoc rangeMinFailAction
    \see rangeMinFailAction for more information */ - inline virtual JKQTPMathImageColorRangeFailAction get_rangeMinFailAction() const + inline virtual JKQTPMathImageColorRangeFailAction getAction_rangeMinFail() const { return this->rangeMinFailAction; } @@ -925,7 +925,7 @@ class LIB_EXPORT JKQTPColorPaletteTools { /*! \brief returns the property rangeMaxFailAction. \details Description of the parameter rangeMaxFailAction is:
    \copydoc rangeMaxFailAction
    \see rangeMaxFailAction for more information */ - inline virtual JKQTPMathImageColorRangeFailAction get_rangeMaxFailAction() const + inline virtual JKQTPMathImageColorRangeFailAction getAction_rangeMaxFail() const { return this->rangeMaxFailAction; } @@ -988,14 +988,14 @@ class LIB_EXPORT JKQTPColorPaletteTools { /*! \brief sets the property showColorBar to the specified \a __value. \details Description of the parameter showColorBar is:
    \copydoc showColorBar
    \see showColorBar for more information */ - inline virtual void set_showColorBar(bool __value) + inline virtual void setShowColorBar(bool __value) { this->showColorBar = __value; } /*! \brief returns the property showColorBar. \details Description of the parameter showColorBar is:
    \copydoc showColorBar
    \see showColorBar for more information */ - inline virtual bool get_showColorBar() const + inline virtual bool getShowColorBar() const { return this->showColorBar; }