| Home · All Classes · Main Classes · Deprecated |
The MApplicationWindow class provides a top-level application window. More...


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 () |
| MApplicationPage * | currentPage () const |
| QString | windowIconID () const |
| MTheme::ViewType | toolbarViewType () const |
| bool | isMenuOpen () const |
Properties | |
| MTheme::ViewType | toolbarViewType |
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.
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().
Definition at line 76 of file corelib/widgets/mapplicationwindow.h.
| MApplicationWindow::MApplicationWindow | ( | QWidget * | parent = 0 |
) | [explicit] |
Creates an application window. A scene and scene manager are created automatically.
Definition at line 1007 of file mapplicationwindow.cpp.
: MWindow(*new MApplicationWindowPrivate, new MSceneManager, parent) { Q_D(MApplicationWindow); d->init(); MComponentData::registerWindow(this); }
Creates an application window as a view for the given scene. A scene manager is created for the scene.
Definition at line 1017 of file mapplicationwindow.cpp.
: MWindow(*new MApplicationWindowPrivate, scene, parent) { Q_D(MApplicationWindow); d->init(); MComponentData::registerWindow(this); }
| MApplicationWindow::~MApplicationWindow | ( | ) | [virtual] |
Destroys the main window.
Definition at line 1027 of file mapplicationwindow.cpp.
{
MComponentData::unregisterWindow(this);
}
| void MApplicationWindow::closeMenu | ( | ) | [slot] |
Closes the application menu of the window.
Definition at line 1115 of file mapplicationwindow.cpp.
{
Q_D(MApplicationWindow);
d->closeMenu();
}
| MApplicationPage * MApplicationWindow::currentPage | ( | ) | const |
Returns a pointer to the application page that is currently being displayed. /sa pageChanged()
Definition at line 1032 of file mapplicationwindow.cpp.
{
Q_D(const MApplicationWindow);
return d->page;
}
| bool MApplicationWindow::isMenuOpen | ( | ) | const |
Returns true if the menu is opened otherwise false.
Definition at line 1246 of file mapplicationwindow.cpp.
{
Q_D(const MApplicationWindow);
return d->isMenuOpen();
}
| void MApplicationWindow::openMenu | ( | ) | [slot] |
Opens the application menu of the window, provided that there are some actions on the current application page.
Definition at line 1109 of file mapplicationwindow.cpp.
{
Q_D(MApplicationWindow);
d->openMenu();
}
| void MApplicationWindow::pageChanged | ( | MApplicationPage * | page | ) | [signal] |
| void MApplicationWindow::setToolbarViewType | ( | const MTheme::ViewType & | viewType | ) | [slot] |
Sets the view type of the toolbar for the window.
| view | type of the toolbar; possible values are MToolBar::tabType, MToolBar::defaultType |
Definition at line 1127 of file mapplicationwindow.cpp.
{
Q_D(MApplicationWindow);
d->setToolBarViewType(viewType);
}
| void MApplicationWindow::setWindowIconID | ( | const QString & | windowIconID | ) | [slot] |
Sets the new icon of the window.
Definition at line 1121 of file mapplicationwindow.cpp.
{
Q_D(MApplicationWindow);
d->navigationBar->setViewMenuIconID(windowIconID);
}
| MTheme::ViewType MApplicationWindow::toolbarViewType | ( | ) | const |
Returns the view type of the toolbar for the window.
| QString MApplicationWindow::windowIconID | ( | ) | const |
Returns the iconID of the icon of the window.
Definition at line 1234 of file mapplicationwindow.cpp.
{
Q_D(const MApplicationWindow);
return d->navigationBar->viewMenuIconID();
}
MTheme::ViewType MApplicationWindow::toolbarViewType [read, write] |
Definition at line 79 of file corelib/widgets/mapplicationwindow.h.
| Copyright © 2010 Nokia Corporation | Generated on Thu Nov 4 2010 18:14:24 (PDT) Doxygen 1.7.1 |
MeeGo Touch |