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
Class Hierarchy¶
Subclasses¶
Default implementation of message output interface |
|
A generic message view for displaying QGIS messages. |
Methods
message to be appended to the current text |
|
Sets message, it won't be displayed until |
|
Sets title for the messages |
|
display the message to the user and deletes itself |
Static Methods
function that returns new class derived from |
Attributes
- class qgis.core.QgsMessageOutput[source]¶
Bases:
object
- MessageHtml = 1¶
- MessageText = 0¶
- class MessageType¶
Bases:
int
- 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- Return type:
Optional[QgsMessageOutput]
- static createMessageOutput(bool) deletes the instance)[source]
- setMessage(self, message: str | None, msgType: QgsMessageOutput.MessageType)[source]¶
Sets message, it won’t be displayed until
- Parameters:
message (Optional[str])
msgType (QgsMessageOutput.MessageType)
- setTitle(self, title: str | None)[source]¶
Sets title for the messages
- Parameters:
title (Optional[str])
- showMessage(self, blocking: bool = True)[source]¶
display the message to the user and deletes itself
- Parameters:
blocking (bool = True)
- showMessage(title: str | None, message: str | None, msgType: QgsMessageOutput.MessageType)[source]
Display the blocking message to the user.
- Parameters:
title (Optional[str])
message (Optional[str])
msgType (QgsMessageOutput.MessageType)