Home · All Classes · Main Classes · Deprecated
Public Member Functions | Properties

MMessageBox Class Reference

MMessageBox provides a dialog for informing the user or for asking the user a question. More...

Inherits MDialog.

List of all members.

Public Member Functions

 MMessageBox (const QString &text=QString(), M::StandardButtons standardButtons=M::OkButton)
 MMessageBox (const QString &title, const QString &text, M::StandardButtons buttons=M::OkButton)
QString text () const
void setText (const QString &text)
QString iconId () const
void setIconId (const QString &iconId)
QPixmap iconPixmap () const
void setIconPixmap (QPixmap &iconPixmap)
virtual ~MMessageBox ()

Properties

QString text
QString iconId

Detailed Description

MMessageBox provides a dialog for informing the user or for asking the user a question.

A MMessageBox is a MDialog that displays text in its central area.

By default a MMessageBox has no central widget, but just the message text in its place. You can still add a central widget to it though, by calling setCentralWidget(). It will then be placed between the title bar and the message text.


Constructor & Destructor Documentation

MMessageBox::MMessageBox ( const QString text = QString(),
M::StandardButtons  standardButtons = M::OkButton 
)

Constructs a message box with the given text and set of standard buttons.

By default, the title bar will be hidden.

Parameters:
text Text to be displayed in the message box.
standardButtons Standard buttons to be put in the button box.
See also:
M::StandardButtons
MMessageBox::MMessageBox ( const QString title,
const QString text,
M::StandardButtons  buttons = M::OkButton 
)

Constructs a message box with the given title, text and set of standard buttons.

Parameters:
title Dialog's title to be displayed by the message.
text Text to be displayed in the message box.
buttons Standard buttons to be put in the button box.
See also:
M::StandardButtons
MMessageBox::~MMessageBox (  )  [virtual]

Destructor.


Member Function Documentation

QString MMessageBox::iconId (  )  const

Returns the dialog's icon id.

Returns:
Icon being displayed in the message box.
See also:
setIconId(), iconPixmap(), setIconPixmap()
QPixmap MMessageBox::iconPixmap (  )  const

Returns the dialog's icon pixmap.

By default it returns a null pixmap.

Returns:
Pixmap of the icon to be displayed in the message box.
See also:
setIconPixmap(), iconId(), setIconId()
void MMessageBox::setIconId ( const QString iconId  ) 

Sets the dialog's icon.

iconId() has a lower priority than iconPixmap(). If iconPixmap() contains a valid (non-null) Pixmap, the message box icon will be taken from it instead of from iconId().

Parameters:
iconId Logical id of the icon to be displayed in the message box.
See also:
iconId(), iconPixmap(), setIconPixmap()
void MMessageBox::setIconPixmap ( QPixmap iconPixmap  ) 

Sets the dialog's icon pixmap.

Parameters:
iconPixmap Pixmap of the icon to be used in the message box.
See also:
iconPixmap(), iconId(), setIconId()
void MMessageBox::setText ( const QString text  ) 

Sets the dialog's text.

Parameters:
text Text to be displayed in the message box.
See also:
text()
QString MMessageBox::text (  )  const

Returns the dialog's text.

Returns:
Text being displayed in the message box.
See also:
setText()

Property Documentation

QString MMessageBox::iconId [read, write]
QString MMessageBox::text [read, write]

Copyright © 2010 Nokia Corporation
MeeGo Touch