LibrePCB Developers Documentation
RuleCheckMessage Class Reference

The RuleCheckMessage class. More...

#include <rulecheckmessage.h>

+ Inheritance diagram for RuleCheckMessage:
+ Collaboration diagram for RuleCheckMessage:

Public Types

enum  Severity
 Message severity type (higher number = higher severity) More...
 

Public Member Functions

 RuleCheckMessage ()=delete
 
Severity getSeverity () const noexcept
 
QString getSeverityTr () const noexcept
 
const QIcon & getSeverityIcon () const noexcept
 
const QString & getMessage () const noexcept
 
const QString & getDescription () const noexcept
 
const SExpressiongetApproval () const noexcept
 
const QVector< Path > & getLocations () const noexcept
 
template<typename T >
T * as () noexcept
 
template<typename T >
const T * as () const noexcept
 
bool operator== (const RuleCheckMessage &rhs) const noexcept
 
bool operator!= (const RuleCheckMessage &rhs) const noexcept
 

Static Public Member Functions

static QString getSeverityTr (Severity severity) noexcept
 
static const QIcon & getSeverityIcon (Severity severity) noexcept
 
static QSet< SExpressiongetAllApprovals (const QVector< std::shared_ptr< const RuleCheckMessage >> &messages) noexcept
 

Protected Member Functions

 RuleCheckMessage (const RuleCheckMessage &other) noexcept
 
 RuleCheckMessage (Severity severity, const QString &msg, const QString &description, const QString &approvalName, const QVector< Path > &locations={}) noexcept
 
virtual ~RuleCheckMessage () noexcept
 

Protected Attributes

Severity mSeverity
 
QString mMessage
 
QString mDescription
 
std::unique_ptr< SExpressionmApproval
 
QVector< PathmLocations
 

Detailed Description

The RuleCheckMessage class.

Member Enumeration Documentation

◆ Severity

enum Severity
strong

Message severity type (higher number = higher severity)

Enumerator
Hint 
Warning 
Error 

Constructor & Destructor Documentation

◆ RuleCheckMessage() [1/3]

RuleCheckMessage ( )
delete
+ Here is the caller graph for this function:

◆ RuleCheckMessage() [2/3]

RuleCheckMessage ( const RuleCheckMessage other)
protectednoexcept

◆ RuleCheckMessage() [3/3]

RuleCheckMessage ( Severity  severity,
const QString &  msg,
const QString &  description,
const QString &  approvalName,
const QVector< Path > &  locations = {} 
)
protectednoexcept
+ Here is the call graph for this function:

◆ ~RuleCheckMessage()

~RuleCheckMessage ( )
protectedvirtualnoexcept
+ Here is the caller graph for this function:

Member Function Documentation

◆ getSeverity()

Severity getSeverity ( ) const
inlinenoexcept
+ Here is the call graph for this function:

◆ getSeverityTr() [1/2]

QString getSeverityTr ( ) const
noexcept
+ Here is the caller graph for this function:

◆ getSeverityIcon() [1/2]

const QIcon & getSeverityIcon ( ) const
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getMessage()

const QString& getMessage ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getDescription()

const QString& getDescription ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getApproval()

const SExpression& getApproval ( ) const
inlinenoexcept

◆ getLocations()

const QVector<Path>& getLocations ( ) const
inlinenoexcept

◆ as() [1/2]

T* as ( )
inlinenoexcept

◆ as() [2/2]

const T* as ( ) const
inlinenoexcept
+ Here is the call graph for this function:

◆ getSeverityTr() [2/2]

QString getSeverityTr ( Severity  severity)
staticnoexcept

◆ getSeverityIcon() [2/2]

const QIcon & getSeverityIcon ( Severity  severity)
staticnoexcept

◆ getAllApprovals()

QSet< SExpression > getAllApprovals ( const QVector< std::shared_ptr< const RuleCheckMessage >> &  messages)
staticnoexcept
+ Here is the caller graph for this function:

◆ operator==()

bool operator== ( const RuleCheckMessage rhs) const
noexcept
+ Here is the caller graph for this function:

◆ operator!=()

bool operator!= ( const RuleCheckMessage rhs) const
noexcept
+ Here is the caller graph for this function:

Member Data Documentation

◆ mSeverity

Severity mSeverity
protected

◆ mMessage

QString mMessage
protected

◆ mDescription

QString mDescription
protected

◆ mApproval

std::unique_ptr<SExpression> mApproval
protected

◆ mLocations

QVector<Path> mLocations
protected

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