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

MSheet Class Reference

A full screen scene window used to display complex or multi-step subtasks. More...

Inherits MSceneWindow.

List of all members.

Public Member Functions

 MSheet ()
virtual ~MSheet ()
QGraphicsWidgetcentralWidget ()
void setCentralWidget (QGraphicsWidget *widget)
QGraphicsWidgetheaderWidget ()
void setHeaderWidget (QGraphicsWidget *widget)
void appearSystemwide (MSceneWindow::DeletionPolicy policy)
void setHeaderVisible (bool visible)
bool isHeaderVisible () const

Properties

bool headerVisible

Detailed Description

A full screen scene window used to display complex or multi-step subtasks.

Overview

The sheet is a self-contained full screen scene window that slides up from the bottom of the screen. It is used to interrupt the application's main workflow temporarily and gather or display some key information immediately. A sheet is especially appropriate for isolating a potentially complex or multistep subtask.

Use a sheet when you want to....

A sheet is not used when...

Anatomy

The sheet always...

The sheet contains...

The sheet never...

The sheet encourages...


Constructor & Destructor Documentation

MSheet::MSheet (  ) 

Constructs a new sheet.

MSheet::~MSheet (  )  [virtual]

Destroys the sheet.


Member Function Documentation

void MSheet::appearSystemwide ( MSceneWindow::DeletionPolicy  policy  ) 

Makes the sheet appear systemwide.

The sheet will appear on its own stand-alone MWindow and separate scene. It will be fullscreen, providing no status bar.

QGraphicsWidget * MSheet::centralWidget (  ) 

Returns the central widget of the sheet.

By default a sheet provides a plain QGraphicsWidget on which other widgets can be placed. It's also possible to set a central widget for a sheet with setCentralWidget().

Returns:
the pointer to the central widget.
See also:
setCentralWidget()
QGraphicsWidget * MSheet::headerWidget (  ) 

Returns the widget on sheet's header.

By default a sheet provides a plain QGraphicsWidget on which other widgets can be placed. It's also possible to replace it with setHeaderWidget().

Typical usage is to set a layout of MButtons to it.

      QGraphicsLayout *headerLayout = new QGraphicsLinearLayout(sheet->headerWidget());
      headerLayout->addItem(new MButton("Cancel"));
      headerLayout->addStretch();
      headerLayout->addItem(new MButton("Save"));

For most common cases (such as the example above) you should consider using MBasicSheetHeader.

See also:
setHeaderWidget(), MBasicSheetHeader
bool MSheet::isHeaderVisible (  )  const

Returns whether the header is visible.

void MSheet::setCentralWidget ( QGraphicsWidget widget  ) 

Sets the given widget to be the sheet's central widget.

Note:
MSheet takes ownership of widget and deletes it at the appropriate time.
Parameters:
widget the central widget.
See also:
centralWidget()
void MSheet::setHeaderVisible ( bool  visible  ) 

Sets whether the header should be visible.

Parameters:
visible true to show the header and false to hide it
void MSheet::setHeaderWidget ( QGraphicsWidget widget  ) 

Sets the widget to be placed on sheet's header.

Note:
MSheet takes ownership of widget and deletes it at the appropriate time.
Parameters:
widget the widget to be placed on sheet's header
See also:
headerWidget()

Property Documentation

MSheet::headerVisible [read, write]

Defines whether the header should be visible By default this property is true (header is shown).


Copyright © 2010 Nokia Corporation
MeeGo Touch