Mercurial > libervia-desktop-kivy
annotate cagou/plugins/plugin_transfer_voice.kv @ 292:55e194055aa5
misc: added configuration files to compile Cagou with python-for-android
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 05 May 2019 21:34:02 +0200 |
parents | 1b835bcfa663 |
children | f3c5e3caa170 |
rev | line source |
---|---|
95
3e3c097b07b7
upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
1 # Cagou: desktop/mobile frontend for Salut à Toi XMPP client |
282 | 2 # Copyright (C) 2016-2019 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 |
3e3c097b07b7
upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
17 #:import _ sat.core.i18n._ |
3e3c097b07b7
upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
18 #:import IconButton cagou.core.common.IconButton |
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 |
3e3c097b07b7
upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
37 text: u"{}:{:02}".format(root.time/60, root.time%60) |
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) |
3e3c097b07b7
upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
43 Widget |
3e3c097b07b7
upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
44 IconButton: |
3e3c097b07b7
upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
45 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
|
46 allow_stretch: True |
3e3c097b07b7
upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
47 size_hint: None, None |
3e3c097b07b7
upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
48 size: dp(60), dp(60) |
3e3c097b07b7
upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
49 on_release: root.switchRecording() |
3e3c097b07b7
upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
50 IconButton: |
3e3c097b07b7
upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
51 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
|
52 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
|
53 allow_stretch: True |
3e3c097b07b7
upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
54 size_hint: None, None |
3e3c097b07b7
upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
55 size: dp(60), dp(60) |
3e3c097b07b7
upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
56 on_release: root.playRecord() |
3e3c097b07b7
upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
57 Widget |
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 size_hint: 1, None |
3e3c097b07b7
upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
60 height: dp(50) |
3e3c097b07b7
upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
61 Button: |
97
5d2289127bb7
menu (upload): better menu using dedicated widget:
Goffi <goffi@goffi.org>
parents:
95
diff
changeset
|
62 text: _("transmit") |
95
3e3c097b07b7
upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
63 size_hint: 1, None |
3e3c097b07b7
upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
64 height: dp(50) |
3e3c097b07b7
upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
65 on_release: root.callback(root.audio.file_path) |
3e3c097b07b7
upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
66 Button: |
97
5d2289127bb7
menu (upload): better menu using dedicated widget:
Goffi <goffi@goffi.org>
parents:
95
diff
changeset
|
67 text: _("cancel") |
95
3e3c097b07b7
upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
68 size_hint: 1, None |
3e3c097b07b7
upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
69 height: dp(50) |
3e3c097b07b7
upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
70 on_release: root.cancel_cb(root) |
3e3c097b07b7
upload: added voice plugin (for Android)
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
71 Widget |