annotate cagou/plugins/plugin_wid_remote.kv @ 238:7918a5668304

plugin remote: remote controllers plugin first draft: this plugin handle ad-hoc commands and media controllers in a easy way.
author Goffi <goffi@goffi.org>
date Fri, 31 Aug 2018 17:01:31 +0200
parents
children cf61a011f731
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
238
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
1 # Cagou: desktop/mobile frontend for Salut à Toi XMPP client
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
2 # Copyright (C) 2016-2018 Jérôme Poisson (goffi@goffi.org)
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
3
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
4 # This program is free software: you can redistribute it and/or modify
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
5 # it under the terms of the GNU Affero General Public License as published by
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
6 # the Free Software Foundation, either version 3 of the License, or
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
7 # (at your option) any later version.
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
8
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
9 # This program is distributed in the hope that it will be useful,
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
12 # GNU Affero General Public License for more details.
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
13
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
14 # You should have received a copy of the GNU Affero General Public License
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
16
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
17
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
18 <RemoteControl>:
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
19 float_layout: float_layout
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
20 layout: layout
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
21 FloatLayout:
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
22 id: float_layout
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
23 ScrollView:
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
24 size_hint: 1, 1
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
25 pos_hint: {'x': 0, 'y': 0}
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
26 do_scroll_x: False
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
27 scroll_type: ['bars', 'content']
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
28 bar_width: dp(6)
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
29 StackLayout:
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
30 id: layout
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
31 size_hint: 1, None
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
32 height: self.minimum_height
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
33 spacing: 0
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
34
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
35
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
36 <RemoteItemWidget>:
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
37 shared: False
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
38 Symbol:
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
39 size_hint: 1, None
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
40 height: dp(80)
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
41 symbol: 'video'
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
42 margin: dp(40)
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
43 color: 0, 0, 0, 1
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
44 Label:
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
45 size_hint: None, None
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
46 width: dp(100)
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
47 font_size: sp(14)
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
48 text_size: dp(95), None
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
49 size: self.texture_size
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
50 text: root.name
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
51 halign: 'center'
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
52
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
53
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
54 <PlayerLabel@Label>:
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
55 size_hint: 1, None
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
56 text_size: self.width, None
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
57 size: self.texture_size
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
58 halign: 'center'
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
59
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
60
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
61 <PlayerButton@SymbolButton>:
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
62 size_hint: None, 1
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
63
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
64
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
65 <MediaPlayerControlWidget>:
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
66 orientation: 'vertical'
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
67 PlayerLabel:
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
68 text: root.title
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
69 bold: True
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
70 font_size: '20sp'
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
71 PlayerLabel:
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
72 text: root.identity
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
73 font_size: '15sp'
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
74 Widget:
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
75 size_hint: 1, None
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
76 height: dp(50)
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
77 BoxLayout:
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
78 size_hint: 1, None
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
79 spacing: dp(20)
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
80 height: dp(30)
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
81 Widget:
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
82 PlayerButton:
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
83 symbol: "previous"
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
84 on_release: root.do_cmd("Previous")
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
85 PlayerButton:
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
86 symbol: "fast-bw"
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
87 on_release: root.do_cmd("GoBack")
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
88 PlayerButton:
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
89 symbol: root.status
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
90 on_release: root.do_cmd("PlayPause")
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
91 PlayerButton
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
92 symbol: "fast-fw"
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
93 on_release: root.do_cmd("GoFW")
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
94 PlayerButton
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
95 symbol: "next"
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
96 on_release: root.do_cmd("Next")
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
97 Widget:
7918a5668304 plugin remote: remote controllers plugin first draft:
Goffi <goffi@goffi.org>
parents:
diff changeset
98 Widget: