~artmello/ubuntu-system-settings/category-list-view

« back to all changes in this revision

Viewing changes to src/SystemSettings/USSAdaptivePageLayout.qml

  • Committer: Bileto Bot
  • Author(s): Jonas G. Drange
  • Date: 2017-01-12 12:48:46 UTC
  • mfrom: (1741.1.28 apl)
  • Revision ID: ci-train-bot@canonical.com-20170112124846-0rsokgs0jy7j9rqv
migrates uss to apl

Approved by: Ken VanDine, system-apps-ci-bot

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * This file is part of system-settings
 
3
 *
 
4
 * Copyright (C) 2017 Canonical Ltd.
 
5
 *
 
6
 * This program is free software: you can redistribute it and/or modify it
 
7
 * under the terms of the GNU General Public License version 3, as published
 
8
 * by the Free Software Foundation.
 
9
 *
 
10
 * This program is distributed in the hope that it will be useful, but
 
11
 * WITHOUT ANY WARRANTY; without even the implied warranties of
 
12
 * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
 
13
 * PURPOSE.  See the GNU General Public License for more details.
 
14
 *
 
15
 * You should have received a copy of the GNU General Public License along
 
16
 * with this program.  If not, see <http://www.gnu.org/licenses/>.
 
17
 */
 
18
 
 
19
import QtQuick 2.0
 
20
import Ubuntu.Components 1.3
 
21
 
 
22
AdaptivePageLayout {
 
23
    id: layout
 
24
 
 
25
    function addFileToNextColumnSync(parentObject, resolvedUrl, properties) {
 
26
        return addComponentToNextColumnSync(parentObject,
 
27
                                            Qt.createComponent(resolvedUrl),
 
28
                                            properties);
 
29
    }
 
30
 
 
31
    function addComponentToNextColumnSync(parentObject, component, properties) {
 
32
        if (typeof(properties) === 'undefined') {
 
33
            properties = {}
 
34
        }
 
35
 
 
36
        var incubator = layout.addPageToNextColumn(parentObject, component, properties)
 
37
        incubator.forceCompletion()
 
38
        return incubator.object
 
39
    }
 
40
}