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

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

Inheritance diagram for GeneralChart:
Inheritance graph
Collaboration diagram for GeneralChart:
Collaboration graph

Public Member Functions

 GeneralChart (QWidget *parent=nullptr)
 ~GeneralChart ()
bool Plot (ResultItem *res)
bool PlotVector (CMBVector *profile, const QString &title)
bool PlotVectorSet (CMBVectorSet *profile, const QString &title)
bool PlotVectorSetSet (CMBVectorSetSet *profile, const QString &title)
bool PlotMatrix (CMBMatrix *matrix, const QString &title)
bool PlotProfileSet (Elemental_Profile_Set *elementalprofileset, const QString &title)
bool PlotContribution (Contribution *contributions, const QString &title)
bool PlotPredictedConcentration (Elemental_Profile *elemental_profile, const QString &title)
bool PlotRegressionSet (MultipleLinearRegressionSet *regressionset, const QString &title)
bool PlotTimeSeriesSet (CMBTimeSeriesSet *regressionset, const QString &title, const QString &x_axis_title="", const QString &y_axis_title="")
bool PlotTimeSeriesSet_M (CMBTimeSeriesSet *timeseriesset, const QString &title, const QString &x_axis_title="", const QString &y_axis_title="")
bool PlotTimeSeriesSet_A (CMBTimeSeriesSet *timeseriesset, const QString &title, const QString &x_axis_title="", const QString &y_axis_title="")
bool PlotTimeSeriesSet_Stacked (CMBTimeSeriesSet *timeseriesset, const QString &title, const QString &x_axis_title, const QString &y_axis_title="")
bool PlotRangeSet (RangeSet *rangeset, const QString &title, const QString &x_axis_title, const QString &y_axis_title)
bool InitializeMCMCSamples (CMBTimeSeriesSet *mcmcsamples, const QString &title)
bool InitializeDistributions (CMBTimeSeriesSet *distributions, const QString &title)
bool PlotMCMCSamples (TimeSeries< double > *mlr, const QString &variable)
bool PlotDistribution (TimeSeries< double > *mlr, const QString &variable)
bool PlotScatter (CMBMatrix *matrix)
bool PlotScatter (CMBVectorSet *vectorset)
bool PlotScatter (CMBVectorSet *vectorset1, CMBVectorSet *vectorset2, const QString &xaxis_title, const QString &yaxistitle)

Private Member Functions

bool PlotRegression (MultipleLinearRegression *timeseriesset, const QString &independent_var)
QColor SeriesColor (const QString &name)
QString ConstituentAxisTitle () const
QString ValueAxisTitle (const QString &fallback=QString()) const
void onIndependentChanged (int i_independent)
void onElementChanged (int i_constituent)
void onPairChanged (int pair_id)
void onDFAPairChanged (int pair_id)
void onMCMCVariableChanged (int)
void onDistributionsVariableChanged (int)
void on_Exporttopng ()
std::vector< QPointF > calculateRotatedEllipsePoints (double centerX, double centerY, double semiMajorAxis, double semiMinorAxis, double rotationAngle, double interval)

Private Attributes

Ui::GeneralChart * ui
Chart * chart
ChartView * chartView
QComboBox * element_combo {}
QComboBox * source1_combo {}
QComboBox * source2_combo {}
QComboBox * independent_combo {}
ResultItem * result_item =nullptr
QMap< QString, QColor > series_colors

Detailed Description

Definition at line 32 of file generalchart.h.

Constructor & Destructor Documentation

◆ GeneralChart()

GeneralChart::GeneralChart ( QWidget * parent = nullptr)
explicit

Definition at line 12 of file generalchart.cpp.

References GeneralChart(), chart, chartView, on_Exporttopng(), and ui.

Referenced by GeneralChart().

◆ ~GeneralChart()

GeneralChart::~GeneralChart ( )

Definition at line 24 of file generalchart.cpp.

References ui.

Member Function Documentation

◆ calculateRotatedEllipsePoints()

std::vector< QPointF > GeneralChart::calculateRotatedEllipsePoints ( double centerX,
double centerY,
double semiMajorAxis,
double semiMinorAxis,
double rotationAngle,
double interval )
private

Definition at line 1624 of file generalchart.cpp.

References x, and y.

Referenced by PlotScatter().

◆ ConstituentAxisTitle()

QString GeneralChart::ConstituentAxisTitle ( ) const
private

Definition at line 161 of file generalchart.cpp.

References result_item.

Referenced by PlotPredictedConcentration(), PlotProfileSet(), and PlotVector().

