blob: 07ce53e7dc88e59d90d4b7c5e06fd4d84b499f25 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
// Copyright (C) 2021 The Qt Company Ltd.
// Copyright (C) 2019 Luxoft Sweden AB
// Copyright (C) 2018 Pelagicore AG
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
//! [0]
import QtQuick
import Example.If.AddressBookModule.simulation
Item {
AddressBookBackend {
id: backend
property var settings : IfSimulator.findData(IfSimulator.simulationData, "AddressBook")
function initialize() {
print("AddressBookSimulation INITIALIZE")
IfSimulator.initializeDefault(settings, backend)
Base.initialize()
}
function insertContact(reply, index, contact) {
print("BACKEND SIMULATION INSERT CONTACT")
contacts.insert(index, contact);
reply.setSuccess(true);
}
Component.onCompleted: {
console.log("BACKEND SIMULATION CREATED")
}
}
}
//! [0]
|