~phablet-team/telephony-service/trunk

« back to all changes in this revision

Viewing changes to ViewModel.qml

  • Committer: Gustavo Pichorim Boiko
  • Date: 2013-03-12 18:15:29 UTC
  • mto: This revision was merged to the branch mainline in revision 610.
  • Revision ID: gustavo.boiko@canonical.com-20130312181529-rabifvte8sfls914
Rename the main app files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright 2012 Canonical Ltd.
3
 
 *
4
 
 * This file is part of telephony-app.
5
 
 *
6
 
 * telephony-app is free software; you can redistribute it and/or modify
 
2
 * Copyright 2012-2013 Canonical Ltd.
 
3
 *
 
4
 * This file is part of phone-app.
 
5
 *
 
6
 * phone-app is free software; you can redistribute it and/or modify
7
7
 * it under the terms of the GNU General Public License as published by
8
8
 * the Free Software Foundation; version 3.
9
9
 *
10
 
 * telephony-app is distributed in the hope that it will be useful,
 
10
 * phone-app is distributed in the hope that it will be useful,
11
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
13
 * GNU General Public License for more details.
21
21
QtObject {
22
22
    property url source
23
23
    property int tab
24
 
    property bool loaded: telephony.view != undefined && telephony.view.source == source
 
24
    property bool loaded: mainView.view != undefined && mainView.view.source == source
25
25
 
26
26
    function load(properties, clear) {
27
27
        if (properties == undefined) {
28
28
            properties = {};
29
29
        }
30
30
        properties["source"] = source;
31
 
        properties["previousTab"] = telephony.selectedTabIndex;
32
 
        telephony.selectedTabIndex = tab
 
31
        properties["previousTab"] = mainView.selectedTabIndex;
 
32
        mainView.selectedTabIndex = tab
33
33
        if (clear) {
34
 
            telephony.resetView();
 
34
            mainView.resetView();
35
35
        }
36
36
 
37
 
        telephony.viewStack.push(Qt.resolvedUrl(source), properties);
 
37
        mainView.viewStack.push(Qt.resolvedUrl(source), properties);
38
38
    }
39
39
}