14 if (!extra_label_and_progressbar)
16 ui.progressBar_2->setVisible(
false);
17 ui.label->setVisible(
true);
21 ui.progressBar_2->setVisible(
true);
22 ui.label->setVisible(
true);
25 if (number_of_panels==0)
27 for (
int i=0; i<number_of_panels; i++)
32 ChartItems[i].chart->setTitle(
"Optimization progress");
35 ChartItems[i].chartView->setRenderHint(QPainter::Antialiasing);
43 QLinearGradient gradient(QPointF(0, 0), QPointF(0, 1));
44 gradient.setColorAt(0.0, 0x3cc63c);
45 gradient.setColorAt(1.0, 0x26f626);
67 return chart >= 0 && chart < static_cast<int>(
ChartItems.size());
112 ui.progressBar->setValue(prog * 100);
113 QCoreApplication::processEvents();
118 ui.progressBar_2->setValue(prog * 100);
119 QCoreApplication::processEvents();
124 ui.label->setText(label);
125 QCoreApplication::processEvents();
145 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.
bool HasChart(int chart) const
True if chart is one of this window's chart panels.
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.