Debian Codegraph @

src/imports/Components/2.0/PageHeadConfiguration.qml

raw
1 /*
2 * Copyright 2016 Canonical Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16 import QtQuick 2.4
17 import Lomiri.Components
18
19 /*!
20 \internal
21 documented in PageHeadConfiguration.qdoc
22 */
23 Item {
24 // To be used inside a Page only.
25 id: headerConfig
26
27 property list<Action> actions
28 property Action backAction: null
29 property Item contents: null
30
31 QtObject {
32 id: internal
33 property Item oldContents: null
34 }
35 onContentsChanged: {
36 if (internal.oldContents) {
37 // FIX: bug #1341814 and #1400297
38 // We have to force the removal of the previous head.contents
39 // in order to show the new contents
40 internal.oldContents.parent = null;
41 }
42 internal.oldContents = contents;
43 }
44
45 property string preset: ""
46 /*!
47 \qmlproperty PageHeadSections sections
48 */
49 readonly property alias sections: headSections
50 PageHeadSections {
51 id: headSections
52 }
53 property color foregroundColor: theme.palette.normal.backgroundText
54
55 property bool locked: false
56
57 property string title
58 property Flickable flickable
59 }