Home · All Classes · Main Classes · Deprecated
Public Types | Signals | Public Member Functions | Static Public Attributes | Properties

MInfoBanner Class Reference

A class that represents in-process notification banner. More...

Inherits MSceneWindow.

List of all members.

Public Types

enum  BannerType { Information, Event }

Signals

void clicked ()
void buttonClicked ()

Public Member Functions

 MInfoBanner (BannerType type=Information)
virtual ~MInfoBanner ()
BannerType bannerType ()
void setImageID (const QString &imageID)
QString imageID () const
void setPixmap (const QPixmap &pixmap)
QPixmap pixmap () const
void setBodyText (const QString &bodyText)
QString bodyText () const
void setIconID (const QString &iconID)
QString iconID () const
void setButtonText (const QString &text)
QString buttonText () const
void click ()

Static Public Attributes

static const MTheme::ViewType informationType = "information"
static const MTheme::ViewType eventType = "event"

Properties

QString iconID
QString bodyText
QString imageID
QString buttonText

Detailed Description

A class that represents in-process notification banner.

Overview

Variants

Examples

Here's how to launch an event banner from code:

            MInfoBanner *infoBanner = new MInfoBanner(MInfoBanner::Event);
            infoBanner->setImageID("icon-l-email");
            infoBanner->setBodyText(
                //% "<b>Ida Taipale</b><br/>Have you seen my dog?"
                qtTrId("xx_dialogs_and_notifications_event_banner"));
            infoBanner->setIconID("icon-m-toolbar-send-sms");
            connect(infoBanner, SIGNAL(clicked()), this, SLOT(openMessageBox()));
            infoBanner->appear(MSceneWindow::DestroyWhenDone);
            QTimer::singleShot(3000, infoBanner, SLOT(disappear()));

Here's how to launch an information banner from code:

            MInfoBanner *infoBanner = new MInfoBanner(MInfoBanner::Information);
            infoBanner->setImageID("icon-l-help");
            infoBanner->setBodyText(
                //% "<b>Battery is running low</b>"
                qtTrId("xx_dialogs_and_notifications_information_banner"));
            connect(infoBanner, SIGNAL(clicked()), this, SLOT(openMessageBox()));
            infoBanner->appear(MSceneWindow::DestroyWhenDone);
            QTimer::singleShot(3000, infoBanner, SLOT(disappear()));

Here's how to launch an interactive information banner from code:

            MInfoBanner *infoBanner = new MInfoBanner(MInfoBanner::Information);
            infoBanner->setImageID("icon-l-office-tools");
            infoBanner->setBodyText(
                //% "<b>Incoming call</b>"
                qtTrId("xx_dialogs_and_notifications_system_information_banner"));
            //% "Accept"
            infoBanner->setButtonText(qtTrId("xx_dialogs_and_notifications_system_information_banner_accept"));
            connect(infoBanner, SIGNAL(buttonClicked()), this, SLOT(openMessageBox()));
            infoBanner->appear(MSceneWindow::DestroyWhenDone);

            QTimer::singleShot(3000, infoBanner, SLOT(disappear()));
See also:
MNotification
Deprecated:
MInfoBanner is deprecated, use MBanner for any component with banner requirements

Member Enumeration Documentation

Defines the type of the banner. Event is used for messages & events. Information for i.e. system notifications ("Battery low")

Enumerator:
Information 
Event 

Constructor & Destructor Documentation

MInfoBanner::MInfoBanner ( BannerType  type = Information  ) 

Constructs a new banner object of given type.

Parameters:
type Type of the banner
MInfoBanner::~MInfoBanner (  )  [virtual]

Destructor for banner object


Member Function Documentation

MInfoBanner::BannerType MInfoBanner::bannerType (  ) 

Returns the type of the banner.

Returns:
the type of the banner
QString MInfoBanner::bodyText (  )  const

Returns the body text of the banner.

void MInfoBanner::buttonClicked (  )  [signal]

This signal is emitted when the button in banner is clicked.

QString MInfoBanner::buttonText (  )  const

Returns the text of the information banner button.

void MInfoBanner::click (  ) 

clicks info banner

void MInfoBanner::clicked (  )  [signal]

This signal is emitted when the banner is activated.

QString MInfoBanner::iconID (  )  const

Returns the icon ID of the banner.

QString MInfoBanner::imageID (  )  const

Returns the image ID of the banner.

QPixmap MInfoBanner::pixmap (  )  const

Returns the user defined pixmap.

void MInfoBanner::setBodyText ( const QString bodyText  ) 

Sets the body text for the banner.

Parameters:
body Body text for the banner
void MInfoBanner::setButtonText ( const QString text  ) 

Sets the text for the information banner button.

Parameters:
text for the button
void MInfoBanner::setIconID ( const QString iconID  ) 

Sets the icon for the banner.

Parameters:
iconId Icon ID for the banner (for event banners)
void MInfoBanner::setImageID ( const QString imageID  ) 

Sets the image for the banner.

Parameters:
image Image ID for the banner
void MInfoBanner::setPixmap ( const QPixmap pixmap  ) 

Sets the pixmap for the banner.

Parameters:
user defined pixmap for the banner

Member Data Documentation

const MTheme::ViewType MInfoBanner::eventType = "event" [static]
MInfoBanner::informationType = "information" [static]

View type for information type banner.

View type for event type banner.


Property Documentation

MInfoBanner::bodyText [read, write]

Body text for banner.

MInfoBanner::buttonText [read, write]

Button text for interactive information banner.

MInfoBanner::iconID [read, write]

Icon for banner.

MInfoBanner::imageID [read, write]

Image for banner.


Copyright © 2010 Nokia Corporation
MeeGo Touch