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)
RangeSet & operator= (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.
Interface & operator= (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.
options & GetOptions ()
 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 10 of file rangeset.h.

Constructor & Destructor Documentation

◆ RangeSet() [1/2]

RangeSet::RangeSet ( )

Definition at line 7 of file rangeset.cpp.

References Interface::Interface().

Referenced by RangeSet(), and operator=().

◆ RangeSet() [2/2]

RangeSet::RangeSet ( const RangeSet & rhs)

Definition at line 12 of file rangeset.cpp.

References Interface::Interface(), and RangeSet().

Member Function Documentation

◆ maxval()

double RangeSet::maxval ( )

Definition at line 63 of file rangeset.cpp.

References high.

◆ minval()

double RangeSet::minval ( )

Definition at line 74 of file rangeset.cpp.

References low.

◆ operator=()

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

Definition at line 17 of file rangeset.cpp.

References RangeSet(), and 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 58 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 32 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 23 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 42 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 86 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 52 of file rangeset.cpp.

References ToString().


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