~ubuntu-branches/ubuntu/trusty/webbrowser-app/trusty

« back to all changes in this revision

Viewing changes to src/app/webcontainer/AccountsView.qml

  • Committer: Package Import Robot
  • Author(s): Ubuntu daily release
  • Date: 2014-03-04 15:07:25 UTC
  • mfrom: (1.1.38)
  • Revision ID: package-import@ubuntu.com-20140304150725-fy2r20qdg637d5v5
Tags: 0.23+14.04.20140304-0ubuntu1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright 2013 Canonical Ltd.
 
3
 *
 
4
 * This file is part of webbrowser-app.
 
5
 *
 
6
 * webbrowser-app is free software; you can redistribute it and/or modify
 
7
 * it under the terms of the GNU General Public License as published by
 
8
 * the Free Software Foundation; version 3.
 
9
 *
 
10
 * webbrowser-app is distributed in the hope that it will be useful,
 
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
 * GNU General Public License for more details.
 
14
 *
 
15
 * You should have received a copy of the GNU General Public License
 
16
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
17
 */
 
18
 
 
19
import QtQuick 2.0
 
20
import Ubuntu.Components 0.1
 
21
import Ubuntu.Components.ListItems 0.1 as ListItem
 
22
 
 
23
Item {
 
24
    id: root
 
25
 
 
26
    property var model
 
27
 
 
28
    signal accountSelected(QtObject accountServiceHandle)
 
29
 
 
30
    ListView {
 
31
        id: accounts
 
32
 
 
33
        anchors.fill: parent
 
34
 
 
35
        model: root.model
 
36
 
 
37
        header: ListItem.Header {
 
38
            text: i18n.tr("Select an account");
 
39
        }
 
40
 
 
41
        delegate: AccountItemView {
 
42
            visible: enabled
 
43
 
 
44
            accountName: providerName + ": " + displayName
 
45
 
 
46
            onClicked: {
 
47
                root.accountSelected(accountServiceHandle)
 
48
            }
 
49
        }
 
50
    }
 
51
}
 
52
 
 
53