BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
FitLog Class Reference

Description

the collected messages of a fitting session

Definition at line 27 of file FitLog.h.

Inheritance diagram for FitLog:
[legend]
Collaboration diagram for FitLog:
[legend]

Classes

struct  Message
 

Signals

void cleared ()
 
void messageAppended (const Message &message)
 

Public Member Functions

 FitLog (QObject *parent=nullptr)
 
void append (const std::string &text, FitLogLevel level)
 
void clearLog ()
 
const std::vector< Message > & messages () const
 

Private Attributes

std::vector< Messagem_messages
 

Constructor & Destructor Documentation

◆ FitLog()

FitLog::FitLog ( QObject *  parent = nullptr)

Definition at line 17 of file FitLog.cpp.

18  : QObject(parent)
19 {
20 }

Member Function Documentation

◆ append()

void FitLog::append ( const std::string &  text,
FitLogLevel  level 
)

Definition at line 22 of file FitLog.cpp.

23 {
24  Message m{text, level};
25  m_messages.push_back(m);
26  emit messageAppended(m);
27 }
std::vector< Message > m_messages
Definition: FitLog.h:46
void messageAppended(const Message &message)

References m_messages, and messageAppended().

◆ cleared

void FitLog::cleared ( )
signal

◆ clearLog()

void FitLog::clearLog ( )

Definition at line 29 of file FitLog.cpp.

30 {
31  m_messages.clear();
32  emit cleared();
33 }
void cleared()

References cleared(), and m_messages.

◆ messageAppended

void FitLog::messageAppended ( const Message message)
signal

Referenced by append(), and JobMessagePanel::setLog().

◆ messages()

const std::vector< FitLog::Message > & FitLog::messages ( ) const

Definition at line 35 of file FitLog.cpp.

36 {
37  return m_messages;
38 }

References m_messages.

Referenced by JobMessagePanel::setLog().

Member Data Documentation

◆ m_messages

std::vector<Message> FitLog::m_messages
private

Definition at line 46 of file FitLog.h.

Referenced by append(), clearLog(), and messages().


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