LogStream subclass for directing a log stream to GUI application components.
#include <Workspace/DataExecution/Logging/logtogui.h>
◆ LogToGui() [1/2]
◆ LogToGui() [2/2]
◆ ~LogToGui()
◆ flush()
Clients would not normally need to call this function, but if for some reason they want to be sure that all logged text has been sent to where it needs to go before performing some task, they can call flush(). When flush() returns, all underlying streams and buffers associated with the LogStream object will have been flushed to disk, etc.
Implements LogStream.
◆ getBuffer()
◆ getBufferEnabled()
bool getBufferEnabled |
( |
| ) |
const |
◆ getPrefixTimestamp()
bool getPrefixTimestamp |
( |
| ) |
const |
- Returns
- True if log text is currently prefixing with timestamp.
- See also
- setPrefixTimeStamp()
◆ isStreamOkay()
bool isStreamOkay |
( |
| ) |
const |
|
overridevirtual |
- Returns
- True if the stream is able to accept text for writing.
Implements LogStream.
◆ setBufferEnabled()
void setBufferEnabled |
( |
bool |
b | ) |
|
- Parameters
-
b | If true, then all text logged to this stream will also be appended to the internal buffer until setBufferEnabled() is called again with b set to false (or setLogWidget() is called). |
This function is meant to be used to temporarily re-enable the internal buffer after setLogWidget() has already been called. It can be used to capture log text for a task that should have its text appear after the log is cleared, but where the log should only be cleared if the task is successful. This requires that the text from the task be buffered until it can be determined if the task was successful or not.
- See also
- getBufferEnabled(), getBuffer()
◆ setLogWidget()
- Parameters
-
viewer | The logging widget that should receive this stream's log text from here on. The contents of the internal buffer are copied to it and buffering is then switched off. |
- See also
- setBufferEnabled(), getBuffer()
◆ setPrefixTimestamp()
void setPrefixTimestamp |
( |
bool |
b | ) |
|
- Parameters
-
b | If true, then all text logged to this stream will also be prefixed with timestamp. |
- See also
- getPrefixTimestamp()
◆ splashDestroyed