◆ InitializeDistributions()

bool GeneralChart::InitializeDistributions ( CMBTimeSeriesSet * distributions,
const QString & title )

Definition at line 647 of file generalchart.cpp.

References element_combo, onDistributionsVariableChanged(), and ui.

Referenced by Plot().

◆ InitializeMCMCSamples()

bool GeneralChart::InitializeMCMCSamples ( CMBTimeSeriesSet * mcmcsamples,
const QString & title )

Definition at line 627 of file generalchart.cpp.

References element_combo, onMCMCVariableChanged(), and ui.

Referenced by Plot().

◆ on_Exporttopng()

void GeneralChart::on_Exporttopng ( )
private

Definition at line 1606 of file generalchart.cpp.

References chart, and chartView.

Referenced by GeneralChart().

◆ onDFAPairChanged()

void GeneralChart::onDFAPairChanged ( int pair_id)
private

Definition at line 705 of file generalchart.cpp.

References chart, PlotScatter(), result_item, source1_combo, source2_combo, and vectorset.

Referenced by PlotVectorSetSet().

◆ onDistributionsVariableChanged()

void GeneralChart::onDistributionsVariableChanged ( int i)
private

Definition at line 734 of file generalchart.cpp.

References element_combo, PlotDistribution(), and result_item.

Referenced by InitializeDistributions().

◆ onElementChanged()

void GeneralChart::onElementChanged ( int i_constituent)
private

Definition at line 668 of file generalchart.cpp.

References element_combo, independent_combo, mlrset, PlotRegression(), and result_item.

Referenced by PlotRegressionSet().

◆ onIndependentChanged()

void GeneralChart::onIndependentChanged ( int i_independent)
private

Definition at line 741 of file generalchart.cpp.

References element_combo, independent_combo, mlrset, PlotRegression(), and result_item.

Referenced by PlotRegressionSet().

◆ onMCMCVariableChanged()

void GeneralChart::onMCMCVariableChanged ( int i)
private

Definition at line 727 of file generalchart.cpp.

References element_combo, PlotMCMCSamples(), and result_item.

Referenced by InitializeMCMCSamples().

◆ onPairChanged()

void GeneralChart::onPairChanged ( int pair_id)
private

Definition at line 684 of file generalchart.cpp.

References chart, element_combo, PlotVector(), result_item, and vectorset.

Referenced by PlotVectorSet().

◆ Plot()

◆ PlotContribution()

bool GeneralChart::PlotContribution ( Contribution * contributions,
const QString & title )

Definition at line 507 of file generalchart.cpp.

References chart, chartView, and SeriesColor().

Referenced by Plot().

◆ PlotDistribution()

bool GeneralChart::PlotDistribution ( TimeSeries< double > * mlr,
const QString & variable )

◆ PlotMatrix()

bool GeneralChart::PlotMatrix ( CMBMatrix * matrix,
const QString & title )

Definition at line 359 of file generalchart.cpp.

References chart, counter, log, matrix, result_item, roundDown(), SeriesColor(), and SetLogRange().

Referenced by Plot().

◆ PlotMCMCSamples()

bool GeneralChart::PlotMCMCSamples ( TimeSeries< double > * mlr,
const QString & variable )

Definition at line 1108 of file generalchart.cpp.

References chart, PadRange(), and samples.

Referenced by onMCMCVariableChanged().

◆ PlotPredictedConcentration()

bool GeneralChart::PlotPredictedConcentration ( Elemental_Profile * elemental_profile,
const QString & title )

◆ PlotProfileSet()

◆ PlotRangeSet()

bool GeneralChart::PlotRangeSet ( RangeSet * rangeset,
const QString & title,
const QString & x_axis_title,
const QString & y_axis_title )

Definition at line 1309 of file generalchart.cpp.

References chart, counter, high, log, low, rangeset, rangeset_with_observed, and result_item.

Referenced by Plot().

◆ PlotRegression()

bool GeneralChart::PlotRegression ( MultipleLinearRegression * timeseriesset,
const QString & independent_var )
private

Definition at line 751 of file generalchart.cpp.

References chart, linear, log, mlr, PadRange(), x, and y.

Referenced by onElementChanged(), and onIndependentChanged().

◆ PlotRegressionSet()

bool GeneralChart::PlotRegressionSet ( MultipleLinearRegressionSet * regressionset,
const QString & title )

Definition at line 602 of file generalchart.cpp.

References element_combo, independent_combo, onElementChanged(), onIndependentChanged(), and ui.

