SedSat3 1.1.6
Sediment Source Apportionment Tool - Advanced statistical methods for environmental pollution research
Loading...
Searching...
No Matches
resultitem.h
Go to the documentation of this file.
1#ifndef RESULTITEM_H
2#define RESULTITEM_H
3#include <string>
4#include "parameter.h"
5
7enum class yaxis_mode {normal, log};
8enum class xaxis_mode {real, counter};
9#include "interface.h"
10
11//using namespace std;
12
13class ResultItem: public Interface
14{
15public:
16 ResultItem();
17 Interface *Result() const {return result;}
18 void SetResult(Interface *_result) {result = _result;}
19 ResultItem(const ResultItem &rhs);
21 void SetName(const string &_name) {name = _name;}
22 string Name() const {return name;}
23 void SetType(const result_type &_type) {type = _type;}
24 result_type Type() const {return type;}
29 void SetShowAsString(bool value) {showasstring = value; }
30 bool ShowAsString() const {return showasstring;}
31 void setXAxisTitle(const string &title) {
32
33 Interface::SetXAxisLabel(QString::fromStdString(title));
34 if (result)
35 {
36 result->SetXAxisLabel(QString::fromStdString(title));
37 }
38 }
39 void setYAxisTitle(const string &title) {
40
41 Interface::SetYAxisLabel(QString::fromStdString(title));
42 if (result)
43 {
44 result->SetYAxisLabel(QString::fromStdString(title));
45 }
46 }
47 void setTableTitle(const string &Title)
48 {
49 Table_Title = Title;
50 }
51 string TableTitle()
52 {
53 return Table_Title;
54 }
55 string XAxisTitle() {return Interface::XAxisLabel().toStdString();}
56 string YAxisTitle() {return Interface::YAxisLabel().toStdString();}
57 void SetAbsoluteValue(bool val) {showabsvalue = val;}
58 bool AbsValue() {return showabsvalue;}
59 double YLimit(_range highlow)
60 {
61 if (highlow == _range::high)
62 return YLimits[1];
63 else
64 return YLimits[0];
65 }
66 void SetYLimit(_range highlow,const double &value)
67 {
68 if (highlow == _range::high)
69 YLimits[1] = value;
70 else
71 YLimits[0] = value;
72 fixYlimit = true;
73 }
75 {
76 return fixYlimit;
77 }
78 void SetShowTable(bool state) {showTable = state;}
79 bool ShowTable() const {return showTable;}
80 void SetShowGraph(bool state) {showGraph = state;}
81 bool ShowGraph() const {return showGraph;}
82private:
83 string name;
85 Interface *result = nullptr;
88 bool showabsvalue = false;
89 bool showasstring = true;
90 vector<double> YLimits;
91 bool fixYlimit = false;
92 bool showTable = false;
93 bool showGraph = true;
95
96};
97
98#endif // RESULTITEM_H
99
Abstract base class providing common serialization and visualization interface.
Definition interface.h:65
QString XAxisLabel() const
Get the X-axis label.
Definition interface.h:287
bool SetXAxisLabel(const QString &label)
Set the X-axis label.
Definition interface.h:307
QString YAxisLabel() const
Get the Y-axis label.
Definition interface.h:298
bool SetYAxisLabel(const QString &label)
Set the Y-axis label.
Definition interface.h:317
string XAxisTitle()
Definition resultitem.h:55
bool ShowGraph() const
Definition resultitem.h:81
string Name() const
Definition resultitem.h:22
void SetAbsoluteValue(bool val)
Definition resultitem.h:57
vector< double > YLimits
Definition resultitem.h:90
bool fixYlimit
Definition resultitem.h:91
void SetShowGraph(bool state)
Definition resultitem.h:80
double YLimit(_range highlow)
Definition resultitem.h:59
bool ShowAsString() const
Definition resultitem.h:30
void setYAxisTitle(const string &title)
Definition resultitem.h:39
bool showGraph
Definition resultitem.h:93
void SetXAxisMode(xaxis_mode mode)
Definition resultitem.h:26
result_type Type() const
Definition resultitem.h:24
string Table_Title
Definition resultitem.h:94
bool ShowTable() const
Definition resultitem.h:79
ResultItem & operator=(const ResultItem &rhs)
Interface * result
Definition resultitem.h:85
xaxis_mode XAxisMode()
Definition resultitem.h:28
string TableTitle()
Definition resultitem.h:51
void SetYLimit(_range highlow, const double &value)
Definition resultitem.h:66
string YAxisTitle()
Definition resultitem.h:56
void setTableTitle(const string &Title)
Definition resultitem.h:47
void SetName(const string &_name)
Definition resultitem.h:21
Interface * Result() const
Definition resultitem.h:17
void SetResult(Interface *_result)
Definition resultitem.h:18
xaxis_mode x_axis_mode
Definition resultitem.h:87
bool AbsValue()
Definition resultitem.h:58
bool showasstring
Definition resultitem.h:89
void SetShowTable(bool state)
Definition resultitem.h:78
string name
Definition resultitem.h:83
bool FixedYLimit()
Definition resultitem.h:74
void setXAxisTitle(const string &title)
Definition resultitem.h:31
void SetYAxisMode(yaxis_mode mode)
Definition resultitem.h:25
yaxis_mode YAxisMode()
Definition resultitem.h:27
yaxis_mode y_axis_mode
Definition resultitem.h:86
result_type type
Definition resultitem.h:84
bool showabsvalue
Definition resultitem.h:88
void SetShowAsString(bool value)
Definition resultitem.h:29
void SetType(const result_type &_type)
Definition resultitem.h:23
bool showTable
Definition resultitem.h:92
_range
Enumeration for specifying parameter range bounds.
Definition parameter.h:13
@ high
Upper bound of the parameter range.
yaxis_mode
Definition resultitem.h:7
xaxis_mode
Definition resultitem.h:8
result_type
Definition resultitem.h:6
@ distribution_with_observed
@ predicted_concentration
@ rangeset_with_observed
@ elemental_profile_set
@ timeseries_set_first_symbol
@ timeseries_set_all_symbol