Test build
Test build
Public Slots | Signals | Public Member Functions | Properties

MApplicationWindow Class Reference

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

#include <mapplicationwindow.h>

Inherits MWindow.

List of all members.

Public Slots

void openMenu ()
void closeMenu ()
void setWindowIconID (const QString &windowIconID)
void setToolbarViewType (const MTheme::ViewType &viewType)

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

Properties

MTheme::ViewType toolbarViewType

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.

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.

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

MTheme::ViewType MApplicationWindow::toolbarViewType (  )  const

Returns the view type of the toolbar for the window.

See also:
setToolbarViewType()
QString MApplicationWindow::windowIconID (  )  const

Returns the iconID of the icon of the window.


Property Documentation

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

MeeGo API