455743aaa1144bda189abf76f2b3f90c4e4736eb
[apps/mixer.git] / app / Mixer.qml
1 /*
2  * Copyright 2016 Konsulko Group
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 import QtQuick 2.6
18 import QtQuick.Layouts 1.1
19 import QtQuick.Controls 2.0
20 import AGL.Demo.Controls 1.0
21 import Mixer 1.0
22
23 ApplicationWindow {
24         // ----- Signals
25
26         // ----- Properties
27         property Component volumeSlider
28
29         // ----- Setup
30         id: root
31         width: 1080 * roles.scale
32         height: 1487 * roles.scale
33
34         // ----- Childs
35         Label {
36                 id: title
37                 font.pixelSize: 48
38                 text: "Mixer"
39                 anchors.horizontalCenter: parent.horizontalCenter
40         }
41
42         Mixer {
43                 signal sliderVolumeChanged(string role, int value)
44
45                 id: mixer
46
47                 Component.onCompleted: {
48                         mixer.open(bindingAddress);
49                 }
50         }
51
52         ListView {
53                 id: roles
54                 model: mixer.roles
55                 scale: scale_factor
56
57                 anchors.margins: 80
58                 anchors.top: title.bottom
59                 anchors.left: parent.left
60                 anchors.right: parent.right
61                 anchors.bottom: parent.bottom
62
63                 delegate: VolumeSlider {}
64         }
65 }