QGIS API Documentation  2.0.1-Dufour
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Signals | Public Member Functions | Private Member Functions | Private Attributes | List of all members
QgsMessageBarItem Class Reference

#include <qgsmessagebaritem.h>

Signals

void styleChanged (QString styleSheet)
 emitted when the message level has changed

Public Member Functions

 QgsMessageBarItem (const QString &text, QgsMessageBar::MessageLevel level=QgsMessageBar::INFO, int duration=0, QWidget *parent=0)
 make out a widget containing a 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 and message 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 title, message and widget to be displayed on the bar
 QgsMessageBarItem (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 ()
QgsMessageBarItemsetText (QString text)
QgsMessageBarItemsetTitle (QString title)
QgsMessageBarItemsetLevel (QgsMessageBar::MessageLevel level)
QgsMessageBarItemsetWidget (QWidget *widget)
QgsMessageBarItemsetIcon (const QIcon &icon)
QgsMessageBarItemsetDuration (int duration)
int duration () const
 returns the duration in second of the message
QgsMessageBar::MessageLevel level ()
 returns the level
QString getStyleSheet ()
 returns the styleSheet

Private Member Functions

void writeContent ()

Private Attributes

QString mTitle
QString mText
QgsMessageBar::MessageLevel mLevel
int mDuration
QWidget * mWidget
QIcon mUserIcon
QHBoxLayout * mLayout
QLabel * mLblIcon
QString mStyleSheet
QTextEdit * mTextEdit

Detailed Description

Definition at line 29 of file qgsmessagebaritem.h.

Constructor & Destructor Documentation

QgsMessageBarItem::QgsMessageBarItem ( const QString &  text,
QgsMessageBar::MessageLevel  level = QgsMessageBar::INFO,
int  duration = 0,
QWidget *  parent = 0 
)

make out a widget containing a message to be displayed on the bar

Definition at line 26 of file qgsmessagebaritem.cpp.

References writeContent().

QgsMessageBarItem::QgsMessageBarItem ( const QString &  title,
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

Definition at line 39 of file qgsmessagebaritem.cpp.

References writeContent().

QgsMessageBarItem::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 title, message and widget to be displayed on the bar

Definition at line 52 of file qgsmessagebaritem.cpp.

References writeContent().

QgsMessageBarItem::QgsMessageBarItem ( 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

Definition at line 65 of file qgsmessagebaritem.cpp.

References writeContent().

QgsMessageBarItem::~QgsMessageBarItem ( )

Definition at line 78 of file qgsmessagebaritem.cpp.

Member Function Documentation

int QgsMessageBarItem::duration ( ) const
inline

returns the duration in second of the message

Definition at line 60 of file qgsmessagebaritem.h.

Referenced by setDuration(), and QgsMessageBar::showItem().

QString QgsMessageBarItem::getStyleSheet ( )
inline

returns the styleSheet

Definition at line 66 of file qgsmessagebaritem.h.

Referenced by QgsMessageBar::showItem().

QgsMessageBar::MessageLevel QgsMessageBarItem::level ( )
inline

returns the level

Definition at line 63 of file qgsmessagebaritem.h.

Referenced by setLevel().

QgsMessageBarItem * QgsMessageBarItem::setDuration ( int  duration)

Definition at line 231 of file qgsmessagebaritem.cpp.

References duration(), and mDuration.

Referenced by QgsMessageBar::pushWidget().

QgsMessageBarItem * QgsMessageBarItem::setIcon ( const QIcon &  icon)

Definition at line 224 of file qgsmessagebaritem.cpp.

References icon(), and mUserIcon.

QgsMessageBarItem * QgsMessageBarItem::setLevel ( QgsMessageBar::MessageLevel  level)

Definition at line 200 of file qgsmessagebaritem.cpp.

References level(), mLevel, mStyleSheet, styleChanged(), and writeContent().

Referenced by QgsMessageBar::pushWidget().

QgsMessageBarItem * QgsMessageBarItem::setText ( QString  text)

Definition at line 186 of file qgsmessagebaritem.cpp.

References mText, and writeContent().

QgsMessageBarItem * QgsMessageBarItem::setTitle ( QString  title)

Definition at line 193 of file qgsmessagebaritem.cpp.

References mTitle, and writeContent().

QgsMessageBarItem * QgsMessageBarItem::setWidget ( QWidget *  widget)

Definition at line 208 of file qgsmessagebaritem.cpp.

References mLayout, mWidget, and writeContent().

void QgsMessageBarItem::styleChanged ( QString  styleSheet)
signal

emitted when the message level has changed

Referenced by setLevel().

void QgsMessageBarItem::writeContent ( )
private

Member Data Documentation

int QgsMessageBarItem::mDuration
private

Definition at line 79 of file qgsmessagebaritem.h.

Referenced by setDuration().

QHBoxLayout* QgsMessageBarItem::mLayout
private

Definition at line 82 of file qgsmessagebaritem.h.

Referenced by setWidget(), and writeContent().

QLabel* QgsMessageBarItem::mLblIcon
private

Definition at line 83 of file qgsmessagebaritem.h.

Referenced by writeContent().

QgsMessageBar::MessageLevel QgsMessageBarItem::mLevel
private

Definition at line 78 of file qgsmessagebaritem.h.

Referenced by setLevel(), and writeContent().

QString QgsMessageBarItem::mStyleSheet
private

Definition at line 84 of file qgsmessagebaritem.h.

Referenced by setLevel(), and writeContent().

QString QgsMessageBarItem::mText
private

Definition at line 77 of file qgsmessagebaritem.h.

Referenced by setText(), and writeContent().

QTextEdit* QgsMessageBarItem::mTextEdit
private

Definition at line 85 of file qgsmessagebaritem.h.

Referenced by writeContent().

QString QgsMessageBarItem::mTitle
private

Definition at line 76 of file qgsmessagebaritem.h.

Referenced by setTitle(), and writeContent().

QIcon QgsMessageBarItem::mUserIcon
private

Definition at line 81 of file qgsmessagebaritem.h.

Referenced by setIcon(), and writeContent().

QWidget* QgsMessageBarItem::mWidget
private

Definition at line 80 of file qgsmessagebaritem.h.

Referenced by setWidget(), and writeContent().


The documentation for this class was generated from the following files: