@@ -274,7 +274,7 @@ void PlotWindow::plot()
274
274
currentLine = mpTextStream->readLine ();
275
275
}
276
276
pPlotCurve->setTitle (currentVariable);
277
- pPlotCurve->setRawData (pPlotCurve->getXAxisVector (), pPlotCurve->getYAxisVector (),
277
+ pPlotCurve->setData (pPlotCurve->getXAxisVector (), pPlotCurve->getYAxisVector (),
278
278
pPlotCurve->getSize ());
279
279
pPlotCurve->attach (mpPlot);
280
280
mpPlot->replot ();
@@ -337,7 +337,7 @@ void PlotWindow::plot()
337
337
// plot the curves
338
338
for (int i = 0 ; i < variablesToPlotIndex.size (); i++)
339
339
{
340
- pPlotCurve[i]->setRawData (pPlotCurve[i]->getXAxisVector (), pPlotCurve[i]->getYAxisVector (),
340
+ pPlotCurve[i]->setData (pPlotCurve[i]->getXAxisVector (), pPlotCurve[i]->getYAxisVector (),
341
341
pPlotCurve[i]->getSize ());
342
342
pPlotCurve[i]->attach (mpPlot);
343
343
mpPlot->replot ();
@@ -386,7 +386,7 @@ void PlotWindow::plot()
386
386
{
387
387
double *vals = omc_matlab4_read_vals (&reader, var->index );
388
388
// set plot curve data and attach it to plot
389
- pPlotCurve->setRawData (timeVals, vals, reader.nrows );
389
+ pPlotCurve->setData (timeVals, vals, reader.nrows );
390
390
pPlotCurve->attach (mpPlot);
391
391
mpPlot->replot ();
392
392
}
@@ -401,7 +401,7 @@ void PlotWindow::plot()
401
401
pPlotCurve->addYAxisValue (val);
402
402
pPlotCurve->addXAxisValue (stopTime);
403
403
pPlotCurve->addYAxisValue (val);
404
- pPlotCurve->setRawData (pPlotCurve->getXAxisVector (), pPlotCurve->getYAxisVector (),
404
+ pPlotCurve->setData (pPlotCurve->getXAxisVector (), pPlotCurve->getYAxisVector (),
405
405
pPlotCurve->getSize ());
406
406
pPlotCurve->attach (mpPlot);
407
407
mpPlot->replot ();
@@ -480,7 +480,7 @@ void PlotWindow::plotParametric()
480
480
if (variablesPlotted.size () == 2 )
481
481
{
482
482
pPlotCurve->setTitle (yVariable + " (" + xVariable + " )" );
483
- pPlotCurve->setRawData (pPlotCurve->getXAxisVector (), pPlotCurve->getYAxisVector (),
483
+ pPlotCurve->setData (pPlotCurve->getXAxisVector (), pPlotCurve->getYAxisVector (),
484
484
pPlotCurve->getSize ());
485
485
pPlotCurve->attach (mpPlot);
486
486
mpPlot->replot ();
@@ -539,7 +539,7 @@ void PlotWindow::plotParametric()
539
539
pPlotCurve->addYAxisValue (QString (values[yVariableIndex]).toDouble ());
540
540
}
541
541
542
- pPlotCurve->setRawData (pPlotCurve->getXAxisVector (), pPlotCurve->getYAxisVector (),
542
+ pPlotCurve->setData (pPlotCurve->getXAxisVector (), pPlotCurve->getYAxisVector (),
543
543
pPlotCurve->getSize ());
544
544
pPlotCurve->attach (mpPlot);
545
545
mpPlot->replot ();
@@ -573,7 +573,7 @@ void PlotWindow::plotParametric()
573
573
if (!var)
574
574
throw NoVariableException (QString (" Variable doesn't exist : " ).append (yVariable).toStdString ().c_str ());
575
575
double *yVals = omc_matlab4_read_vals (&reader,var->index );
576
- pPlotCurve->setRawData (xVals, yVals, reader.nrows );
576
+ pPlotCurve->setData (xVals, yVals, reader.nrows );
577
577
pPlotCurve->setTitle (yVariable + " (" + xVariable + " )" );
578
578
pPlotCurve->attach (mpPlot);
579
579
mpPlot->replot ();
@@ -686,7 +686,10 @@ void PlotWindow::exportDocument()
686
686
generator.setDescription (tr (" Generated by OpenModelica Plot Tool" ));
687
687
generator.setFileName (fileName);
688
688
generator.setSize (getPlot ()->rect ().size ());
689
+ #if QWT_VERSION < 0x060000
689
690
getPlot ()->print (generator);
691
+ #endif
692
+
690
693
}
691
694
// export png, bmp, jpg
692
695
else
@@ -702,6 +705,7 @@ void PlotWindow::exportDocument()
702
705
703
706
void PlotWindow::printPlot ()
704
707
{
708
+ #if QWT_VERSION < 0x060000
705
709
#if 1
706
710
QPrinter printer;
707
711
#else
@@ -726,6 +730,7 @@ void PlotWindow::printPlot()
726
730
}
727
731
mpPlot->print (printer, filter);
728
732
}
733
+ #endif
729
734
}
730
735
731
736
void PlotWindow::setGrid (bool on)
0 commit comments