NDEVR
API Documentation

A table showing a specific log that allows the user to scroll around to view various log entries. More...

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

Public Member Functions

 LogView (QWidget *parent=nullptr)
 Constructs a LogView widget.
 ~LogView ()
 Destructor.
void addMessage (uint04 idx, const LogMessage &message) final override
 Adds a single log message to the view.
void addMessages (uint04 idx, const Buffer< LogMessage > &messages) final override
 Adds multiple log messages to the view.
void addWidgetToTop (QWidget *widget)
 Adds a widget above the log table view.
void attach (InfoPipe *stream) final override
 Attaches an InfoPipe as a log message source.
void attachProgressBar (QPointer< QProgressBar > bar, bool auto_hide=true)
 Attaches an existing progress bar to this log view.
void changeEvent (QEvent *e) override
 Handles change events such as palette or font changes.
void clearLog ()
 Clears all messages from the log view.
QPointer< QProgressBar > createProgressBar (bool auto_hide=true)
 Creates and returns a new progress bar attached to this log view.
bool isAtBottom () const
 Checks whether the log view is currently scrolled to the bottom.
void jumpToBottom ()
 Scrolls the log view to the bottom to show the latest messages.
void requestUpdateLogSignal ()
 Emitted to request that the log display be refreshed.
void resizeEvent (QResizeEvent *size) override
 Handles resize events for the log view.
void resizeToContents ()
 Resizes the table columns to fit their contents.
void setDetectNewLines (bool detect)
 Sets whether embedded newline characters in messages create additional rows.
void setMinimumLogLevel (uint01 log_level)
 Sets the minimum severity level for displayed log messages.
void setOptionsVisible (bool visible)
 Sets whether the options toolbar is visible.
void setProgress (uint04 id, fltp04 progress) final override
 Updates the progress bar value for a given operation.
void setProgressFormat (const String &format)
 Sets the format string for the progress bar display.
void setTimeSpans (const Buffer< TimeSpan > &time_spans)
 Sets the selectable time spans used to filter log entries.
void showLogConsole (bool show_log_console)
 Sets whether the log console input area is visible.
void showTimes (bool show_times)
 Sets whether timestamp columns are visible in the log table.
QSize sizeHint () const override
 Returns the preferred size hint for the log view.
Public Member Functions inherited from LogStream
virtual ~LogStream ()
 Destructor.
virtual void addProgressSource (const TranslatedString &name, uint04 idx, fltp04 progress)
 Registers a new progress source to be tracked by this stream.
virtual void allowInput (bool)
 Sets whether this stream allows user input during an operation.
void clearLinks ()
 Detaches this LogStream from all linked InfoPipe objects and clears the link list.
virtual void detach (InfoPipe *stream)
 Detaches this LogStream from the given InfoPipe, stopping further updates from it.
bool ignoringMessages () const
 Returns whether this stream is currently ignoring messages.
virtual void removeProgressSource (uint04 idx)
 Removes a previously registered progress source from this stream.
void setIgnoreMessages (bool ignore)
 Sets whether this stream should ignore incoming messages.

Private Member Functions

void allowCancel (bool) final override
 No-op override for the cancel allowance callback.

Additional Inherited Members

Protected Attributes inherited from LogStream
bool m_ignore_message = false
 Whether this stream should ignore incoming messages.
Buffer< InfoPipe * > m_linked_logs
 Collection of InfoPipe objects this stream is listening to.
Dictionary< uint04, ProgressSourcem_progress_sources
 Maps progress source indices to their ProgressSource data.

Detailed Description

A table showing a specific log that allows the user to scroll around to view various log entries.


Definition at line 56 of file LogView.h.

Constructor & Destructor Documentation

◆ LogView()

LogView::LogView ( QWidget * parent = nullptr)

Constructs a LogView widget.

Parameters
[in]parentThe parent widget.

◆ ~LogView()

