mirror of
https://github.com/jkriege2/JKQtPlotter.git
synced 2024-12-24 09:31:40 +08:00
major renaming to get rid of the get_.../set_... function names
improved documentation
This commit is contained in:
parent
a73deb098d
commit
df257a6b1a
@ -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..."
|
||||
|
@ -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);
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -68,7 +68,7 @@ void timingTest(QPainter& painter, QString text, QString name, double fontSize)
|
||||
for (int i=0; i<N; i++) {
|
||||
double t;
|
||||
JKQTMathText mt;
|
||||
mt.set_fontSize(fontSize);
|
||||
mt.setFontSize(fontSize);
|
||||
ht.start(); mt.parse(text); t=ht.get_time()/1000.0;
|
||||
sum_parse+=t;
|
||||
sqrsum_parse+=t*t;
|
||||
@ -128,11 +128,11 @@ int main(int argc, char* argv[])
|
||||
painter.setRenderHint(QPainter::TextAntialiasing);
|
||||
ht.start();
|
||||
|
||||
mt.set_fontRoman("Times New Roman");
|
||||
mt.set_fontMathRoman("Times New Roman");
|
||||
mt.set_fontSans("Arial");
|
||||
mt.set_fontMathSans("Arial");
|
||||
mt.set_fontTypewriter("Courier");
|
||||
mt.setFontRoman("Times New Roman");
|
||||
mt.setFontMathRoman("Times New Roman");
|
||||
mt.setFontSans("Arial");
|
||||
mt.setFontMathSans("Arial");
|
||||
mt.setFontTypewriter("Courier");
|
||||
mt.parse(mathTest);
|
||||
bool okh=true;
|
||||
browser.textCursor().insertHtml("<hr>"+mt.toHtml(&okh)+"<hr><br><br>");
|
||||
@ -141,25 +141,25 @@ int main(int argc, char* argv[])
|
||||
std::cout<<mt.get_error_list().join("\n").toStdString()<<std::endl<<std::endl;
|
||||
}
|
||||
std::cout<<"parse mathTest in "<<ht.get_time()/1000.0<<" ms\n";
|
||||
mt.set_fontSize(10);
|
||||
mt.setFontSize(10);
|
||||
Y+=draw(painter, X1, Y, mt, "math, symbol, 10pt");
|
||||
mt.set_fontSize(20);
|
||||
mt.setFontSize(20);
|
||||
Y+=draw(painter, X1, Y, mt, "math, symbol, 20pt");
|
||||
ht.start();
|
||||
mt.parse(symbolTest);
|
||||
std::cout<<"parse symbolTest in "<<ht.get_time()/1000.0<<" ms\n";
|
||||
browser.textCursor().insertHtml("<hr>"+mt.toHtml(&okh)+"<hr><br><br>");
|
||||
qDebug()<<"HTML2: ---------------------------------------------\n"<<mt.toHtml(&okh)<<"\nHTML2: --------------------------------------------- ok="<<okh;
|
||||
mt.set_fontSize(12);
|
||||
mt.setFontSize(12);
|
||||
Y+=draw(painter, X1, Y, mt, "math, XITS, 12pt");
|
||||
ht.start();
|
||||
mt.parse(text);
|
||||
std::cout<<"parse text in "<<ht.get_time()/1000.0<<" ms\n";
|
||||
browser.textCursor().insertHtml("<hr>"+mt.toHtml(&okh)+"<hr><br><br>");
|
||||
qDebug()<<"HTML2: ---------------------------------------------\n"<<mt.toHtml(&okh)<<"\nHTML2: --------------------------------------------- ok="<<okh;
|
||||
mt.set_fontSize(10);
|
||||
mt.setFontSize(10);
|
||||
Y+=draw(painter, X1, Y, mt, "text, symbol, 10pt");
|
||||
mt.set_fontSize(16);
|
||||
mt.setFontSize(16);
|
||||
Y+=draw(painter, X1, Y, mt, "text, symbol, 16pt");
|
||||
|
||||
Y+=30;
|
||||
@ -167,21 +167,21 @@ int main(int argc, char* argv[])
|
||||
ht.start();
|
||||
mt.parse(mathTest);
|
||||
std::cout<<"parse mathTest in "<<ht.get_time()/1000.0<<" ms\n";
|
||||
mt.set_fontSize(10);
|
||||
mt.setFontSize(10);
|
||||
Y+=draw(painter, X1, Y, mt, "math, XITS, 10pt");
|
||||
mt.set_fontSize(20);
|
||||
mt.setFontSize(20);
|
||||
Y+=draw(painter, X1, Y, mt, "math, XITS, 20pt");
|
||||
ht.start();
|
||||
mt.parse(symbolTest);
|
||||
std::cout<<"parse symbolTest in "<<ht.get_time()/1000.0<<" ms\n";
|
||||
mt.set_fontSize(12);
|
||||
mt.setFontSize(12);
|
||||
Y+=draw(painter, X1, Y, mt, "math, XITS, 12pt");
|
||||
ht.start();
|
||||
mt.parse(text);
|
||||
std::cout<<"parse text in "<<ht.get_time()/1000.0<<" ms\n";
|
||||
mt.set_fontSize(10);
|
||||
mt.setFontSize(10);
|
||||
Y+=draw(painter, X1, Y, mt, "text, XITS, 10pt");
|
||||
mt.set_fontSize(16);
|
||||
mt.setFontSize(16);
|
||||
Y+=draw(painter, X1, Y, mt, "text, XITS, 16pt");
|
||||
|
||||
|
||||
@ -191,21 +191,21 @@ int main(int argc, char* argv[])
|
||||
ht.start();
|
||||
mt.parse(mathTest);
|
||||
std::cout<<"parse mathTest in "<<ht.get_time()/1000.0<<" ms\n";
|
||||
mt.set_fontSize(10);
|
||||
mt.setFontSize(10);
|
||||
Y+=draw(painter, X1, Y, mt, "math, Arial Unicode, 10pt");
|
||||
mt.set_fontSize(20);
|
||||
mt.setFontSize(20);
|
||||
Y+=draw(painter, X1, Y, mt, "math, Arial Unicode, 20pt");
|
||||
ht.start();
|
||||
mt.parse(symbolTest);
|
||||
std::cout<<"parse symbolTest in "<<ht.get_time()/1000.0<<" ms\n";
|
||||
mt.set_fontSize(12);
|
||||
mt.setFontSize(12);
|
||||
Y+=draw(painter, X1, Y, mt, "math, Arial Unicode, 12pt");
|
||||
ht.start();
|
||||
mt.parse(text);
|
||||
std::cout<<"parse text in "<<ht.get_time()/1000.0<<" ms\n";
|
||||
mt.set_fontSize(10);
|
||||
mt.setFontSize(10);
|
||||
Y+=draw(painter, X1, Y, mt, "text, Arial Unicode, 10pt");
|
||||
mt.set_fontSize(16);
|
||||
mt.setFontSize(16);
|
||||
Y+=draw(painter, X1, Y, mt, "text, Arial Unicode, 16pt");
|
||||
|
||||
Y+=30;
|
||||
@ -213,21 +213,21 @@ int main(int argc, char* argv[])
|
||||
ht.start();
|
||||
mt.parse(mathTest);
|
||||
std::cout<<"parse mathTest in "<<ht.get_time()/1000.0<<" ms\n";
|
||||
mt.set_fontSize(10);
|
||||
mt.setFontSize(10);
|
||||
Y+=draw(painter, X1, Y, mt, "math, STIX, 10pt");
|
||||
mt.set_fontSize(20);
|
||||
mt.setFontSize(20);
|
||||
Y+=draw(painter, X1, Y, mt, "math, STIX, 20pt");
|
||||
ht.start();
|
||||
mt.parse(symbolTest);
|
||||
std::cout<<"parse symbolTest in "<<ht.get_time()/1000.0<<" ms\n";
|
||||
mt.set_fontSize(12);
|
||||
mt.setFontSize(12);
|
||||
Y+=draw(painter, X1, Y, mt, "math, STIX, 12pt");
|
||||
ht.start();
|
||||
mt.parse(text);
|
||||
std::cout<<"parse text in "<<ht.get_time()/1000.0<<" ms\n";
|
||||
mt.set_fontSize(10);
|
||||
mt.setFontSize(10);
|
||||
Y+=draw(painter, X1, Y, mt, "text, STIX, 10pt");
|
||||
mt.set_fontSize(16);
|
||||
mt.setFontSize(16);
|
||||
Y+=draw(painter, X1, Y, mt, "text, STIX, 16pt");
|
||||
|
||||
|
||||
|
@ -214,7 +214,7 @@ QTreeWidgetItem *TestForm::createTree(JKQTMathText::MTnode *node, QTreeWidgetIte
|
||||
name=QString("MTdecoratedNode: mode='%1'").arg(JKQTMathText::decorationToString(decoN->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<QVector<JKQTMathText::MTnode*> > 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);
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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<double> 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<double> 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();
|
||||
|
||||
|
||||
|
||||
|
@ -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; i<NEMPTY; i++) {
|
||||
xef[i]=i;
|
||||
@ -24,7 +24,7 @@ TestWidgetEmptyPlot::TestWidgetEmptyPlot(QWidget *parent) :
|
||||
efunc->set_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);
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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<QPointF> 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);
|
||||
|
||||
}
|
||||
|
@ -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; i<N1; i++) {
|
||||
@ -75,7 +75,7 @@ TestWidgetGraphs::TestWidgetGraphs(QWidget *parent) :
|
||||
y21r[i]=double(rand()%100)/10.0-5.0;
|
||||
y21re[i]=y21r[i]*double(rand()%10)/40.0;
|
||||
}
|
||||
JKQTPDatastore* ds=plot->get_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<JKQTPFilledCurveXGraph*>(plot->get_plotter()->getGraph(id));
|
||||
size_t id=plot->getPlotter()->addGraph(cx2, cy21, "$5\\cdot\\sin(x)$", JKQTPFilledCurveX);
|
||||
JKQTPFilledCurveXGraph* fcxgr=qobject_cast<JKQTPFilledCurveXGraph*>(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();
|
||||
}
|
||||
|
@ -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<double>(rand())/static_cast<double>(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();
|
||||
}
|
||||
|
@ -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<double> x,y;
|
||||
for (unsigned int i=0; i<N2; i++) {
|
||||
const double xx=static_cast<double>(i+1)/static_cast<double>(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);
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
#include <QStringList>
|
||||
#include "../../../jkqtpbaseplotter.h"
|
||||
|
||||
class JKQTPEmfEngineAdapter : public JKQTBasePlotter::JKQTPPaintDeviceAdapter
|
||||
class JKQTPEmfEngineAdapter : public JKQTPPaintDeviceAdapter
|
||||
{
|
||||
public:
|
||||
JKQTPEmfEngineAdapter();
|
||||
|
@ -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();
|
||||
|
@ -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();
|
||||
|
@ -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();
|
||||
|
@ -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]");
|
||||
```
|
||||
|
||||
|
@ -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();
|
||||
|
@ -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:
|
||||
|
@ -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();
|
||||
|
@ -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
|
||||
|
@ -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<double>* p=static_cast<QVector<double>*>(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<void*>(myDataObject))`):
|
||||
```.cpp
|
||||
JKQTPXFunctionLineGraph* func3=new JKQTPXFunctionLineGraph(plot);
|
||||
func3->set_plotFunction([](double x, void* params) {
|
||||
func3->setPlotFunction([](double x, void* params) {
|
||||
QMap<QString,double>* p=static_cast<QMap<QString,double>*>(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);
|
||||
```
|
||||
|
@ -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<double>
|
||||
JKQTPXFunctionLineGraph* func2=new JKQTPXFunctionLineGraph(plot);
|
||||
func2->set_plotFunction([](double x, void* params) {
|
||||
func2->setPlotFunction([](double x, void* params) {
|
||||
QVector<double>* p=static_cast<QVector<double>*>(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 QMap<QString,double)
|
||||
JKQTPXFunctionLineGraph* func3=new JKQTPXFunctionLineGraph(plot);
|
||||
func3->set_plotFunction([](double x, void* params) {
|
||||
func3->setPlotFunction([](double x, void* params) {
|
||||
QMap<QString,double>* p=static_cast<QMap<QString,double>*>(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
|
||||
|
@ -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
|
||||
|
@ -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();
|
||||
|
@ -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();
|
||||
|
@ -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();
|
||||
|
@ -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();
|
||||
|
@ -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();
|
||||
|
@ -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();
|
||||
|
@ -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();
|
||||
|
@ -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();
|
||||
|
@ -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)$"));
|
||||
```
|
||||
|
@ -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();
|
||||
|
@ -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, ...
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
```
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
||||
|
@ -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);
|
||||
```
|
||||
|
||||
|
@ -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
|
||||
|
@ -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:
|
||||
|
@ -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();
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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();
|
||||
|
@ -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();
|
||||
|
@ -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();
|
||||
|
@ -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:<br>![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.
|
||||
|
@ -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;
|
||||
|
@ -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();
|
||||
|
@ -13,9 +13,9 @@
|
||||
template<class TGRAPH>
|
||||
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();
|
||||
|
@ -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:
|
||||
|
||||
|
@ -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");
|
||||
|
@ -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();
|
||||
|
@ -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();
|
||||
|
@ -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<JKQTPGraphSymbols>(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:
|
||||
|
||||
|
@ -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<JKQTPGraphSymbols>(graph->get_symbol()))+QString(", ")+lname);
|
||||
|
@ -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();
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
|
@ -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();
|
||||
|
@ -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:
|
||||
|
@ -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
|
||||
|
@ -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");
|
||||
}
|
||||
|
@ -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<plots.size()) {
|
||||
if (remove) delete plots[i];
|
||||
plots.remove(i);
|
||||
update_plot();
|
||||
replotPlot();
|
||||
}
|
||||
}
|
||||
|
||||
@ -163,7 +163,7 @@ void JKQTFastPlotter::deletePlot(JKQTFPPlot* g, bool remove) {
|
||||
if (i>=0 && i<plots.size()) {
|
||||
if (remove) delete plots[i];
|
||||
plots.remove(i);
|
||||
update_plot();
|
||||
replotPlot();
|
||||
}
|
||||
}
|
||||
|
||||
@ -269,7 +269,7 @@ void JKQTFastPlotter::resizeEvent(QResizeEvent *event) {
|
||||
systemImage=newImage;
|
||||
}
|
||||
//std::cout<<"replotting after resize to ("<<width()<<" x "<<height()<<")...\n";
|
||||
update_plot();
|
||||
replotPlot();
|
||||
event->accept();
|
||||
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="<<xMin<<" xMax="<<xMax<<" plotBorderLeft="<<plotBorderLeft<<" plotBorderLeft="<<plotBorderRight<<"\n";
|
||||
doDrawing=olddo;
|
||||
update_plot();
|
||||
replotPlot();
|
||||
}
|
||||
|
||||
void JKQTFastPlotter::synchronizeY(JKQTFastPlotter* toWhere) {
|
||||
@ -823,12 +823,12 @@ void JKQTFastPlotter::synchronizeY(JKQTFastPlotter* toWhere) {
|
||||
doDrawing=false;
|
||||
yMin=toWhere->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="<<yMin<<" yMax="<<yMax<<" plotBorderTop="<<plotBorderTop<<" plotBorderBottom="<<plotBorderBottom<<"\n";
|
||||
doDrawing=olddo;
|
||||
update_plot();
|
||||
replotPlot();
|
||||
}
|
||||
*/
|
||||
|
||||
@ -1056,7 +1056,7 @@ void JKQTFPVBarPlot::drawGraph(QPainter& painter) {
|
||||
p.setJoinStyle(Qt::RoundJoin);
|
||||
|
||||
painter.setPen(p);
|
||||
if (!parent->get_yAxisLog()) {
|
||||
if (!parent->getYAxisLog()) {
|
||||
if (datatype==JKQTFPLPPointer) {
|
||||
for (unsigned int i=0; i<N; i++) {
|
||||
double xval=parent->x2p(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; i<N; i++) {
|
||||
double v=parent->y2p(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<uint8_t>(d, 1, 200, b, palette, 0, 199);
|
||||
//std::cout<<"bar.width="<<b.width()<<" bar.height="<<b.height()<<"\n";
|
||||
QRectF r(parent->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="<<r.left()<<" r.top="<<r.top()<<" r.width="<<r.width()<<" r.height="<<r.height()<<"\n";
|
||||
bool c=painter.hasClipping();
|
||||
painter.setClipping(false);
|
||||
@ -1426,10 +1426,10 @@ void JKQTFPQScaleBarXPlot::drawGraph(QPainter& painter) {
|
||||
painter.save();
|
||||
|
||||
|
||||
QRectF r(QPointF(parent->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);
|
||||
}
|
||||
|
@ -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: <BLOCKQUOTE>\copydoc JKQTFastPlotter::plotBorderLeft </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc JKQTFastPlotter::plotBorderLeft </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc JKQTFastPlotter::plotBorderBottom </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc JKQTFastPlotter::plotBorderBottom </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc JKQTFastPlotter::plotBorderRight </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc JKQTFastPlotter::plotBorderRight </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc JKQTFastPlotter::plotBorderTop </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc JKQTFastPlotter::plotBorderTop </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc JKQTFastPlotter::plotWidth </BLOCKQUOTE>.
|
||||
\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: <BLOCKQUOTE>\copydoc JKQTFastPlotter::plotHeight </BLOCKQUOTE>.
|
||||
\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: <BLOCKQUOTE>\copydoc JKQTFastPlotter::doDrawing </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc JKQTFastPlotter::doDrawing </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc JKQTFastPlotter::xAxisLog </BLOCKQUOTE>.
|
||||
\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: <BLOCKQUOTE>\copydoc JKQTFastPlotter::yAxisLog </BLOCKQUOTE>.
|
||||
\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: <BLOCKQUOTE>\copydoc JKQTFastPlotter::backgroundColor </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc JKQTFastPlotter::backgroundColor </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc JKQTFastPlotter::plotBackgroundColor </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc JKQTFastPlotter::plotBackgroundColor </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc JKQTFastPlotter::gridColor </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc JKQTFastPlotter::gridColor </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc JKQTFastPlotter::gridStyle </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc JKQTFastPlotter::gridStyle </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc JKQTFastPlotter::gridWidth </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc JKQTFastPlotter::gridWidth </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc JKQTFastPlotter::xAxisLabel </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc JKQTFastPlotter::yAxisLabel </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc JKQTFastPlotter::aspectRatio </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc JKQTFastPlotter::aspectRatio </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc JKQTFastPlotter::maintainAspectRatio </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc JKQTFastPlotter::maintainAspectRatio </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc JKQTFastPlotter::xAxisLabelVisible </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc JKQTFastPlotter::yAxisLabelVisible </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc JKQTFPXRangePlot::showCenterline </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc JKQTFPXRangePlot::showCenterline </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc JKQTFPYRangePlot::showCenterline </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc JKQTFPYRangePlot::showCenterline </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc JKQTFPimageOverlayPlot::showAsSymbols </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc JKQTFPimageOverlayPlot::showAsSymbols </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc JKQTFPimageOverlayPlot::lineWidth </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc JKQTFPimageOverlayPlot::lineWidth </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc JKQTFPimageOverlayPlot::font </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc JKQTFPimageOverlayPlot::font </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc JKQTFPQOverlayLinearGridPlot::lineWidth </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc JKQTFPQOverlayLinearGridPlot::lineWidth </BLOCKQUOTE>
|
||||
\see lineWidth for more information */
|
||||
inline virtual double get_lineWidth() const
|
||||
inline virtual double getLineWidth() const
|
||||
{
|
||||
return this->lineWidth;
|
||||
}
|
||||
|
@ -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; i<text.size(); i++) {
|
||||
@ -403,7 +403,7 @@ QString JKQTMathText::MTtextNode::textTransform(const QString &text, JKQTMathTex
|
||||
txt=txt.replace(" ", " ");
|
||||
}
|
||||
}
|
||||
if (currentEv.font==MTEblackboard && parent->get_fontEncoding()==MTFEunicode) {
|
||||
if (currentEv.font==MTEblackboard && parent->getFontEncoding()==MTFEunicode) {
|
||||
txt="";
|
||||
for (int i=0; i<text.size(); i++) {
|
||||
QChar c=text[i];
|
||||
@ -424,7 +424,7 @@ QString JKQTMathText::MTtextNode::textTransform(const QString &text, JKQTMathTex
|
||||
|
||||
}
|
||||
}
|
||||
if (currentEv.font==MTEcaligraphic && parent->get_fontEncoding()==MTFEunicode) {
|
||||
if (currentEv.font==MTEcaligraphic && parent->getFontEncoding()==MTFEunicode) {
|
||||
txt="";
|
||||
for (int i=0; i<text.size(); i++) {
|
||||
QChar c=text[i];
|
||||
@ -1550,7 +1550,7 @@ void JKQTMathText::MTbraceNode::getBraceWidth(QPainter &/*painter*/, JKQTMathTex
|
||||
/*QFont evf=ev.getFont(parent);
|
||||
if (ev.insideMath) evf.setItalic(false);
|
||||
ev.italic=false;
|
||||
while (ev.fontSize<10*parent->get_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();
|
||||
|
@ -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: <BLOCKQUOTE>\copydoc fontColor </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc fontColor </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc fontSize </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc fontSize </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc fontRoman </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc fontRoman </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc fontSans </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc fontSans </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc fontTypewriter </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc fontTypewriter </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc fontScript </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc fontScript </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc fontGreek </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc fontGreek </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc fontSymbol </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc fontSymbol </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc fontBraces </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc fontBraces </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc fontIntegrals </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc fontIntegrals </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc fontCaligraphic </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc fontCaligraphic </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc fontBlackboard </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc fontBlackboard </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc fontMathRoman </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc fontMathRoman </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc fontMathSans </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc fontMathSans </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc fontLatexPrefix </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc fontLatexPrefix </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc fontLatexPostfix </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc fontLatexPostfix </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc fontEncoding </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc fontEncoding </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc useSTIXfonts </BLOCKQUOTE>.
|
||||
\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: <BLOCKQUOTE>\copydoc useXITSfonts </BLOCKQUOTE>.
|
||||
\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: <BLOCKQUOTE>\copydoc useUnparsed </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc useUnparsed </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc showRightBrace </BLOCKQUOTE>.
|
||||
\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: <BLOCKQUOTE>\copydoc lines </BLOCKQUOTE>.
|
||||
\see lines for more information */
|
||||
inline int get_lines() const {
|
||||
inline int getLines() const {
|
||||
return this->lines;
|
||||
}
|
||||
protected:
|
||||
|
@ -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<double> &x, const QStringList &label) {
|
||||
for (int i=0; i<qMin(x.size(), label.size()); i++) {
|
||||
tickLabels.append(qMakePair(x[i], label[i]));
|
||||
}
|
||||
update_plot();
|
||||
replotPlot();
|
||||
}
|
||||
|
||||
void JKQTPCoordinateAxis::addAxisTickLabels(const double *x, const QStringList &label) {
|
||||
for (int i=0; i<label.size(); i++) {
|
||||
tickLabels.append(qMakePair(x[i], label[i]));
|
||||
}
|
||||
update_plot();
|
||||
replotPlot();
|
||||
}
|
||||
|
||||
void JKQTPCoordinateAxis::addAxisTickLabels(const QVector<double> &x, const QString *label) {
|
||||
for (int i=0; i<x.size(); i++) {
|
||||
tickLabels.append(qMakePair(x[i], label[i]));
|
||||
}
|
||||
update_plot();
|
||||
replotPlot();
|
||||
}
|
||||
|
||||
void JKQTPCoordinateAxis::addAxisTickLabels(const double *x, const QString *label, int items) {
|
||||
for (int i=0; i<items; i++) {
|
||||
tickLabels.append(qMakePair(x[i], label[i]));
|
||||
}
|
||||
update_plot();
|
||||
replotPlot();
|
||||
}
|
||||
|
||||
void JKQTPCoordinateAxis::loadSettings(QSettings& settings, QString group) {
|
||||
@ -804,7 +804,7 @@ void JKQTPCoordinateAxis::setRange(double aamin, double aamax) {
|
||||
if (oldamin!=axismin || oldamax!=axismax) {
|
||||
paramsChanged=true;
|
||||
calcPlotScaling();
|
||||
update_plot();
|
||||
replotPlot();
|
||||
}
|
||||
}
|
||||
|
||||
@ -817,25 +817,25 @@ void JKQTPCoordinateAxis::setNoAbsoluteRange() {
|
||||
void JKQTPCoordinateAxis::set_tickSpacing(double __value) {
|
||||
this->tickSpacing = __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) && (0<axismax)) {
|
||||
QPen pmain1=pmain;
|
||||
pmain1.setWidthF(qMax(JKQTPLOTTER_ABS_MIN_LINEWIDTH, parent->pt2px(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; }
|
||||
|
@ -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: <BLOCKQUOTE>\copydoc logAxisBase </BLOCKQUOTE>. \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: <BLOCKQUOTE>\copydoc userTickSpacing </BLOCKQUOTE>. \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: <BLOCKQUOTE>\copydoc userLogTickSpacing </BLOCKQUOTE>. \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: <BLOCKQUOTE>\copydoc labelType </BLOCKQUOTE>. \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: <BLOCKQUOTE>\copydoc axisLabel </BLOCKQUOTE>. \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: <BLOCKQUOTE>\copydoc labelPosition </BLOCKQUOTE>. \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: <BLOCKQUOTE>\copydoc labelFont </BLOCKQUOTE>. \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: <BLOCKQUOTE>\copydoc minorTickOutsideLength </BLOCKQUOTE>. \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: <BLOCKQUOTE>\copydoc axisColor </BLOCKQUOTE>. \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: <BLOCKQUOTE>\copydoc showZeroAxis </BLOCKQUOTE>. \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: <BLOCKQUOTE>\copydoc gridColor </BLOCKQUOTE>. \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: <BLOCKQUOTE>\copydoc minorGridColor </BLOCKQUOTE>. \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: <BLOCKQUOTE>\copydoc gridWidth </BLOCKQUOTE>. \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: <BLOCKQUOTE>\copydoc gridStyle </BLOCKQUOTE>. \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: <BLOCKQUOTE>\copydoc minorGridWidth </BLOCKQUOTE>. \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: <BLOCKQUOTE>\copydoc minorGridStyle </BLOCKQUOTE>. \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: <BLOCKQUOTE>\copydoc tickWidth </BLOCKQUOTE>. \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: <BLOCKQUOTE>\copydoc lineWidth </BLOCKQUOTE>. \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: <BLOCKQUOTE>\copydoc lineWidthZeroAxis </BLOCKQUOTE>. \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: <BLOCKQUOTE>\copydoc tickLabelDistance </BLOCKQUOTE>. \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: <BLOCKQUOTE>\copydoc labelDistance </BLOCKQUOTE>. \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: <BLOCKQUOTE>\copydoc axisMinWidth </BLOCKQUOTE>
|
||||
* \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: <BLOCKQUOTE>\copydoc autoAxisSpacing </BLOCKQUOTE>
|
||||
@ -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: <BLOCKQUOTE>\copydoc userTickSpacing </BLOCKQUOTE>
|
||||
* \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: <BLOCKQUOTE>\copydoc userLogTickSpacing </BLOCKQUOTE>
|
||||
* \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: <BLOCKQUOTE>\copydoc labelType </BLOCKQUOTE>
|
||||
@ -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: <BLOCKQUOTE>\copydoc axisLabel </BLOCKQUOTE>
|
||||
* \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: <BLOCKQUOTE>\copydoc labelPosition </BLOCKQUOTE> */
|
||||
@ -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: <BLOCKQUOTE>\copydoc axisColor </BLOCKQUOTE> */
|
||||
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: <BLOCKQUOTE>\copydoc showZeroAxis </BLOCKQUOTE> */
|
||||
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: <BLOCKQUOTE>\copydoc inverted </BLOCKQUOTE> */
|
||||
@ -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: <BLOCKQUOTE>\copydoc gridColor </BLOCKQUOTE> */
|
||||
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: <BLOCKQUOTE>\copydoc minorGridColor </BLOCKQUOTE> */
|
||||
@ -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: <BLOCKQUOTE>\copydoc gridWidth </BLOCKQUOTE> */
|
||||
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: <BLOCKQUOTE>\copydoc gridStyle </BLOCKQUOTE> */
|
||||
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: <BLOCKQUOTE>\copydoc minorGridWidth </BLOCKQUOTE> */
|
||||
@ -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: <BLOCKQUOTE>\copydoc lineWidth </BLOCKQUOTE> */
|
||||
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: <BLOCKQUOTE>\copydoc lineWidthZeroAxis </BLOCKQUOTE> */
|
||||
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: <BLOCKQUOTE>\copydoc tickLabelDistance </BLOCKQUOTE> */
|
||||
@ -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 */
|
||||
|
@ -60,8 +60,8 @@
|
||||
|
||||
static QString globalUserSettigsFilename="";
|
||||
static QString globalUserSettigsPrefix="";
|
||||
static QList<JKQTBasePlotter::JKQTPPaintDeviceAdapter*> jkqtpPaintDeviceAdapters;
|
||||
static QList<JKQTBasePlotter::JKQTPSaveDataAdapter*> jkqtpSaveDataAdapters;
|
||||
static QList<JKQTPPaintDeviceAdapter*> jkqtpPaintDeviceAdapters;
|
||||
static QList<JKQTPSaveDataAdapter*> 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<double> fsm, lwm, pm;
|
||||
QList<QColor> 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() {
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -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
|
||||
|
@ -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
|
||||
|
@ -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: <BLOCKQUOTE>\copydoc lineStyle </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc lineStyle </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc lineWidth </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc lineWidth </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc fontName </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc fontName </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc fontSize </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc fontSize </BLOCKQUOTE>
|
||||
\see fontSize for more information */
|
||||
inline virtual double get_fontSize() const
|
||||
inline virtual double getFontSize() const
|
||||
{
|
||||
return this->fontSize;
|
||||
}
|
||||
|
@ -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; iii<imax; iii++) {
|
||||
@ -582,7 +582,7 @@ void JKQTPStepVerticalGraph::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);
|
||||
@ -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; iii<imax; iii++) {
|
||||
@ -776,10 +776,10 @@ void JKQTPHorizontalRange::draw(JKQTPEnhancedPainter& painter) {
|
||||
double c=transformY(rangeCenter);
|
||||
double cmi=transformY(rangeMin);
|
||||
double cma=transformY(rangeMax);
|
||||
double smi=transformY(parent->get_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="<<rangeMin<<" -> "<<cmi<<std::endl;
|
||||
@ -790,7 +790,7 @@ void JKQTPHorizontalRange::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);
|
||||
@ -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();
|
||||
|
@ -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: <BLOCKQUOTE>\copydoc lineWidth </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc lineWidth </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc linewidthColumn </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc linewidthColumn </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc linewidthColumn </BLOCKQUOTE>
|
||||
\see linewidthColumn for more information */
|
||||
inline virtual void set_linewidthColumn( size_t __value) { this->linewidthColumn = static_cast<int>(__value); }
|
||||
inline virtual void setLinewidthColumn( size_t __value) { this->linewidthColumn = static_cast<int>(__value); }
|
||||
/*! \brief sets the property colorColumnContainsRGB to the specified \a __value.
|
||||
\details Description of the parameter colorColumnContainsRGB is: <BLOCKQUOTE>\copydoc colorColumnContainsRGB </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc gridModeForSymbolSize </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc gridModeForSymbolSize </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc gridDeltaX </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc gridDeltaX </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc gridDeltaY </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc gridDeltaY </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc gridSymbolFractionSize </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc gridSymbolFractionSize </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc lineWidth </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc lineWidth </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc lineWidth </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc lineWidth </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc plotCenterLine </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc plotCenterLine </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc plotRange </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc plotRange </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc plotRangeLines </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc plotRangeLines </BLOCKQUOTE>
|
||||
\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;
|
||||
|
@ -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);
|
||||
|
@ -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: <BLOCKQUOTE>\copydoc lineWidth </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc lineWidth </BLOCKQUOTE>
|
||||
\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;
|
||||
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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: <BLOCKQUOTE>\copydoc lineWidth </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc lineWidth </BLOCKQUOTE>
|
||||
\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 */
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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: <BLOCKQUOTE>\copydoc lineWidth </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc lineWidth </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc lineWidth </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc lineWidth </BLOCKQUOTE>
|
||||
\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 */
|
||||
|
@ -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; x<log(xmax); x=x+logdelta0) {
|
||||
d->next = new doublePair;
|
||||
d->next->x=exp(x+(static_cast<double>(rand())/static_cast<double>(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<double>(rand())/static_cast<double>(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<QPointF> 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<double> &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<double>* d=static_cast<QVector<double>*>(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<double>* d=static_cast<QVector<double>*>(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<double>* d=static_cast<QVector<double>*>(param);
|
||||
if (d) {
|
||||
|
@ -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: <BLOCKQUOTE>\copydoc lineWidth </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc lineWidth </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc plotFunction </BLOCKQUOTE>
|
||||
* \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: <BLOCKQUOTE>\copydoc plotFunction </BLOCKQUOTE>
|
||||
* \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: <BLOCKQUOTE>\copydoc plotFunction </BLOCKQUOTE>
|
||||
* \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: <BLOCKQUOTE>\copydoc plotFunction </BLOCKQUOTE>
|
||||
* \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: <BLOCKQUOTE>\copydoc plotRefinement </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc plotRefinement </BLOCKQUOTE>
|
||||
\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 {
|
||||
|
@ -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);
|
||||
|
@ -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: <BLOCKQUOTE>\copydoc lineWidth </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc lineWidth </BLOCKQUOTE>
|
||||
\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 */
|
||||
|
@ -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();
|
||||
|
@ -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: <BLOCKQUOTE>\copydoc lineWidth </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc lineWidth </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc fontSize </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc fontSize </BLOCKQUOTE>
|
||||
\see fontSize for more information */
|
||||
inline virtual double get_fontSize() const
|
||||
inline virtual double getFontSize() const
|
||||
{
|
||||
return this->fontSize;
|
||||
}
|
||||
|
@ -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<QByteArray> 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<QByteArray> 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<QByteArray> 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: "<<imageName<<rightSpace<<colorBarModifiedWidth<<colorBarWidth;
|
||||
if (modifierMode!=ModifyNone) {
|
||||
@ -913,15 +913,15 @@ void JKQTPMathImage::getOutsideSize(JKQTPEnhancedPainter& painter, int& leftSpac
|
||||
if (colorBarTopVisible) {
|
||||
//topSpace+=parent->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()<<topSpace<<s<<imageName<<names;
|
||||
//qDebug()<<colorBarWidth<<colorBarOffset<<parent->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<QByteArray> 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<QByteArray> 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);
|
||||
|
@ -484,7 +484,7 @@ class LIB_EXPORT JKQTPMathImage: public JKQTPMathImageBase {
|
||||
/*! \brief returns the property rangeMinFailAction.
|
||||
\details Description of the parameter rangeMinFailAction is: <BLOCKQUOTE>\copydoc rangeMinFailAction </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc rangeMaxFailAction </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc showColorBar </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc showColorBar </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc showColorBar </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc showColorBar </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc lineColor </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc lineColor </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc lineWidth </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc lineWidth </BLOCKQUOTE>
|
||||
\see lineWidth for more information */
|
||||
inline virtual double get_lineWidth() const
|
||||
inline virtual double getLineWidth() const
|
||||
{
|
||||
return this->lineWidth;
|
||||
}
|
||||
|
@ -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<QLineF> 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<QLineF> 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;
|
||||
|
||||
}
|
||||
|
@ -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: <BLOCKQUOTE>\copydoc lineWidth </BLOCKQUOTE>
|
||||
\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: <BLOCKQUOTE>\copydoc lineWidth </BLOCKQUOTE>
|
||||
\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!!!)
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user