![]() |
NDEVR
API Documentation
|
A table showing a specific log that allows the user to scroll around to view various log entries. More...
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, ProgressSource > | m_progress_sources |
| Maps progress source indices to their ProgressSource data. | |
A table showing a specific log that allows the user to scroll around to view various log entries.
| LogView::LogView | ( | QWidget * | parent = nullptr | ) |
Constructs a LogView widget.
| [in] | parent | The parent widget. |
| LogView::~LogView | ( | ) |
Destructor.
Cleans up the log table and output stream.
|
finaloverridevirtual |
Adds a single log message to the view.
| [in] | idx | The index of the log stream source. |
| [in] | message | The log message to add. |
Implements LogStream.
|
finaloverridevirtual |
Adds multiple log messages to the view.
| [in] | idx | The index of the log stream source. |
| [in] | messages | The log messages to add. |
Reimplemented from LogStream.
| void LogView::addWidgetToTop | ( | QWidget * | widget | ) |
Adds a widget above the log table view.
| [in] | widget | The widget to add to the top area. |
|
finaloverridevirtual |
| void LogView::attachProgressBar | ( | QPointer< QProgressBar > | bar, |
| bool | auto_hide = true ) |
Attaches an existing progress bar to this log view.
| [in] | bar | The progress bar to attach. |
| [in] | auto_hide | Whether the progress bar hides automatically when complete. |
|
override |
Handles change events such as palette or font changes.
| [in] | e | The change event. |
| QPointer< QProgressBar > LogView::createProgressBar | ( | bool | auto_hide = true | ) |
Creates and returns a new progress bar attached to this log view.
| [in] | auto_hide | Whether the progress bar hides automatically when complete. |
| bool LogView::isAtBottom | ( | ) | const |
Checks whether the log view is currently scrolled to the bottom.
|
override |
Handles resize events for the log view.
| [in] | size | The resize event. |
| void LogView::setDetectNewLines | ( | bool | detect | ) |
Sets whether embedded newline characters in messages create additional rows.
| [in] | detect | True to detect and split on newlines. |
| void LogView::setMinimumLogLevel | ( | uint01 | log_level | ) |
Sets the minimum severity level for displayed log messages.
| [in] | log_level | The minimum log level. |
| void LogView::setOptionsVisible | ( | bool | visible | ) |
Sets whether the options toolbar is visible.
| [in] | visible | True to show the options. |
Updates the progress bar value for a given operation.
| [in] | id | The identifier of the progress operation. |
| [in] | progress | The progress value from 0.0 to 1.0. |
Implements LogStream.
| void LogView::setProgressFormat | ( | const String & | format | ) |
Sets the format string for the progress bar display.
| [in] | format | The format string. |
Sets the selectable time spans used to filter log entries.
| [in] | time_spans | The available time span filter options. |
| void LogView::showLogConsole | ( | bool | show_log_console | ) |
Sets whether the log console input area is visible.
| [in] | show_log_console | True to show the console. |
| void LogView::showTimes | ( | bool | show_times | ) |
Sets whether timestamp columns are visible in the log table.
| [in] | show_times | True to show time columns. |
|
override |
Returns the preferred size hint for the log view.