PyANGKernel.GKLog

class GKLog

A log as a collection of messages, warnings and errors

Details

Both the model ( getLog ) and the system ( getLog ) share the same log of events, as a way to inform the user of given actions, warnings and errors found on these actions.

A log is a collection of GKLogEntry . These content of each entry is either plain text or a well formated HTML string. If it is a HTML entry then thake into account that the possible render for this log will already add the BODY tags as the whole log will be show in unique HTML page.

The entry can have an optional originator (who), a position (where) and a time (whem). The time can be simulated time and not real time.

Inheritance diagram of PyANGKernel.GKLog

Synopsis

Methods

Note

This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE

PyANGKernel.GKLog.eEntryTypeRole
__init__()
addError(str[, model=None[, who=None[, relativeWhen=QDateTime()[, where=GKPoint()]]]])
Parameters:

Add an error entry to the log as a GKLogEntry::eError

addInfo(str[, model=None[, who=None[, relativeWhen=QDateTime()[, where=GKPoint()]]]])
Parameters:

Add an info entry to the log as a GKLogEntry::eInfo

addText(str[, model=None[, who=None[, relativeWhen=QDateTime()[, where=GKPoint()]]]])
Parameters:

Add an entry to the log as a GKLogEntry::eText

addWarning(str[, model=None[, who=None[, relativeWhen=QDateTime()[, where=GKPoint()]]]])
Parameters:

Add a warning entry to the log as a GKLogEntry::eWarning

clear()

Clears the log, removing all entries

dump()

Writes all (including non-visible) messages to the standard output.

getCount()
Return type:

int

Returns the number of entries currently in the log

Note

only visible items are taken into account

save(file, model)
Parameters:

Saves the log into the given file

Note

only visible items are saved into the file

saveTxt(file)
Parameters:

file – str

Saves the log into the given txt file

Note

only text items are saved