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

MApplicationWindow Class Reference

The MApplicationWindow class provides a top-level application window. More...

Inherits MWindow.

List of all members.

Public Slots

void openMenu ()
void closeMenu ()
void setWindowIconID (const QString &windowIconID)
void setToolbarViewType (const MTheme::ViewType &viewType)
void setStyleName (const QString &name)
void setNavigationBarOpacity (qreal opacity)

Signals

void pageChanged (MApplicationPage *page)

Public Member Functions

 MApplicationWindow (QWidget *parent=0)
 MApplicationWindow (MScene *scene, QWidget *parent=0)
virtual ~MApplicationWindow ()
MApplicationPagecurrentPage () const
QString windowIconID () const
MTheme::ViewType toolbarViewType () const
bool isMenuOpen () const
void updateChainTaskData ()
QString styleName () const
qreal navigationBarOpacity () const

Properties

MTheme::ViewType toolbarViewType
qreal navigationBarOpacity

Detailed Description

The MApplicationWindow class provides a top-level application window.

The application window provides a framework for building an user interface. The window provides the navigation bar common to all applications, which includes the home and close buttons, a toolbar (in landscape orientation) as well as the application menu.

A minimum application that shows one window would look like this:

  #include <MApplication>
  #include <MApplicationWindow>

  int main(int argc, char *argv[]){
      MApplication application(argc, argv);
      MApplicationWindow window;
      window.show();
      return application.exec();
   }

To insert content into the window, a MApplicationPage has to be created and shown.

In contrast to MWindow, MApplicationWindow already contains a QGraphicsScene and MSceneManager, so that orientation changes and in-scene windows such as MDialog and MApplicationPage windows are automatically managed.

Also MApplicationWindows, unlike plain MWindows, have rounded corners enabled by default. Check MWindow::roundedCornersEnabled property for more information.

Full screen mode

When an application window is in full screen mode (see QWidget::showFullScreen()) it loses its status bar. To have the status bar again you have to go back to normal mode (see QWidget::Normal()).

Please note that the full screen mode of an application window is orthogonal to the presence of the navigation bar and navigation controls (home button and escape button). The presence of those is set via MApplicationPage::setComponentsDisplayMode().


Constructor & Destructor Documentation

MApplicationWindow::MApplicationWindow ( QWidget parent = 0  )  [explicit]

Creates an application window. A scene and scene manager are created automatically.

MApplicationWindow::MApplicationWindow ( MScene scene,
QWidget parent = 0 
) [explicit]

Creates an application window as a view for the given scene. A scene manager is created for the scene.

MApplicationWindow::~MApplicationWindow (  )  [virtual]

Destroys the main window.


Member Function Documentation

void MApplicationWindow::closeMenu (  )  [slot]

Closes the application menu of the window.

MApplicationPage * MApplicationWindow::currentPage (  )  const

Returns a pointer to the application page that is currently being displayed. /sa pageChanged()

bool MApplicationWindow::isMenuOpen (  )  const

Returns true if the menu is opened otherwise false.

qreal MApplicationWindow::navigationBarOpacity (  )  const

Returns current opacity of the navigation bar.

See also:
QGraphicsItem::opacity()
void MApplicationWindow::openMenu (  )  [slot]

Opens the application menu of the window, provided that there are some actions on the current application page.

void MApplicationWindow::pageChanged ( MApplicationPage page  )  [signal]
void MApplicationWindow::setNavigationBarOpacity ( qreal  opacity  )  [slot]

Sets the opacity of the navigation bar.

See also:
QGraphicsItem::setOpacity()
void MApplicationWindow::setStyleName ( const QString name  )  [slot]

Set the style name to name.

This function sets the style name property of the application window to name and reloads application window style. The style name is used to select a style with a matching name from the theme.

See also:
styleName()
void MApplicationWindow::setToolbarViewType ( const MTheme::ViewType viewType  )  [slot]

Sets the view type of the toolbar for the window.

Parameters:
view type of the toolbar; possible values are MToolBar::tabType, MToolBar::defaultType
See also:
MToolBar
void MApplicationWindow::setWindowIconID ( const QString windowIconID  )  [slot]

Sets the new icon of the window.

QString MApplicationWindow::styleName (  )  const

Returns the style name of the application window.

MTheme::ViewType MApplicationWindow::toolbarViewType (  )  const

Returns the view type of the toolbar for the window.

See also:
setToolbarViewType()
void MApplicationWindow::updateChainTaskData (  ) 

This function updates the chain task data.

Do not use this function unless you really know what you are doing !

It is used to get the displaying of window animations and the displaying of chained tasks in the switcher view right.

QString MApplicationWindow::windowIconID (  )  const

Returns the iconID of the icon of the window.


Property Documentation

qreal MApplicationWindow::navigationBarOpacity [read, write]
MTheme::ViewType MApplicationWindow::toolbarViewType [read, write]

Copyright © 2010 Nokia Corporation
MeeGo Touch