2017-06-07 16:16:21 +02:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/gui/qgsmessagebar.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-09-04 18:31:51 +10:00
|
|
|
class QgsMessageBar: QFrame
|
|
|
|
{
|
2017-06-07 16:16:21 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
A bar for displaying non-blocking messages to the user.
|
2012-09-04 18:31:51 +10:00
|
|
|
%End
|
|
|
|
|
2017-06-07 16:16:21 +02:00
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgsmessagebar.h"
|
|
|
|
%End
|
2012-09-04 18:31:51 +10:00
|
|
|
public:
|
2013-01-11 18:03:32 -07:00
|
|
|
|
2015-02-18 17:00:36 +11:00
|
|
|
QgsMessageBar( QWidget *parent /TransferThis/ = 0 );
|
2017-12-12 11:44:10 +10:00
|
|
|
%Docstring
|
|
|
|
Constructor for QgsMessageBar
|
|
|
|
%End
|
2017-06-07 16:16:21 +02:00
|
|
|
|
|
|
|
void pushItem( QgsMessageBarItem *item /Transfer/ );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Display a message item on the bar after hiding the currently visible one
|
|
|
|
and putting it in a stack.
|
|
|
|
The message bar will take ownership of the item.
|
2017-06-07 16:16:21 +02:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
:param item: Item to display
|
2017-06-07 16:16:21 +02:00
|
|
|
%End
|
|
|
|
|
2018-02-05 22:11:34 -04:00
|
|
|
QgsMessageBarItem *pushWidget( QWidget *widget /Transfer/, Qgis::MessageLevel level = Qgis::Info, int duration = 0 );
|
2017-06-07 16:16:21 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Display a widget as a message on the bar after hiding the currently visible one
|
|
|
|
and putting it in a stack.
|
2017-12-15 21:36:08 -04:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
:param widget: message widget to display
|
2018-02-05 22:11:34 -04:00
|
|
|
:param level: is Qgis.Info, Warning, Critical or Success
|
2017-12-15 10:36:55 -04:00
|
|
|
:param duration: timeout duration of message in seconds, 0 value indicates no timeout
|
2017-06-07 16:16:21 +02:00
|
|
|
%End
|
2012-09-04 18:31:51 +10:00
|
|
|
|
2013-08-09 15:41:10 +02:00
|
|
|
bool popWidget( QgsMessageBarItem *item );
|
2017-06-07 16:16:21 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Remove the passed widget from the bar (if previously added),
|
|
|
|
then display the next one in the stack if any or hide the bar
|
2017-12-15 21:36:08 -04:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
:param item: item to remove
|
|
|
|
|
|
|
|
:return: true if the widget was removed, false otherwise
|
2017-06-07 16:16:21 +02:00
|
|
|
%End
|
2012-09-04 18:31:51 +10:00
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
static QgsMessageBarItem *createMessage( const QString &text, QWidget *parent = 0 ) /Factory/;
|
2017-06-07 16:16:21 +02:00
|
|
|
%Docstring
|
|
|
|
make out a widget containing a message to be displayed on the bar
|
|
|
|
%End
|
|
|
|
static QgsMessageBarItem *createMessage( const QString &title, const QString &text, QWidget *parent = 0 ) /Factory/;
|
|
|
|
%Docstring
|
|
|
|
make out a widget containing title and message to be displayed on the bar
|
|
|
|
%End
|
2017-05-01 16:42:33 +02:00
|
|
|
static QgsMessageBarItem *createMessage( QWidget *widget, QWidget *parent = 0 ) /Factory/;
|
2017-06-07 16:16:21 +02:00
|
|
|
%Docstring
|
|
|
|
make out a widget containing title and message to be displayed on the bar
|
|
|
|
%End
|
2013-09-17 12:33:57 +02:00
|
|
|
|
2018-02-05 22:11:34 -04:00
|
|
|
void pushMessage( const QString &text, Qgis::MessageLevel level = Qgis::Info, int duration = 5 );
|
2017-06-07 16:16:21 +02:00
|
|
|
%Docstring
|
|
|
|
convenience method for pushing a message to the bar
|
|
|
|
%End
|
2018-02-05 22:11:34 -04:00
|
|
|
void pushMessage( const QString &title, const QString &text, Qgis::MessageLevel level = Qgis::Info, int duration = 5 );
|
2017-06-07 16:16:21 +02:00
|
|
|
%Docstring
|
|
|
|
convenience method for pushing a message with title to the bar
|
|
|
|
%End
|
2013-01-12 08:43:38 -07:00
|
|
|
|
2015-09-28 17:33:13 +10:00
|
|
|
QgsMessageBarItem *currentItem();
|
|
|
|
|
2012-09-04 18:31:51 +10:00
|
|
|
signals:
|
2013-08-09 15:41:10 +02:00
|
|
|
void widgetAdded( QgsMessageBarItem *item );
|
2017-06-07 16:16:21 +02:00
|
|
|
%Docstring
|
|
|
|
emitted when a message widget is added to the bar
|
|
|
|
%End
|
2012-11-07 12:45:00 -07:00
|
|
|
|
2013-08-09 15:41:10 +02:00
|
|
|
void widgetRemoved( QgsMessageBarItem *item );
|
2017-06-07 16:16:21 +02:00
|
|
|
%Docstring
|
|
|
|
emitted when a message widget was removed from the bar
|
|
|
|
%End
|
2012-09-04 18:31:51 +10:00
|
|
|
|
|
|
|
public slots:
|
2017-06-07 16:16:21 +02:00
|
|
|
|
2012-09-04 18:31:51 +10:00
|
|
|
bool popWidget();
|
2017-06-07 16:16:21 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Remove the currently displayed widget from the bar and
|
|
|
|
display the next in the stack if any or hide the bar.
|
|
|
|
|
|
|
|
:return: true if the widget was removed, false otherwise
|
2017-06-07 16:16:21 +02:00
|
|
|
%End
|
2012-11-07 12:45:00 -07:00
|
|
|
|
|
|
|
bool clearWidgets();
|
2017-06-07 16:16:21 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Remove all items from the bar's widget list
|
|
|
|
|
|
|
|
:return: true if all items were removed, false otherwise
|
2017-06-07 16:16:21 +02:00
|
|
|
%End
|
2013-01-14 17:04:21 -07:00
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
void pushSuccess( const QString &title, const QString &message );
|
2017-06-07 16:16:21 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Pushes a success message with default timeout to the message bar
|
2017-12-15 21:36:08 -04:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
:param title: title string for message
|
|
|
|
:param message: The message to be displayed
|
|
|
|
|
2017-06-07 16:16:21 +02:00
|
|
|
.. versionadded:: 2.8
|
|
|
|
%End
|
2015-01-15 13:50:27 +01:00
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
void pushInfo( const QString &title, const QString &message );
|
2017-06-07 16:16:21 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Pushes a information message with default timeout to the message bar
|
2017-12-15 21:36:08 -04:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
:param title: title string for message
|
|
|
|
:param message: The message to be displayed
|
|
|
|
|
2017-06-07 16:16:21 +02:00
|
|
|
.. versionadded:: 2.8
|
|
|
|
%End
|
2015-01-15 13:50:27 +01:00
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
void pushWarning( const QString &title, const QString &message );
|
2017-06-07 16:16:21 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Pushes a warning with default timeout to the message bar
|
2017-12-15 21:36:08 -04:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
:param title: title string for message
|
|
|
|
:param message: The message to be displayed
|
|
|
|
|
2017-06-07 16:16:21 +02:00
|
|
|
.. versionadded:: 2.8
|
|
|
|
%End
|
2015-01-15 13:50:27 +01:00
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
void pushCritical( const QString &title, const QString &message );
|
2017-06-07 16:16:21 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Pushes a critical warning with default timeout to the message bar
|
2017-12-15 21:36:08 -04:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
:param title: title string for message
|
|
|
|
:param message: The message to be displayed
|
|
|
|
|
2017-06-07 16:16:21 +02:00
|
|
|
.. versionadded:: 2.8
|
|
|
|
%End
|
2015-01-15 13:50:27 +01:00
|
|
|
|
2013-01-14 17:04:21 -07:00
|
|
|
protected:
|
2017-06-07 16:16:21 +02:00
|
|
|
virtual void mousePressEvent( QMouseEvent *e );
|
|
|
|
|
|
|
|
|
2012-09-04 18:31:51 +10:00
|
|
|
};
|
2017-06-07 16:16:21 +02:00
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/gui/qgsmessagebar.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|