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. |
Abstract 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
- 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- Return type:
Optional[QgsMessageOutput]
- static createMessageOutput(bool) deletes the instance)[source]
- 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)
- abstract setTitle(self, title: str | None)[source]¶
Sets title for the messages
- Parameters:
title (Optional[str])
- abstract showMessage(self, blocking: bool = True)[source]¶
display the message to the user and deletes itself
- Parameters:
blocking (bool = True)
- abstract 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)