COOLFluiD  Release kernel
COOLFluiD is a Collaborative Simulation Environment (CSE) focused on complex MultiPhysics simulations.
Public Slots | Public Member Functions | Private Slots | Private Attributes | List of all members
LoggingList Class Reference

Manages a graphical log component. More...

#include <LoggingList.hpp>

Inherits QTextEdit.

Public Slots

void clear_log ()
 Clears the log. More...
 

Public Member Functions

 LoggingList (QWidget *parent=nullptr, unsigned int max_log_lines=100000)
 Constructor. More...
 
 ~LoggingList ()
 Destructor. More...
 
void set_max_log_lines (unsigned int max_log_lines=100000)
 Sets the maximum number of lines before the log is cleared. More...
 
unsigned int max_log_lines () const
 Gives the maximum number of lines before the log is cleared. More...
 
unsigned int log_lines_count () const
 Gives the number of lines the log contains. More...
 

Private Slots

void new_message (const QString &message, uiCommon::LogMessage::Type type)
 

Private Attributes

unsigned int m_log_lines_count
 Number of lines in the log. More...
 
unsigned int m_max_log_lines
 Number of lines before the log must be cleared. More...
 

Detailed Description

Manages a graphical log component.

Definition at line 28 of file LoggingList.hpp.

Constructor & Destructor Documentation

LoggingList ( QWidget *  parent = nullptr,
unsigned int  max_log_lines = 100000 
)

Constructor.

Parameters
parentParent. May be nullptr.
maxLogLinesNumber of lines before the log must be cleared. If 0, the log is never cleared.

Definition at line 24 of file LoggingList.cpp.

Destructor.

Frees all allocated memory. Parent is not destroyed.

Definition at line 38 of file LoggingList.cpp.

Member Function Documentation

void clear_log ( )
slot

Clears the log.

Use this method instead of the base class method clear() to ensure that the line counter is reset.

Definition at line 66 of file LoggingList.cpp.

unsigned int log_lines_count ( ) const

Gives the number of lines the log contains.

Returns
Returns the number of lines the log contains.

Definition at line 59 of file LoggingList.cpp.

unsigned int max_log_lines ( ) const

Gives the maximum number of lines before the log is cleared.

Returns
Returns the maximum number of lines before the log is cleared.

Definition at line 52 of file LoggingList.cpp.

void new_message ( const QString &  message,
uiCommon::LogMessage::Type  type 
)
privateslot

Definition at line 74 of file LoggingList.cpp.

void set_max_log_lines ( unsigned int  max_log_lines = 100000)

Sets the maximum number of lines before the log is cleared.

Parameters
maxLogLinesMaximum number of lines. If 0, the log is never cleared.
Warning
Be careful when modifying this value. The more lines the log contains, the more it takes memory to store its content.

Definition at line 45 of file LoggingList.cpp.

Member Data Documentation

unsigned int m_log_lines_count
private

Number of lines in the log.

Definition at line 79 of file LoggingList.hpp.

unsigned int m_max_log_lines
private

Number of lines before the log must be cleared.

If 0, the log is never cleared.

Definition at line 84 of file LoggingList.hpp.


The documentation for this class was generated from the following files:
Send comments to:
COOLFluiD Web Admin