SedSat3 1.1.6
Sediment Source Apportionment Tool - Advanced statistical methods for environmental pollution research
Loading...
Searching...
No Matches
ProgressWindow Class Reference

Graphical ProgressReporter that draws progress as charts in a dialog. More...

#include </home/runner/work/SedSat3/SedSat3/ProgressWindow.h>

Inheritance diagram for ProgressWindow:
Inheritance graph
Collaboration diagram for ProgressWindow:
Collaboration graph

Public Member Functions

 ProgressWindow (QWidget *parent=Q_NULLPTR, int number_of_panels=1, bool extra_label_and_progressbar=false)
 
 ~ProgressWindow ()
 
void AppendPoint (const double &x, const double &y, int chart=0) override
 Adds a point to one of the progress charts.
 
void SetProgress (const double &prog) override
 Sets the primary progress fraction.
 
void SetProgress2 (const double &prog) override
 Sets the secondary progress fraction, where one is displayed.
 
void SetLabel (const QString &label) override
 Sets the free-text status label.
 
void SetYRange (const double &y0, const double &y1, int chart=0) override
 Sets the vertical range of a chart.
 
void SetXRange (const double &x0, const double &x1, int chart=0) override
 Sets the horizontal range of a chart.
 
void SetTitle (const QString &title, int chart=0) override
 Sets the title of a chart.
 
void SetXAxisTitle (const QString &title, int chart=0) override
 Sets the horizontal axis title of a chart.
 
void SetYAxisTitle (const QString &title, int chart=0) override
 Sets the vertical axis title of a chart.
 
void ClearGraph (int chart=0) override
 Discards the points accumulated in a chart.
 
void SetChartTitle (int i, const QString &title) override
 Sets the title of chart i.
 
void Start () override
 Shows the dialog. Named Start() because QWidget::show() is not virtual.
 
void Finish () override
 Closes the dialog. Named Finish() because QWidget::close() is not virtual.
 
- Public Member Functions inherited from ProgressReporter
virtual ~ProgressReporter ()=default
 

Private Attributes

Ui::ProgressWindow ui
 
QVector< ChartCollection > ChartItems
 
QVector< QString > charttitles
 

Detailed Description

Graphical ProgressReporter that draws progress as charts in a dialog.

QDialog is listed first because Qt requires the QObject-derived base to come first in the base list of a class using Q_OBJECT.

Definition at line 36 of file ProgressWindow.h.

Constructor & Destructor Documentation

◆ ProgressWindow()

ProgressWindow::ProgressWindow ( QWidget *  parent = Q_NULLPTR,
int  number_of_panels = 1,
bool  extra_label_and_progressbar = false 
)

Definition at line 5 of file ProgressWindow.cpp.

References ChartItems, charttitles, and ui.

◆ ~ProgressWindow()

ProgressWindow::~ProgressWindow ( )

Definition at line 65 of file ProgressWindow.cpp.

Member Function Documentation

◆ AppendPoint()

void ProgressWindow::AppendPoint ( const double &  x,
const double &  y,
int  chart = 0 
)
overridevirtual

Adds a point to one of the progress charts.

Parameters
xHorizontal coordinate, typically an iteration or generation number
yVertical coordinate, typically a fitness or likelihood value
chartIndex of the chart to append to

Implements ProgressReporter.

Definition at line 69 of file ProgressWindow.cpp.

References ChartItems, x, and y.

◆ ClearGraph()

void ProgressWindow::ClearGraph ( int  chart = 0)
overridevirtual

Discards the points accumulated in a chart.

Implements ProgressReporter.

Definition at line 89 of file ProgressWindow.cpp.

References ChartItems.

◆ Finish()

void ProgressWindow::Finish ( )
inlineoverridevirtual

Closes the dialog. Named Finish() because QWidget::close() is not virtual.

Reimplemented from ProgressReporter.

Definition at line 65 of file ProgressWindow.h.

◆ SetChartTitle()

void ProgressWindow::SetChartTitle ( int  i,
const QString &  title 
)
inlineoverridevirtual

Sets the title of chart i.

Implements ProgressReporter.

Definition at line 53 of file ProgressWindow.h.

References ChartItems, and charttitles.

◆ SetLabel()

void ProgressWindow::SetLabel ( const QString &  label)
overridevirtual

Sets the free-text status label.

Implements ProgressReporter.

Definition at line 106 of file ProgressWindow.cpp.

References ui.

◆ SetProgress()

void ProgressWindow::SetProgress ( const double &  prog)
overridevirtual

Sets the primary progress fraction.

Parameters
progProgress in the range [0,1]

Implements ProgressReporter.

Definition at line 94 of file ProgressWindow.cpp.

References ui.

◆ SetProgress2()

void ProgressWindow::SetProgress2 ( const double &  prog)
overridevirtual

Sets the secondary progress fraction, where one is displayed.

Parameters
progProgress in the range [0,1]

Implements ProgressReporter.

Definition at line 100 of file ProgressWindow.cpp.

References ui.

◆ SetTitle()

void ProgressWindow::SetTitle ( const QString &  title,
int  chart = 0 
)
overridevirtual

Sets the title of a chart.

Implements ProgressReporter.

Definition at line 60 of file ProgressWindow.cpp.

References ChartItems.

◆ SetXAxisTitle()

void ProgressWindow::SetXAxisTitle ( const QString &  title,
int  chart = 0 
)
overridevirtual

Sets the horizontal axis title of a chart.

Implements ProgressReporter.

Definition at line 129 of file ProgressWindow.cpp.

References ChartItems.

◆ SetXRange()

void ProgressWindow::SetXRange ( const double &  x0,
const double &  x1,
int  chart = 0 
)
overridevirtual

Sets the horizontal range of a chart.

Implements ProgressReporter.

Definition at line 121 of file ProgressWindow.cpp.

References ChartItems.

◆ SetYAxisTitle()

void ProgressWindow::SetYAxisTitle ( const QString &  title,
int  chart = 0 
)
overridevirtual

Sets the vertical axis title of a chart.

Implements ProgressReporter.

Definition at line 133 of file ProgressWindow.cpp.

References ChartItems.

◆ SetYRange()

void ProgressWindow::SetYRange ( const double &  y0,
const double &  y1,
int  chart = 0 
)
overridevirtual

Sets the vertical range of a chart.

Implements ProgressReporter.

Definition at line 113 of file ProgressWindow.cpp.

References ChartItems.

◆ Start()

void ProgressWindow::Start ( )
inlineoverridevirtual

Shows the dialog. Named Start() because QWidget::show() is not virtual.

Reimplemented from ProgressReporter.

Definition at line 62 of file ProgressWindow.h.

Member Data Documentation

◆ ChartItems

QVector<ChartCollection> ProgressWindow::ChartItems
private

◆ charttitles

QVector<QString> ProgressWindow::charttitles
private

Definition at line 69 of file ProgressWindow.h.

Referenced by ProgressWindow(), and SetChartTitle().

◆ ui

Ui::ProgressWindow ProgressWindow::ui
private

Definition at line 67 of file ProgressWindow.h.

Referenced by ProgressWindow(), SetLabel(), SetProgress(), and SetProgress2().


The documentation for this class was generated from the following files: