Home · All Classes · Main Classes · Deprecated
Public Types | 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 Types

enum  SystemwideModeOrientation { FollowsDeviceOrientation = 0, FollowsCurrentAppWindowOrientation, LockedToPortraitOrientation, LockedToLandscapeOrientation }

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
void setHeaderFloating (bool floating)
bool isHeaderFloating () const
void setStatusBarVisibleInSystemwide (bool visible)
bool isStatusBarVisibleInSystemwide () const
SystemwideModeOrientation systemwideModeOrientation () const
void setSystemwideModeOrientation (SystemwideModeOrientation orientation)
bool isCentralWidgetSizePolicyRespected () const
void setCentralWidgetSizePolicyRespected (bool enabled)

Properties

bool headerVisible
bool headerFloating
bool statusBarVisibleInSystemwide
SystemwideModeOrientation systemwideModeOrientation
bool centralWidgetSizePolicyRespected

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


Member Enumeration Documentation

This enum describes the possible behaviors of the sheet's orientation when it's displayed systemwide.

See also:
appearSystemwide()
Enumerator:
FollowsDeviceOrientation 

Follows the device orientation.

FollowsCurrentAppWindowOrientation 

Follows the orientation of the current application window. E.g. if it's launched on top of an app. that's locked to portrait the sheet will also be (and remain) in portrait.

LockedToPortraitOrientation 

Locked to portrait orientation.

LockedToLandscapeOrientation 

Locked to landscape orientation.


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.

By default it will be fullscreen, providing no status bar. That can be changed with setStatusBarVisibleInSystemwide(true).

You can change the orientation behavior of the systemwide sheet by calling setSystemwideModeOrientation() before this method.

See also:
MSheet::statusBarVisibleInSystemwide, MSheet::systemwideModeOrientation
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::isCentralWidgetSizePolicyRespected (  )  const

Returns whether central widget's size policy is being respected.

bool MSheet::isHeaderFloating (  )  const

Returns whether the header is overlapping the central widget.

bool MSheet::isHeaderVisible (  )  const

Returns whether the header is visible.

bool MSheet::isStatusBarVisibleInSystemwide (  )  const

Returns whether the status bar will be visible for systemwide appearances.

See also:
setStatusBarVisibleInSystemwide(), appearSystemwide()
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::setCentralWidgetSizePolicyRespected ( bool  enabled  ) 

Sets whether central widget's size policy should be respected.

void MSheet::setHeaderFloating ( bool  floating  ) 

Sets whether the header should overlap the central widget.

Parameters:
floating true if it should overlap the central widget content, false to take required size.
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()
void MSheet::setStatusBarVisibleInSystemwide ( bool  visible  ) 

Sets whether the status bar will be visible for systemwide appearances.

See also:
isStatusBarVisibleInSystemwide(), appearSystemwide()
void MSheet::setSystemwideModeOrientation ( MSheet::SystemwideModeOrientation  orientation  ) 

Sets the orientation behavior for systemwide a appearance.

See also:
appearSystemwide()
SystemwideModeOrientation MSheet::systemwideModeOrientation (  )  const

Returns the orientation behavior when sheet appears systemwide.

See also:
appearSystemwide()

Property Documentation

MSheet::centralWidgetSizePolicyRespected [read, write]

Whether central widget's size policy should be used/respected.

If true, MSheet will consider central widget's size policy when setting its geometry.

If false, central widget will always have the size of sheet's central area regardless of his size policy. It effectively works as if his size policy was set to QSizePolicy::Expanding on both directions.

By default this property is false.

MSheet::headerFloating [read, write]

Defines whether the header should be overlapping the central widget or adjusting its size By default this property is false (header is not overlapping the central widget).

MSheet::headerVisible [read, write]

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

MSheet::statusBarVisibleInSystemwide [read, write]

Defines whether the status bar should be visible when sheet appears systemwide.

To get a proper animation of a systemwide appearance you should set this property before calling appearSystemwide().

This property has an effect only with sheets that are displayed with appearSystemwide().

By default this property is false (status bar not visible for systemwide appearances).

MSheet::systemwideModeOrientation [read, write]

Orientation of the sheet when it appears systemwide.

This property affects only sheets that are shown with appearSystemwide(). You should set this property before calling appearSystemwide().

The default value of this property is FollowsDeviceOrientation.

See also:
appearSystemwide()

Copyright © 2010 Nokia Corporation
MeeGo Touch