QGIS/python/gui/qgsmessagebaritem.sip
Nyall Dawson c49b5b777f Change a lot of arguments to const references in core/gui
Rationale:
- there was a lot of large objects passed by value, so potentially
there's a speed bump from this
- even for implicitly shared classes like QString/QList there's still
a (small) cost for copying the objects when there's no reason to
- it's the right thing to do!
2015-10-07 12:02:04 +11:00

47 lines
1.8 KiB
Plaintext

class QgsMessageBarItem: QWidget
{
%TypeHeaderCode
#include <qgsmessagebaritem.h>
#include <qgsmessagebar.h>
%End
public:
//! make out a widget containing a message to be displayed on the bar
QgsMessageBarItem( const QString &text, QgsMessageBar::MessageLevel level = QgsMessageBar::INFO, int duration = 0, QWidget *parent /TransferThis/ = 0 );
//! make out a widget containing title and message to be displayed on the bar
QgsMessageBarItem( const QString &title, const QString &text, QgsMessageBar::MessageLevel level = QgsMessageBar::INFO, int duration = 0, QWidget *parent /TransferThis/ = 0 );
//! make out a widget containing title, message and widget to be displayed on the bar
QgsMessageBarItem( const QString &title, const QString &text, QWidget *widget, QgsMessageBar::MessageLevel level = QgsMessageBar::INFO, int duration = 0, QWidget *parent /TransferThis/ = 0 );
//! make out a widget containing a widget to be displayed on the bar
QgsMessageBarItem( QWidget *widget, QgsMessageBar::MessageLevel level = QgsMessageBar::INFO, int duration = 0, QWidget *parent /TransferThis/ = 0 );
QgsMessageBarItem *setText( const QString& text );
QgsMessageBarItem *setTitle( const QString& title );
QgsMessageBarItem *setLevel( QgsMessageBar::MessageLevel level );
QgsMessageBarItem *setWidget( QWidget *widget );
QgsMessageBarItem *setIcon( const QIcon &icon );
QgsMessageBarItem *setDuration( int duration );
//! returns the duration in second of the message
int duration();
//! returns the level
QgsMessageBar::MessageLevel level();
//! returns the styleSheet
QString getStyleSheet();
signals:
//! emitted when the message level has changed
void styleChanged( QString styleSheet );
};