Hello i am new to QT and QWT and i am doing an application that must plot and do some calculus in phasors data coming from ADs.
At first i am using a QTimer to simulate the IRQ from the device driver, the QTimer calls a funcion from 200ms to 200ms.
Inside the function i am doing this
curve1->setSamples(buff_x,buff_sin_results[tosqueira],1000);
curve1->attach(this->ui->qwtPlot);
curve2->setSamples(buff_x_2,buff_sin_results_2[tosqueira],1000);
curve2->attach(this->ui->qwtPlot);
curve3->setSamples(buff_x_3,buff_sin_results_3[tosqueira],1000);
curve3->attach(this->ui->qwtPlot);
curve4->setSamples(buff_x_4,buff_sin_results_4[tosqueira],1000);
curve4->attach(this->ui->qwtPlot);
ui->qwtPlot->replot();
curve1->setSamples(buff_x,buff_sin_results[tosqueira],1000);
curve1->attach(this->ui->qwtPlot);
curve2->setSamples(buff_x_2,buff_sin_results_2[tosqueira],1000);
curve2->attach(this->ui->qwtPlot);
curve3->setSamples(buff_x_3,buff_sin_results_3[tosqueira],1000);
curve3->attach(this->ui->qwtPlot);
curve4->setSamples(buff_x_4,buff_sin_results_4[tosqueira],1000);
curve4->attach(this->ui->qwtPlot);
ui->qwtPlot->replot();
To copy to clipboard, switch view to plain text mode
These are 4 buffers that i pre-calculated in some other function and i am just plotting them.
It works but is it the best way to do it performance wise?
Thank you very much
Bookmarks