|
gboard
|
A Qt widget that displays read-only log text with a compact "top bar" UI. More...
#include <gboard.h>
Public Member Functions | |
| GBoard (const std::shared_ptr< GOptions > &gopt, QWidget *parent=nullptr) | |
| Constructs a new GBoard widget. | |
| GBoard (const GBoard &)=delete | |
| GBoard & | operator= (const GBoard &)=delete |
| GBoard (GBoard &&)=delete | |
| GBoard & | operator= (GBoard &&)=delete |
| void | appendLog (const QString &text) |
| Appends a log line to the internal history and updates the display. | |
Public Member Functions inherited from GBase< GBoard > | |
| GBase (const std::shared_ptr< GOptions > &gopt, std::string logger_name="") | |
| GBase (const std::shared_ptr< GLogger > &logger) | |
| GBase (const GBase &)=default | |
| GBase (GBase &&) noexcept=default | |
| virtual | ~GBase () |
| GBase & | operator= (const GBase &)=default |
| GBase & | operator= (GBase &&) noexcept=default |
Additional Inherited Members | |
Protected Attributes inherited from GBase< GBoard > | |
| std::shared_ptr< GLogger > | log |
GBoard is intended to be used as a log sink and viewer:
fullLogLines is the source of truth for all received log lines (stored as HTML fragments).QTextEdit is rebuilt from fullLogLines whenever the filter changes or a new line arrives.In typical usage, log lines may arrive from non-GUI threads. The implementation ensures the actual QTextEdit update is executed on the GUI thread.
This widget owns its Qt child widgets (created with this as parent).
|
explicit |
The widget instantiates its internal UI:
QTextEdit, read-only, rich-text enabled)| gopt | Shared pointer to the module options/logging configuration. |
| parent | Parent widget (default is nullptr). |
|
delete |
|
delete |
| void GBoard::appendLog | ( | const QString & | text | ) |
The input is treated as an HTML fragment (not a full HTML document):
fullLogLines.Empty or whitespace-only fragments are ignored.
| text | HTML fragment representing one log line. |