~tpeeters/ubuntu-ui-toolkit/page13

« back to all changes in this revision

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

  • Committer: Tim Peeters
  • Date: 2015-03-17 17:44:57 UTC
  • Revision ID: tim.peeters@canonical.com-20150317174457-8caxl7bc0tnpctp7
remove deprecated code and properties from Page13

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
 */
16
16
 
17
17
import QtQuick 2.4
18
 
import Ubuntu.Components 1.2 as Toolkit
 
18
//import Ubuntu.Components 1.2 as Toolkit
19
19
 
20
20
/*!
21
21
  \internal
36
36
 
37
37
    property string title: parentNode && parentNode.hasOwnProperty("title") ? parentNode.title : ""
38
38
 
39
 
    // deprecated
40
 
    property Item tools: toolsLoader.item
41
 
 
42
 
    Loader {
43
 
        id: toolsLoader
44
 
        source: internal.header && internal.header.useDeprecatedToolbar ? "ToolbarItems.qml" : ""
45
 
        asynchronous: true
46
 
    }
47
 
 
48
 
    /*!
49
 
      \internal
50
 
      \deprecated
51
 
      Set this property to replace the title label in the header by any Item.
52
 
      It will be automatically anchored to fill the title space in the header.
53
 
     */
54
 
    property Item __customHeaderContents: null
55
 
 
56
39
    property Flickable flickable: internal.getFlickableChild(page)
57
40
 
58
 
    /*! \internal */
59
 
    onActiveChanged: {
60
 
        internal.updateActions();
61
 
    }
62
 
 
63
 
    /*!
64
 
      \qmlproperty list<Action> actions
65
 
     */
66
 
    property alias actions: actionContext.actions
67
 
 
68
41
    Object {
69
42
        id: internal
70
43
 
71
 
        // Toolkit ActionContext registers automatically to ActionManager
72
 
        Toolkit.ActionContext {
73
 
            id: actionContext
74
 
        }
75
 
 
76
 
        function updateActions() {
77
 
            actionContext.active = page.active;
78
 
        }
79
 
 
80
44
        property AppHeader header: page.__propagated && page.__propagated.header ? page.__propagated.header : null
81
45
        // Used to position the Page when there is no flickable.
82
46
        // When there is a flickable, the header will automatically position it.
83
47
        property real headerHeight: internal.header && internal.header.visible ? internal.header.height : 0
84
48
 
85
 
        Binding {
86
 
            target: tools
87
 
            property: "pageStack"
88
 
            value: page.pageStack
89
 
            when: tools && tools.hasOwnProperty("pageStack")
90
 
        }
91
 
        Binding {
92
 
            target: tools
93
 
            property: "visible"
94
 
            value: false
95
 
            when: internal.header && !internal.header.useDeprecatedToolbar &&
96
 
                  page.tools !== null
97
 
        }
98
 
 
99
49
        function isVerticalFlickable(object) {
100
50
            if (object && object.hasOwnProperty("flickableDirection") && object.hasOwnProperty("contentHeight")) {
101
51
                var direction = object.flickableDirection;