Referenced by Plot().

◆ PlotScatter() [1/3]

bool GeneralChart::PlotScatter ( CMBMatrix * matrix)

Definition at line 890 of file generalchart.cpp.

References chart, matrix, and SeriesColor().

Referenced by onDFAPairChanged(), and Plot().

◆ PlotScatter() [2/3]

bool GeneralChart::PlotScatter ( CMBVectorSet * vectorset)

Definition at line 942 of file generalchart.cpp.

References chart, counter, result_item, SeriesColor(), ValueAxisTitle(), and vectorset.

◆ PlotScatter() [3/3]

bool GeneralChart::PlotScatter ( CMBVectorSet * vectorset1,
CMBVectorSet * vectorset2,
const QString & xaxis_title,
const QString & yaxistitle )

◆ PlotTimeSeriesSet()

bool GeneralChart::PlotTimeSeriesSet ( CMBTimeSeriesSet * regressionset,
const QString & title,
const QString & x_axis_title = "",
const QString & y_axis_title = "" )

Definition at line 1267 of file generalchart.cpp.

References chart, and SeriesColor().

Referenced by Plot().

◆ PlotTimeSeriesSet_A()

bool GeneralChart::PlotTimeSeriesSet_A ( CMBTimeSeriesSet * timeseriesset,
const QString & title,
const QString & x_axis_title = "",
const QString & y_axis_title = "" )

Definition at line 1511 of file generalchart.cpp.

References chart, high, CMBTimeSeriesSet::Label(), low, result_item, and SeriesColor().

◆ PlotTimeSeriesSet_M()

bool GeneralChart::PlotTimeSeriesSet_M ( CMBTimeSeriesSet * timeseriesset,
const QString & title,
const QString & x_axis_title = "",
const QString & y_axis_title = "" )

Definition at line 1444 of file generalchart.cpp.

References chart, CMBTimeSeriesSet::Label(), and SeriesColor().

Referenced by Plot().

◆ PlotTimeSeriesSet_Stacked()

bool GeneralChart::PlotTimeSeriesSet_Stacked ( CMBTimeSeriesSet * timeseriesset,
const QString & title,
const QString & x_axis_title,
const QString & y_axis_title = "" )

Definition at line 1560 of file generalchart.cpp.

References chart, high, CMBTimeSeriesSet::Label(), low, result_item, and SeriesColor().

Referenced by Plot().

◆ PlotVector()

bool GeneralChart::PlotVector ( CMBVector * profile,
const QString & title )

◆ PlotVectorSet()

bool GeneralChart::PlotVectorSet ( CMBVectorSet * profile,
const QString & title )

Definition at line 240 of file generalchart.cpp.

References element_combo, onPairChanged(), and ui.

Referenced by Plot().

◆ PlotVectorSetSet()

bool GeneralChart::PlotVectorSetSet ( CMBVectorSetSet * profile,
const QString & title )

Definition at line 205 of file generalchart.cpp.

References onDFAPairChanged(), SeriesColor(), source1_combo, source2_combo, and ui.

Referenced by Plot().

◆ SeriesColor()

◆ ValueAxisTitle()

QString GeneralChart::ValueAxisTitle ( const QString & fallback = QString()) const
private

Definition at line 167 of file generalchart.cpp.

References result_item.

Referenced by PlotPredictedConcentration(), PlotProfileSet(), PlotScatter(), and PlotVector().

Member Data Documentation

◆ chart

◆ chartView

ChartView* GeneralChart::chartView
private

Definition at line 63 of file generalchart.h.

Referenced by GeneralChart(), on_Exporttopng(), Plot(), and PlotContribution().

◆ element_combo

◆ independent_combo

QComboBox* GeneralChart::independent_combo {}
private

Definition at line 67 of file generalchart.h.

Referenced by onElementChanged(), onIndependentChanged(), and PlotRegressionSet().

◆ result_item

◆ series_colors

QMap<QString, QColor> GeneralChart::series_colors
private

Definition at line 70 of file generalchart.h.

Referenced by SeriesColor().

◆ source1_combo

QComboBox* GeneralChart::source1_combo {}
private

Definition at line 65 of file generalchart.h.

Referenced by onDFAPairChanged(), and PlotVectorSetSet().

◆ source2_combo

QComboBox* GeneralChart::source2_combo {}
private

Definition at line 66 of file generalchart.h.

Referenced by onDFAPairChanged(), and PlotVectorSetSet().

◆ ui

Ui::GeneralChart* GeneralChart::ui
private

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