Class: QgsMessageOutput¶
Interface for showing messages from QGIS in GUI independent way.
This class provides abstraction of a dialog for showing output to the
user. By default QgsMessageConsoleOutput will be used if not
overridden with other message output creator function.
QGIS application uses QgsMessageView class for displaying a
dialog to the user.
Object deletes itself when it’s not needed anymore. Children should use
signal destroyed() to notify the deletion
Note
This is an abstract class, with methods which must be implemented by a subclass.
The following methods must be implemented: appendMessage(), setMessage(), setTitle(), showMessage()
Class Hierarchy¶
Subclasses¶
Default implementation of message output interface. |
|
A generic message view for displaying QGIS messages. |
- class qgis.core.QgsMessageOutput[source]¶
Bases:
object- MessageHtml = 1¶
- MessageText = 0¶
- class MessageType¶
Bases:
int
- abstract appendMessage(self, message: str | None)[source]¶
message to be appended to the current text
- Parameters:
message (Optional[str])
- static createMessageOutput() QgsMessageOutput | None[source]¶
function that returns new class derived from
QgsMessageOutput(don’t forget to delete it then if showMessage(bool) is not used showMessage(bool) deletes the instance)- Return type:
Optional[QgsMessageOutput]
- abstract setMessage(self, message: str | None, msgType: QgsMessageOutput.MessageType)[source]¶
Sets message, it won’t be displayed until
- Parameters:
message (Optional[str])
msgType (QgsMessageOutput.MessageType)