SWMMVis  6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
OpenSWMMVisLogMessage Class Reference

Immutable application log record carrying a severity level, message text, and a wall-clock timestamp. More...

#include <openswmmvislogmessage.h>

Inheritance diagram for OpenSWMMVisLogMessage:
Collaboration diagram for OpenSWMMVisLogMessage:

Public Types

enum  LogMessageType {
  Information ,
  Warning ,
  Error
}
 Severity classification for a log record. More...
 

Public Member Functions

 OpenSWMMVisLogMessage (LogMessageType type, QString message, QObject *parent=nullptr)
 Constructs a log message and captures the current wall-clock time.
 
 ~OpenSWMMVisLogMessage ()
 Destructor.
 
LogMessageType type () const
 Returns the severity level of this message.
 
QString message () const
 Returns the human-readable message text.
 
QDateTime timestamp () const
 Returns the wall-clock timestamp when this message was created.
 

Properties

LogMessageType Type
 
QString Message
 
QDateTime Timestamp
 

Detailed Description

Immutable application log record carrying a severity level, message text, and a wall-clock timestamp.

Instances are created at emission time; the timestamp is set to QDateTime::currentDateTime() in the constructor and is never changed afterwards. The class derives from QObject so it can be used as a Q_PROPERTY value and stored in a QVariant.

Member Enumeration Documentation

◆ LogMessageType

Severity classification for a log record.

Enumerator
Information 

Routine status update — no user action required.

Warning 

Non-fatal condition that may affect results.

Error 

Operation failed; user should review before proceeding.

Constructor & Destructor Documentation

◆ OpenSWMMVisLogMessage()

OpenSWMMVisLogMessage::OpenSWMMVisLogMessage ( LogMessageType  type,
QString  message,
QObject *  parent = nullptr 
)

Constructs a log message and captures the current wall-clock time.

Parameters
typeSeverity of the message.
messageHuman-readable description of the event.
parentOptional QObject parent.

◆ ~OpenSWMMVisLogMessage()

OpenSWMMVisLogMessage::~OpenSWMMVisLogMessage ( )

Destructor.

Member Function Documentation

◆ message()

QString OpenSWMMVisLogMessage::message ( ) const

Returns the human-readable message text.

◆ timestamp()

QDateTime OpenSWMMVisLogMessage::timestamp ( ) const

Returns the wall-clock timestamp when this message was created.

◆ type()

OpenSWMMVisLogMessage::LogMessageType OpenSWMMVisLogMessage::type ( ) const

Returns the severity level of this message.

Property Documentation

◆ Message

QString OpenSWMMVisLogMessage::Message
read

◆ Timestamp

QDateTime OpenSWMMVisLogMessage::Timestamp
read

◆ Type

LogMessageType OpenSWMMVisLogMessage::Type
read

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