LogView::~LogView ( )

Destructor.

Cleans up the log table and output stream.

Member Function Documentation

◆ addMessage()

void LogView::addMessage ( uint04 idx,
const LogMessage & message )
finaloverridevirtual

Adds a single log message to the view.

Parameters
[in]idxThe index of the log stream source.
[in]messageThe log message to add.

Implements LogStream.

◆ addMessages()

void LogView::addMessages ( uint04 idx,
const Buffer< LogMessage > & messages )
finaloverridevirtual

Adds multiple log messages to the view.

Parameters
[in]idxThe index of the log stream source.
[in]messagesThe log messages to add.

Reimplemented from LogStream.

◆ addWidgetToTop()

void LogView::addWidgetToTop ( QWidget * widget)

Adds a widget above the log table view.

Parameters
[in]widgetThe widget to add to the top area.

◆ attach()

void LogView::attach ( InfoPipe * stream)
finaloverridevirtual

Attaches an InfoPipe as a log message source.

Parameters
[in]streamThe info pipe to attach.

Reimplemented from LogStream.

◆ attachProgressBar()

void LogView::attachProgressBar ( QPointer< QProgressBar > bar,
bool auto_hide = true )

Attaches an existing progress bar to this log view.

Parameters
[in]barThe progress bar to attach.
[in]auto_hideWhether the progress bar hides automatically when complete.

◆ changeEvent()

void LogView::changeEvent ( QEvent * e)
override

Handles change events such as palette or font changes.

Parameters
[in]eThe change event.

◆ createProgressBar()

QPointer< QProgressBar > LogView::createProgressBar ( bool auto_hide = true)

Creates and returns a new progress bar attached to this log view.

Parameters
[in]auto_hideWhether the progress bar hides automatically when complete.
Returns
A pointer to the created progress bar.

◆ isAtBottom()

bool LogView::isAtBottom ( ) const

Checks whether the log view is currently scrolled to the bottom.

Returns
True if the view is at the bottom.

◆ resizeEvent()

void LogView::resizeEvent ( QResizeEvent * size)
override

Handles resize events for the log view.

Parameters
[in]sizeThe resize event.

◆ setDetectNewLines()

void LogView::setDetectNewLines ( bool detect)

Sets whether embedded newline characters in messages create additional rows.

Parameters
[in]detectTrue to detect and split on newlines.

◆ setMinimumLogLevel()

void LogView::setMinimumLogLevel ( uint01 log_level)

Sets the minimum severity level for displayed log messages.

Parameters
[in]log_levelThe minimum log level.

◆ setOptionsVisible()

void LogView::setOptionsVisible ( bool visible)

Sets whether the options toolbar is visible.

Parameters
[in]visibleTrue to show the options.

◆ setProgress()

void LogView::setProgress ( uint04 id,
fltp04 progress )
finaloverridevirtual

Updates the progress bar value for a given operation.

Parameters
[in]idThe identifier of the progress operation.
[in]progressThe progress value from 0.0 to 1.0.

Implements LogStream.

◆ setProgressFormat()

void LogView::setProgressFormat ( const String & format)

Sets the format string for the progress bar display.

Parameters
[in]formatThe format string.

◆ setTimeSpans()

void LogView::setTimeSpans ( const Buffer< TimeSpan > & time_spans)

Sets the selectable time spans used to filter log entries.

Parameters
[in]time_spansThe available time span filter options.

◆ showLogConsole()

void LogView::showLogConsole ( bool show_log_console)

Sets whether the log console input area is visible.

Parameters
[in]show_log_consoleTrue to show the console.

◆ showTimes()

void LogView::showTimes ( bool show_times)

Sets whether timestamp columns are visible in the log table.

Parameters
[in]show_timesTrue to show time columns.

◆ sizeHint()

QSize LogView::sizeHint ( ) const
override

Returns the preferred size hint for the log view.

Returns
The preferred size.

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