Test build |
Test build |
The MApplicationWindow class provides a top-level application window. More...
#include <mapplicationwindow.h>
Inherits MWindow.
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().
| MApplicationWindow::MApplicationWindow | ( | QWidget * | parent = 0 |
) | [explicit] |
Creates an application window. A scene and scene manager are created automatically.
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.
| 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.
| view | type of the toolbar; possible values are MToolBar::tabType, MToolBar::defaultType |
| 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.
| QString MApplicationWindow::windowIconID | ( | ) | const |
Returns the iconID of the icon of the window.
MTheme::ViewType MApplicationWindow::toolbarViewType [read, write] |
| MeeGo API |