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

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

Inheritance diagram for RangeSet:
Inheritance graph
Collaboration diagram for RangeSet:
Collaboration graph

Public Member Functions

 RangeSet ()
 
 RangeSet (const RangeSet &rhs)
 
RangeSetoperator= (const RangeSet &rhs)
 
QJsonObject toJsonObject () const override
 Serialize object to JSON format.
 
bool ReadFromJsonObject (const QJsonObject &jsonobject) override
 Deserialize object from JSON format.
 
string ToString () const override
 Convert object to string representation.
 
bool writetofile (QFile *) override
 Write object data to a file.
 
bool Read (const QStringList &strlist) override
 Parse object data from a string list.
 
QTableWidget * ToTable () override
 Create a Qt table widget representation of the data.
 
double maxval ()
 
double minval ()
 
- Public Member Functions inherited from Interface
 Interface ()
 Default constructor.
 
 Interface (const Interface &intf)
 Copy constructor.
 
Interfaceoperator= (const Interface &intf)
 Assignment operator.
 
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

Definition at line 7 of file rangeset.h.

Constructor & Destructor Documentation

◆ RangeSet() [1/2]

RangeSet::RangeSet ( )

Definition at line 4 of file rangeset.cpp.

◆ RangeSet() [2/2]

RangeSet::RangeSet ( const RangeSet rhs)

Definition at line 9 of file rangeset.cpp.

Member Function Documentation

◆ maxval()

double RangeSet::maxval ( )

Definition at line 59 of file rangeset.cpp.

References high.

◆ minval()

double RangeSet::minval ( )

Definition at line 70 of file rangeset.cpp.

References low.

◆ operator=()

RangeSet & RangeSet::operator= ( const RangeSet rhs)

Definition at line 13 of file rangeset.cpp.

References Interface::operator=().

◆ Read()

bool RangeSet::Read ( const QStringList &  strlist)
overridevirtual

Parse object data from a string list.

Parameters
strlistList of strings containing the data to parse
Returns
true if parsing was successful, false otherwise

Pure virtual method for text-based deserialization. Each string in the list typically represents one line of input data.

Note
Format and parsing rules are determined by the derived class

Reimplemented from Interface.

Definition at line 54 of file rangeset.cpp.

◆ ReadFromJsonObject()

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

Deserialize object from JSON format.

Parameters
jsonobjectThe JSON object to read from
Returns
true if deserialization was successful, false otherwise

Pure virtual method for JSON deserialization. Derived classes must implement this to reconstruct their data structure from a JSON object.

Warning
Implementations should validate JSON structure and handle missing fields gracefully

Reimplemented from Interface.

Definition at line 28 of file rangeset.cpp.

References Range::ReadFromJsonObject().

◆ toJsonObject()

QJsonObject RangeSet::toJsonObject ( ) const
overridevirtual

Serialize object to JSON format.

Returns
QJsonObject containing the serialized data

Pure virtual method for JSON serialization. Derived classes must implement this to convert their data structure to a JSON object suitable for saving to .json files or transmitting over network.

Note
The JSON structure is determined by the derived class

Reimplemented from Interface.

Definition at line 19 of file rangeset.cpp.

◆ ToString()

string RangeSet::ToString ( ) const
overridevirtual

Convert object to string representation.

Returns
String representation of the object's data

Pure virtual method that must be implemented by derived classes to provide a human-readable string representation of their data. Typically used for text file export or debugging.

Note
Format is determined by the derived class implementation

Reimplemented from Interface.

Definition at line 38 of file rangeset.cpp.

Referenced by writetofile().

◆ ToTable()

QTableWidget * RangeSet::ToTable ( )
overridevirtual

Create a Qt table widget representation of the data.

Returns
Pointer to a newly allocated QTableWidget displaying the data

Pure virtual method that creates a visual table representation of the object's data suitable for display in the Qt GUI. The returned widget is dynamically allocated and should be managed by Qt's parent-child ownership system.

Note
Caller does not need to delete the returned widget if added to a parent
Highlighting based on limit settings is applied if enabled

Reimplemented from Interface.

Definition at line 82 of file rangeset.cpp.

References high, and low.

◆ writetofile()

bool RangeSet::writetofile ( QFile *  file)
overridevirtual

Write object data to a file.

Parameters
filePointer to an open QFile object for writing
Returns
true if write was successful, false otherwise

Pure virtual method for file output. Derived classes implement this to write their data to an open file stream in their preferred text format.

Precondition
file must be opened in write mode
Note
File is not closed by this method

Reimplemented from Interface.

Definition at line 48 of file rangeset.cpp.

References ToString().


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