-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
more complete QgsMessageBarItem: inherits from QWidget to allow furth…
…er editing
- Loading branch information
Showing
10 changed files
with
570 additions
and
220 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
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 = 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 = 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 = 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 = 0 ); | ||
|
||
QgsMessageBarItem *setText( QString text ); | ||
|
||
QgsMessageBarItem *setTitle( 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(); | ||
|
||
//! get the uuid of this message | ||
QString id(); | ||
|
||
//! returns the level | ||
QgsMessageBar::MessageLevel level(); | ||
|
||
//! returns the styleSheet | ||
QString getStyleSheet(); | ||
|
||
signals: | ||
//! emitted when the message level has changed | ||
void styleChanged( QString styleSheet ); | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.