~dan-lin/mixxx/qml

« back to all changes in this revision

Viewing changes to mixxx/res/skins/Sandbox-QML/main.qml

  • Committer: Daniel Lindenfelser
  • Date: 2012-01-05 14:16:51 UTC
  • Revision ID: daniel@lindenfelser.de-20120105141651-8rq5t2fb32ul147b
prepare sandbox to implement waveform rendering

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
        
14
14
 
15
15
        MixxxWaveform {
16
 
                id: library
 
16
        id: waveform1
 
17
        channel: "[Channel1]"
17
18
        x: 0
18
19
        y: 0
19
20
        width: window.width 
20
 
                height: window.height
21
 
        }
22
 
 
23
 
 
24
 
    /*
25
 
    MixxxWaveform {
26
 
        id: channel_3_overview
27
 
        channel: "[Channel2]"
28
 
        x: 200
29
 
        y: 300
30
 
        width: window.height
31
 
        height: 200
32
 
        /*
33
 
        color: "#000000"
34
 
        colorMarker: "#ffffff"
35
 
        colorSignal: "#333333"
36
 
        colorProgress: "#ffffff"
37
 
        alphaProgress: 255
38
 
 
39
 
        rotation: 90
40
 
    }
41
 
*/
42
 
    /*
43
 
    MixxxWaveform {
44
 
        id: test1
45
 
 
46
 
        channel: "[Channel1]"
47
 
        x: 200
48
 
        y: 0
49
 
        width: window.width - 400
50
 
        height: window.height / 4
51
 
    }
52
 
 
53
 
    MixxxWaveform {
54
 
        id: test2
55
 
        channel: "[Channel2]"
56
 
 
57
 
        x: 200
58
 
        y: window.height / 4
59
 
        width: window.width - 400
60
 
        height: window.height / 4
61
 
    }
62
 
*/
63
 
 
64
 
/*
65
 
        MixxxOverview {
66
 
        id: channel_1_overview
67
 
        channel: "[Channel1]"
68
 
        x: 200
69
 
                y: 0
70
 
                width: window.height
71
 
        height: 200
72
 
                
73
 
                color: "#000000"
74
 
        colorMarker: "#ffffff"
75
 
        colorSignal: "#ff0000"
76
 
                colorProgress: "#ffffff"
77
 
        alphaProgress: 80
78
 
                
79
 
                rotation: 90
80
 
        }
81
 
 
82
 
    MixxxOverview {
83
 
        id: channel_2_overview
84
 
        channel: "[Channel2]"
85
 
        x: window.width
86
 
                y: 0
87
 
                width: window.height
88
 
        height: 200
89
 
 
90
 
                color: "#000000"
91
 
        colorMarker: "#ffffff"
92
 
        colorSignal: "#0000ff"
93
 
                colorProgress: "#ffffff"
94
 
        alphaProgress: 80
95
 
 
96
 
        rotation: 90
97
 
    }
98
 
 
99
 
 
100
 
        Connections {
101
 
                target: MixxxEngine
102
 
                onMixxxEvent: {
103
 
                        switch (eventKey) {
104
 
                                case '[Channel2],play':
105
 
                                        play_button.active = value
106
 
                                        break
107
 
                                case '[Channel2],newTrackLoaded':
108
 
                                        console.log(MixxxEngine.getTrackProperty('[Channel2]', 'title'))
109
 
                                        break
110
 
                                default:
111
 
                                        console.log("onMixxxEvent")
112
 
                                        console.log("eventKey: " + eventKey)
113
 
                                        console.log("value: " + value)
114
 
                                        break
115
 
                        }
116
 
                }
117
 
                onMixxxInitialized: {
118
 
                        MixxxEngine.enableEvent("[Channel2]","play");
119
 
                        MixxxEngine.enablePlayerEvents("[Channel2]");
120
 
                }
121
 
         }
122
 
         
123
 
         
124
 
         
125
 
        // Play Button
126
 
        Item {
127
 
                id: dadadsad
128
 
                property bool active: false
129
 
                
130
 
                anchors.left: parent.left
131
 
                anchors.leftMargin: 100
132
 
                anchors.bottom: parent.bottom
133
 
                anchors.bottomMargin: 3
134
 
                
135
 
                width: 60
136
 
                height: 40
137
 
 
138
 
                Image {
139
 
                        source: 'images/buttons/play.png'
140
 
                }
141
 
 
142
 
 
143
 
                MouseArea {
144
 
                        anchors.fill: parent
145
 
                        onClicked: {
146
 
                                MixxxEngine.setValue("[Channel2]", "play", 1);
147
 
                        }
148
 
                }
149
 
        }
150
 
         
151
 
        
152
 
        
153
 
        // Play Button
154
 
        Item {
155
 
                id: play_button
156
 
                property bool active: false
157
 
                
158
 
                anchors.left: parent.left
159
 
                anchors.leftMargin: 3
160
 
                anchors.bottom: parent.bottom
161
 
                anchors.bottomMargin: 3
162
 
                
163
 
                width: 60
164
 
                height: 40
165
 
                
166
 
                Image {
167
 
                        source: 'images/buttons/play.png'
168
 
                        visible: !parent.active
169
 
                }
170
 
                
171
 
                Image {
172
 
                        source: 'images/buttons/play_active.png'
173
 
                        visible: parent.active
174
 
                }
175
 
                
176
 
                MouseArea {
177
 
                        anchors.fill: parent
178
 
                        onClicked: {
179
 
                                parent.active = !parent.active;
180
 
                                MixxxEngine.setValue("[Channel2]", "play", parent.active);
181
 
                        }
182
 
                }
183
 
        }    
184
 
        */
 
