annotate libervia/desktop_kivy/plugins/plugin_transfer_voice.kv @ 508:d87b9a6b0b69

doc (calls): updated documentation to describe the new UI features: fix 425
author Goffi <goffi@goffi.org>
date Wed, 25 Oct 2023 15:29:33 +0200
parents b3cedbee561d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
493
b3cedbee561d refactoring: rename `cagou` to `libervia.desktop_kivy` + update imports and names following backend changes
Goffi <goffi@goffi.org>
parents: 491
diff changeset
1 #Libervia Desktop-Kivy
461
3c9ba4a694ef dates update
Goffi <goffi@goffi.org>
parents: 431
diff changeset
2 # Copyright (C) 2016-2021 Jérôme Poisson (goffi@goffi.org)
95
3e3c097b07b7 upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff changeset
3
3e3c097b07b7 upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff changeset
4 # This program is free software: you can redistribute it and/or modify
3e3c097b07b7 upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff changeset
5 # it under the terms of the GNU Affero General Public License as published by
3e3c097b07b7 upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff changeset
6 # the Free Software Foundation, either version 3 of the License, or
3e3c097b07b7 upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff changeset
7 # (at your option) any later version.
3e3c097b07b7 upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff changeset
8
3e3c097b07b7 upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff changeset
9 # This program is distributed in the hope that it will be useful,
3e3c097b07b7 upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff changeset
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
3e3c097b07b7 upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff changeset
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3e3c097b07b7 upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff changeset
12 # GNU Affero General Public License for more details.
3e3c097b07b7 upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff changeset
13
3e3c097b07b7 upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff changeset
14 # You should have received a copy of the GNU Affero General Public License
3e3c097b07b7 upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff changeset
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
3e3c097b07b7 upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff changeset
16
493
b3cedbee561d refactoring: rename `cagou` to `libervia.desktop_kivy` + update imports and names following backend changes
Goffi <goffi@goffi.org>
parents: 491
diff changeset
17 #:import _ libervia.backend.core.i18n._
b3cedbee561d refactoring: rename `cagou` to `libervia.desktop_kivy` + update imports and names following backend changes
Goffi <goffi@goffi.org>
parents: 491
diff changeset
18 #:import IconButton libervia.desktop_kivy.core.common.IconButton
95
3e3c097b07b7 upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff changeset
19
3e3c097b07b7 upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff changeset
20
3e3c097b07b7 upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff changeset
21 <VoiceRecorder>:
3e3c097b07b7 upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff changeset
22 orientation: "vertical"
3e3c097b07b7 upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff changeset
23 counter: counter
3e3c097b07b7 upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff changeset
24 Label:
3e3c097b07b7 upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff changeset
25 size_hint: 1, 0.4
3e3c097b07b7 upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff changeset
26 text_size: self.size
3e3c097b07b7 upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff changeset
27 halign: 'center'
3e3c097b07b7 upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff changeset
28 valign: 'top'
97
5d2289127bb7 menu (upload): better menu using dedicated widget:
Goffi <goffi@goffi.org>
parents: 95
diff changeset
29 text: _(u"Push the microphone button to start the record, then push it again to stop it.\nWhen you are satisfied, click on the transmit button")
95
3e3c097b07b7 upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff changeset
30 Label:
3e3c097b07b7 upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff changeset
31 id: counter
3e3c097b07b7 upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff changeset
32 size_hint: 1, None
3e3c097b07b7 upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff changeset
33 height: dp(60)
3e3c097b07b7 upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff changeset
34 bold: True
3e3c097b07b7 upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff changeset
35 font_size: sp(40)
3e3c097b07b7 upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff changeset
36 text_size: self.size
431
f3c5e3caa170 transfer (voice): fixed time display following Python 3 port + added spacing
Goffi <goffi@goffi.org>
parents: 282
diff changeset
37 text: u"{}:{:02}".format(root.time//60, root.time%60)
95
3e3c097b07b7 upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff changeset
38 halign: 'center'
3e3c097b07b7 upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff changeset
39 valign: 'middle'
3e3c097b07b7 upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff changeset
40 BoxLayout:
3e3c097b07b7 upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff changeset
41 size_hint: 1, None
3e3c097b07b7 upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff changeset
42 height: dp(60)
431
f3c5e3caa170 transfer (voice): fixed time display following Python 3 port + added spacing
Goffi <goffi@goffi.org>
parents: 282
diff changeset
43 spacing: dp(5)
95
3e3c097b07b7 upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff changeset
44 Widget
3e3c097b07b7 upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff changeset
45 IconButton:
3e3c097b07b7 upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff changeset
46 source: app.expand("{media}/icons/muchoslava/png/") + ("micro_on_50.png" if root.recording else "micro_off_50.png")
3e3c097b07b7 upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff changeset
47 allow_stretch: True
3e3c097b07b7 upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff changeset
48 size_hint: None, None
3e3c097b07b7 upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff changeset
49 size: dp(60), dp(60)
491
203755bbe0fe massive refactoring from camelCase -> snake_case. See backend commit log for more details
Goffi <goffi@goffi.org>
parents: 461
diff changeset
50 on_release: root.switch_recording()
95
3e3c097b07b7 upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff changeset
51 IconButton:
3e3c097b07b7 upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff changeset
52 opacity: 0 if root.recording or not root.time and not root.playing else 1
3e3c097b07b7 upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff changeset
53 source: app.expand("{media}/icons/muchoslava/png/") + ("stop_50.png" if root.playing else "play_50.png")
3e3c097b07b7 upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff changeset
54 allow_stretch: True
3e3c097b07b7 upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff changeset
55 size_hint: None, None
3e3c097b07b7 upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff changeset
56 size: dp(60), dp(60)
491
203755bbe0fe massive refactoring from camelCase -> snake_case. See backend commit log for more details
Goffi <goffi@goffi.org>
parents: 461
diff changeset
57 on_release: root.play_record()
95
3e3c097b07b7 upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff changeset
58 Widget
3e3c097b07b7 upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff changeset
59 Widget:
3e3c097b07b7 upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff changeset
60 size_hint: 1, None
3e3c097b07b7 upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff changeset
61 height: dp(50)
3e3c097b07b7 upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff changeset
62 Button:
97
5d2289127bb7 menu (upload): better menu using dedicated widget:
Goffi <goffi@goffi.org>
parents: 95
diff changeset
63 text: _("transmit")
95
3e3c097b07b7 upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff changeset
64 size_hint: 1, None
3e3c097b07b7 upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff changeset
65 height: dp(50)
3e3c097b07b7 upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff changeset
66 on_release: root.callback(root.audio.file_path)
3e3c097b07b7 upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff changeset
67 Button:
97
5d2289127bb7 menu (upload): better menu using dedicated widget:
Goffi <goffi@goffi.org>
parents: 95
diff changeset
68 text: _("cancel")
95
3e3c097b07b7 upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff changeset
69 size_hint: 1, None
3e3c097b07b7 upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff changeset
70 height: dp(50)
3e3c097b07b7 upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff changeset
71 on_release: root.cancel_cb(root)
3e3c097b07b7 upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff changeset
72 Widget