mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
static QgsMessageOutput::showMessage()
This commit is contained in:
parent
2dfea6a656
commit
b89b6a5820
@ -42,6 +42,15 @@ QgsMessageOutput::~QgsMessageOutput()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void QgsMessageOutput::showMessage( const QString& title, const QString& message, MessageType msgType )
|
||||
{
|
||||
QgsMessageOutput *output = QgsMessageOutput::createMessageOutput();
|
||||
output->setTitle( title );
|
||||
output->setMessage( message, msgType );
|
||||
output->showMessage();
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
// QgsMessageOutputConsole
|
||||
|
||||
@ -79,3 +88,4 @@ void QgsMessageOutputConsole::setTitle( const QString& title )
|
||||
{
|
||||
mTitle = title;
|
||||
}
|
||||
|
||||
|
@ -54,16 +54,21 @@ class CORE_EXPORT QgsMessageOutput
|
||||
//! set title for the messages
|
||||
virtual void setTitle( const QString& title ) = 0;
|
||||
|
||||
//! display the message to the user
|
||||
//! display the message to the user and deletes itself
|
||||
virtual void showMessage( bool blocking = true ) = 0;
|
||||
|
||||
/** Display the blocking message to the user.
|
||||
* @note added in 2.10
|
||||
*/
|
||||
static void showMessage( const QString& title, const QString& message, MessageType msgType );
|
||||
|
||||
//! sets function that will be used to create message output
|
||||
//! @note not available in python bindings
|
||||
// TODO: implementation where python class could be passed
|
||||
static void setMessageOutputCreator( MESSAGE_OUTPUT_CREATOR f );
|
||||
|
||||
//! function that returns new class derived from QgsMessageOutput
|
||||
//! (don't forget to delete it then)
|
||||
//! (don't forget to delete it then if showMessage(bool) is not used showMessage(bool) deletes the instance)
|
||||
static QgsMessageOutput* createMessageOutput();
|
||||
|
||||
private:
|
||||
|
Loading…
x
Reference in New Issue
Block a user