21
        height: window.height / 2
 
22
        }
 
23
 
 
24
    MixxxWaveform {
 
25
        id: waveform2
 
26
        channel: "[Channel2]"
 
27
        x: 0
 
28
        y: window.height / 2
 
29
        width: window.width
 
30
        height: window.height / 2
 
31
    }
 
32
 
 
33
    // Play Button
 
34
    Item {
 
35
        id: play_button_1
 
36
        property bool active: false
 
37
 
 
38
        anchors.left: parent.left
 
39
        anchors.leftMargin: 3
 
40
        anchors.bottom: parent.bottom
 
41
        anchors.bottomMargin: 3
 
42
 
 
43
        width: 60
 
44
        height: 40
 
45
 
 
46
        Image {
 
47
            source: '../Dynamixxx-QML/images/buttons/play.png'
 
48
            visible: !parent.active
 
49
        }
 
50
 
 
51
        Image {
 
52
            source: '../Dynamixxx-QML/images/buttons/play_active.png'
 
53
            visible: parent.active
 
54
        }
 
55
 
 
56
        MouseArea {
 
57
            anchors.fill: parent
 
58
            onClicked: {
 
59
                parent.active = !parent.active;
 
60
                MixxxEngine.setValue("[Channel1]", "play", parent.active);
 
61
            }
 
62
        }
 
63
    }
 
64
 
 
65
    // Play Button
 
66
    Item {
 
67
        id: play_button_2
 
68
        property bool active: false
 
69
 
 
70
        anchors.right: parent.right
 
71
        anchors.rightMargin: 3
 
72
        anchors.bottom: parent.bottom
 
73
        anchors.bottomMargin: 3
 
74
 
 
75
        width: 60
 
76
        height: 40
 
77
 
 
78
        Image {
 
79
            source: '../Dynamixxx-QML/images/buttons/play.png'
 
80
            visible: !parent.active
 
81
        }
 
82
 
 
83
        Image {
 
84
            source: '../Dynamixxx-QML/images/buttons/play_active.png'
 
85
            visible: parent.active
 
86
        }
 
87
 
 
88
        MouseArea {
 
89
            anchors.fill: parent
 
90
            onClicked: {
 
91
                parent.active = !parent.active;
 
92
                MixxxEngine.setValue("[Channel2]", "play", parent.active);
 
93
            }
 
94
        }
 
95
    }
185
96
}