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

Time series data container with Interface support. More...

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

Inheritance diagram for CMBTimeSeries:
Inheritance graph
Collaboration diagram for CMBTimeSeries:
Collaboration graph

Public Member Functions

 CMBTimeSeries ()
 Default constructor - creates an empty time series.
 
 CMBTimeSeries (int n)
 Constructs a time series with given capacity.
 
 CMBTimeSeries (const CMBTimeSeries &mp)
 Copy constructor.
 
CMBTimeSeriesoperator= (const CMBTimeSeries &mp)
 Assignment operator.
 
QJsonObject toJsonObject () const override
 Serializes time series to JSON format.
 
bool ReadFromJsonObject (const QJsonObject &jsonobject) override
 Deserializes time series from JSON format.
 
string ToString () const override
 Converts time series to CSV-formatted string.
 
bool writetofile (QFile *) override
 Writes time series to file.
 
QTableWidget * ToTable () override
 Creates a QTableWidget for displaying time series data.
 
- Public Member Functions inherited from Interface
 Interface ()
 Default constructor.
 
 Interface (const Interface &intf)
 Copy constructor.
 
Interfaceoperator= (const Interface &intf)
 Assignment operator.
 
virtual bool Read (const QStringList &strlist)
 Parse object data from a string list.
 
string GetNotes () const
 Get the notes/annotations associated with this object.
 
void SetNotes (const string &note)
 Set the notes for this object, replacing any existing notes.
 
void AppendtoNotes (const string &note)
 Append a note to existing notes.
 
void ClearNotes ()
 Clear all notes associated with this object.
 
void SetLimit (_range lowhigh, const double &value)
 Set upper or lower limit for value highlighting.
 
void SetOption (options_key opt, bool val)
 Set a configuration option.
 
bool Option (options_key opt)
 Get the current value of a configuration option.
 
optionsGetOptions ()
 Get reference to the options structure.
 
QString XAxisLabel () const
 Get the X-axis label.
 
QString YAxisLabel () const
 Get the Y-axis label.
 
bool SetXAxisLabel (const QString &label)
 Set the X-axis label.
 
bool SetYAxisLabel (const QString &label)
 Set the Y-axis label.
 

Additional Inherited Members

- Public Attributes inherited from Interface
double lowlimit
 Lower threshold for value highlighting (when enabled)
 
double highlimit
 Upper threshold for value highlighting (when enabled)
 
bool highlightoutsideoflimit = false
 Flag indicating whether to highlight values outside defined limits.
 

Detailed Description

Time series data container with Interface support.

Extends TimeSeries<double> with JSON serialization, file I/O, and table widget generation. Used for storing time-indexed data such as concentration profiles or temporal distributions.

Definition at line 14 of file cmbtimeseries.h.

Constructor & Destructor Documentation

◆ CMBTimeSeries() [1/3]

CMBTimeSeries::CMBTimeSeries ( )

Default constructor - creates an empty time series.

Definition at line 6 of file cmbtimeseries.cpp.

◆ CMBTimeSeries() [2/3]

CMBTimeSeries::CMBTimeSeries ( int  n)

Constructs a time series with given capacity.

Parameters
nInitial capacity

Definition at line 16 of file cmbtimeseries.cpp.

◆ CMBTimeSeries() [3/3]

CMBTimeSeries::CMBTimeSeries ( const CMBTimeSeries mp)

Copy constructor.

Parameters
mpTime series to copy from

Definition at line 11 of file cmbtimeseries.cpp.

Member Function Documentation

◆ operator=()

CMBTimeSeries & CMBTimeSeries::operator= ( const CMBTimeSeries mp)

Assignment operator.

Parameters
mpTime series to assign from
Returns
Reference to this time series

Definition at line 21 of file cmbtimeseries.cpp.

References operator=().

Referenced by operator=().

◆ ReadFromJsonObject()

bool CMBTimeSeries::ReadFromJsonObject ( const QJsonObject &  jsonobject)
overridevirtual

Deserializes time series from JSON format.

Parameters
jsonobjectJSON object to read from
Returns
true if successful, false otherwise

Reimplemented from Interface.

Definition at line 42 of file cmbtimeseries.cpp.

◆ toJsonObject()

QJsonObject CMBTimeSeries::toJsonObject ( ) const
overridevirtual

Serializes time series to JSON format.

Returns
JSON object containing time and value arrays

Reimplemented from Interface.

Definition at line 26 of file cmbtimeseries.cpp.

◆ ToString()

string CMBTimeSeries::ToString ( ) const
overridevirtual

Converts time series to CSV-formatted string.

Returns
String representation with time,value pairs

Reimplemented from Interface.

Definition at line 48 of file cmbtimeseries.cpp.

Referenced by writetofile().

◆ ToTable()

QTableWidget * CMBTimeSeries::ToTable ( )
overridevirtual

Creates a QTableWidget for displaying time series data.

Generates a single-column table with time values as row labels and values in the column. Highlights values outside limit range if highlighting is enabled.

Returns
Pointer to newly created QTableWidget (caller takes ownership)

Reimplemented from Interface.

Definition at line 65 of file cmbtimeseries.cpp.

References Interface::highlightoutsideoflimit, Interface::highlimit, and Interface::lowlimit.

◆ writetofile()

bool CMBTimeSeries::writetofile ( QFile *  file)
overridevirtual

Writes time series to file.

Parameters
fileFile pointer to write to
Returns
true if successful

Reimplemented from Interface.

Definition at line 59 of file cmbtimeseries.cpp.

References ToString().


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