Changeset View
Changeset View
Standalone View
Standalone View
smsapp/qml/ContactList.qml
- This file was copied to smsapp/qml/ConversationList.qml.
Show First 20 Lines • Show All 76 Lines • ▼ Show 20 Line(s) | 76 | function startChat() { | |||
---|---|---|---|---|---|
77 | applicationWindow().pageStack.push(chatView, { person: person.person, device: Qt.binding(function() {return devicesCombo.device })}) | 77 | applicationWindow().pageStack.push(chatView, { person: person.person, device: Qt.binding(function() {return devicesCombo.device })}) | ||
78 | } | 78 | } | ||
79 | onClicked: { startChat(); } | 79 | onClicked: { startChat(); } | ||
80 | } | 80 | } | ||
81 | 81 | | |||
82 | } | 82 | } | ||
83 | footer: ComboBox { | 83 | footer: ComboBox { | ||
84 | id: devicesCombo | 84 | id: devicesCombo | ||
85 | readonly property QtObject device: currentIndex>0 ? model.data(model.index(currentIndex, 0), DevicesModel.DeviceRole) : null | 85 | readonly property QtObject device: currentIndex>=0 ? model.data(model.index(currentIndex, 0), DevicesModel.DeviceRole) : null | ||
86 | enabled: count > 0 | 86 | enabled: count > 0 | ||
87 | displayText: enabled ? undefined : i18n("No devices available") | 87 | displayText: enabled ? undefined : i18n("No devices available") | ||
88 | model: DevicesSortProxyModel { | 88 | model: DevicesSortProxyModel { | ||
89 | //TODO: make it possible to sort only if they can do sms | 89 | //TODO: make it possible to sort only if they can do sms | ||
90 | sourceModel: DevicesModel { displayFilter: DevicesModel.Paired | DevicesModel.Reachable } | 90 | sourceModel: DevicesModel { displayFilter: DevicesModel.Paired | DevicesModel.Reachable } | ||
91 | onRowsInserted: if (devicesCombo.currentIndex < 0) { | 91 | onRowsInserted: if (devicesCombo.currentIndex < 0) { | ||
92 | devicesCombo.currentIndex = 0 | 92 | devicesCombo.currentIndex = 0 | ||
93 | } | 93 | } | ||
94 | } | 94 | } | ||
95 | textRole: "display" | 95 | textRole: "display" | ||
96 | } | 96 | } | ||
97 | } | 97 | } |