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...

Inheritance diagram for MMessageBox:
Inheritance graph
[legend]
Collaboration diagram for MMessageBox:
Collaboration graph
[legend]

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)
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.

Definition at line 38 of file corelib/widgets/mmessagebox.h.


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

Definition at line 31 of file mmessagebox.cpp.

    : MDialog(new MMessageBoxPrivate, buttons, new MMessageBoxModel, MSceneWindow::MessageBox)
{
    setText(text);

    setCentralWidget(0);
}

Here is the call graph for this function:

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

Definition at line 39 of file mmessagebox.cpp.

    : MDialog(new MMessageBoxPrivate, buttons, new MMessageBoxModel, MSceneWindow::MessageBox)
{
    setTitle(title);
    setText(text);

    setCentralWidget(0);
}

Here is the call graph for this function:

MMessageBox::~MMessageBox (  )  [virtual]

Destructor.

Definition at line 48 of file mmessagebox.cpp.

{
}


Member Function Documentation

QString MMessageBox::iconId (  )  const

Returns the dialog's icon id.

Returns:
Icon being displayed in the message box.
See also:
setIconId()
void MMessageBox::setIconId ( const QString iconId  ) 

Sets the dialog's icon.

Parameters:
iconId Logical icon id to be displayed as message box icon.
See also:
iconId()

Definition at line 67 of file mmessagebox.cpp.

{
    model()->setIconId(iconId);
}

Here is the call graph for this function:

void MMessageBox::setText ( const QString text  ) 

Sets the dialog's text.

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

Definition at line 57 of file mmessagebox.cpp.

{
    model()->setText(text);
}

Here is the call graph for this function:

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]

Definition at line 44 of file corelib/widgets/mmessagebox.h.

QString MMessageBox::text [read, write]

Definition at line 43 of file corelib/widgets/mmessagebox.h.


Copyright © 2010 Nokia Corporation Generated on Thu Nov 4 2010 18:14:26 (PDT)
Doxygen 1.7.1
MeeGo Touch