AccountEditor.qml Example File
accounts/assets/AccountEditor.qml
import bb.cascades 1.0
import com.example.bb10samples.pim.accounts 1.0
Page {
id: root
onCreationCompleted: {
_accounts.accountEditor.form = form
}
titleBar: TitleBar {
id: pageTitleBar
acceptAction: ActionItem {
title: (_accounts.accountEditor.mode == AccountEditor.CreateMode ? qsTr ("Create" ) : qsTr ("Save"))
onTriggered: {
_accounts.accountEditor.saveAccount()
navigationPane.pop()
}
}
dismissAction: ActionItem {
title: qsTr ("Cancel")
onTriggered: navigationPane.pop()
}
}
Container {
layout: DockLayout {}
BackgroundImage {
horizontalAlignment: HorizontalAlignment.Fill
verticalAlignment: VerticalAlignment.Fill
}
Container {
leftPadding: 30
topPadding: 30
rightPadding: 30
DropDown {
visible: (_accounts.accountEditor.mode == AccountEditor.CreateMode)
Option {
text: qsTr ("ActiveSync")
value: "activesync"
}
Option {
text: qsTr ("BBM Groups")
value: "bbgroups"
}
Option {
text: qsTr ("BBM")
value: "bbm"
}
Option {
text: qsTr ("CalDAV")
value: "caldav"
}
Option {
text: qsTr ("Call Log")
value: "calllog"
}
Option {
text: qsTr ("CardDAV")
value: "carddav"
}
Option {
text: qsTr ("Evernote")
value: "evernote"
}
Option {
text: qsTr ("Facebook")
value: "facebook"
}
Option {
text: qsTr ("Gist")
value: "gist"
}
Option {
text: qsTr ("Iceberg")
value: "iceberg"
}
Option {
text: qsTr ("IMAP")
value: "imapemail"
}
Option {
text: qsTr ("LinkedIn")
value: "linkedin"
}
Option {
text: qsTr ("Local Calendar")
value: "localcalendar"
}
Option {
text: qsTr ("Local Contacts")
value: "localcontacts"
}
Option {
text: qsTr ("Local Geolocations")
value: "localgeolocation"
}
Option {
text: qsTr ("Local Memos")
value: "localmemos"
}
Option {
text: qsTr ("Local Notebook")
value: "localnotebook"
}
Option {
text: qsTr ("Local Tasks")
value: "localtask"
}
Option {
text: qsTr ("MMS")
value: "mms"
}
Option {
text: qsTr ("POP")
value: "popemail"
}
Option {
text: qsTr ("IM")
value: "retailim"
}
Option {
text: qsTr ("SIM Contacts")
value: "simcontacts"
}
Option {
text: qsTr ("SMS")
value: "sms"
}
Option {
text: qsTr ("SyncML")
value: "syncml"
}
Option {
text: qsTr ("Tags")
value: "tags"
}
Option {
text: qsTr ("TungleProvider")
value: "tungleprovider"
}
Option {
text: qsTr ("Twitter")
value: "twitter"
}
Option {
text: qsTr ("Unified Contacts")
value: "unifiedcontacts"
}
onSelectedValueChanged: _accounts.accountEditor.providerId = selectedValue
}
ScrollView {
horizontalAlignment: HorizontalAlignment.Fill
verticalAlignment: VerticalAlignment.Fill
scrollViewProperties {
scrollMode: ScrollMode.Vertical
}
Container {
id: form
}
}
}
}
}