11 if (!extra_label_and_progressbar)
13 ui.progressBar_2->setVisible(
false);
14 ui.label->setVisible(
true);
18 ui.progressBar_2->setVisible(
true);
19 ui.label->setVisible(
true);
22 if (number_of_panels==0)
24 for (
int i=0; i<number_of_panels; i++)
29 ChartItems[i].chart->setTitle(
"Optimization progress");
32 ChartItems[i].chartView->setRenderHint(QPainter::Antialiasing);
40 QLinearGradient gradient(QPointF(0, 0), QPointF(0, 1));
41 gradient.setColorAt(0.0, 0x3cc63c);
42 gradient.setColorAt(1.0, 0x26f626);
96 ui.progressBar->setValue(prog * 100);
97 QCoreApplication::processEvents();
102 ui.progressBar_2->setValue(prog * 100);
103 QCoreApplication::processEvents();
108 ui.label->setText(label);
109 QCoreApplication::processEvents();
125 ChartItems[chart].xaxis->setTitleText(
"Generation");
void SetProgress2(const double &prog) override
Sets the secondary progress fraction, where one is displayed.
void SetTitle(const QString &title, int chart=0) override
Sets the title of a chart.
void SetYRange(const double &y0, const double &y1, int chart=0) override
Sets the vertical range of a chart.
void SetXAxisTitle(const QString &title, int chart=0) override
Sets the horizontal axis title of a chart.
ProgressWindow(QWidget *parent=Q_NULLPTR, int number_of_panels=1, bool extra_label_and_progressbar=false)
void SetXRange(const double &x0, const double &x1, int chart=0) override
Sets the horizontal range of a chart.
void ClearGraph(int chart=0) override
Discards the points accumulated in a chart.
QVector< ChartCollection > ChartItems
void SetYAxisTitle(const QString &title, int chart=0) override
Sets the vertical axis title of a chart.
void SetProgress(const double &prog) override
Sets the primary progress fraction.
void SetLabel(const QString &label) override
Sets the free-text status label.
QVector< QString > charttitles
void AppendPoint(const double &x, const double &y, int chart=0) override
Adds a point to one of the progress charts.