~ubuntu-sdk-team/ubuntu-ui-toolkit/locDemo

« back to all changes in this revision

Viewing changes to modules/Ubuntu/Components/MainView.qml

  • Committer: Christian Dywan
  • Date: 2014-05-19 13:11:32 UTC
  • mfrom: (1041.2.19 staging)
  • Revision ID: christian.dywan@canonical.com-20140519131132-8syc77nqqotvb744
MergeĀ lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/staging

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
        It automatically adds a header and toolbar for its contents and can
28
28
        rotate its content based on the device orientation.
29
29
 
30
 
    The simplest way to use a MainView is to include a \l Page object inside the MainView:
 
30
    The simplest way to use a MainView is to include a single \l Page object
 
31
    inside the MainView:
31
32
    \qml
32
33
        import QtQuick 2.0
33
34
        import Ubuntu.Components 1.1
50
51
    It is not required to set the anchors of the \l Page as it will automatically fill its parent.
51
52
    The MainView has a header that automatically shows the title of the \l Page.
52
53
 
 
54
    Do not include multiple Pages directly inside the MainView, but use \l Tabs
 
55
    or \l PageStack inside MainView to navigate between several Pages.
 
56
 
53
57
    For the MainView to automatically rotate its content following the orientation
54
58
    of the device, set the \l automaticOrientation property to true.
55
59
 
348
352
                          internal.activePage.tools.back.hasOwnProperty("action") ?
349
353
                              internal.activePage.tools.back.action : null
350
354
 
 
355
            contents: internal.activePage ?
 
356
                          internal.activePage.__customHeaderContents : null
 
357
 
351
358
            property Item tabBar: null
352
359
            Binding {
353
360
                target: headerItem