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.
Synopsis¶
Methods¶
def
__init__()def
addError()def
addInfo()def
addText()def
addWarning()def
clear()def
dump()def
getCount()def
save()def
saveTxt()
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()]]]])¶
Add an error entry to the log as a GKLogEntry::eError
- addInfo(str[, model=None[, who=None[, relativeWhen=QDateTime()[, where=GKPoint()]]]])¶
Add an info entry to the log as a GKLogEntry::eInfo
- addText(str[, model=None[, who=None[, relativeWhen=QDateTime()[, where=GKPoint()]]]])¶
Add an entry to the log as a GKLogEntry::eText
- addWarning(str[, model=None[, who=None[, relativeWhen=QDateTime()[, where=GKPoint()]]]])¶
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.
Returns the number of entries currently in the log
Note
only visible items are taken into account
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