-from .helpers import parse_args, register_fonts, duration_to_min_sec, path
+from .helpers import parse_args, register_fonts, path
parse_args()
kivy.require("1.9.1")
from kivy.app import App
from kivy.uix.floatlayout import FloatLayout
+from kivy.uix.stacklayout import StackLayout
from kivy.uix.relativelayout import RelativeLayout
from kivy.properties import ListProperty, StringProperty
-from kivy.clock import Clock
from kivy.core.window import Window
from kivy.lang import Builder
from .key import Key
register_fonts()
+from .app_blocks.playlist import *
+
class KeyList(RelativeLayout):
keylist = ListProperty([])
first_key = StringProperty("")
if len(self.keylist) > 2:
self.third_key = self.keylist[2]
-class PlayList(RelativeLayout):
- playlist = ListProperty([])
-
- def __init__(self, **kwargs):
- super(PlayList, self).__init__(**kwargs)
- Clock.schedule_interval(self.update_playlist, 0.5)
-
- def update_playlist(self, dt):
- if self.parent is None or 'Mapping' not in self.parent.ids:
- return True
-
- open_files = self.parent.ids['Mapping'].open_files
- self.playlist = []
- for music_file in open_files.values():
- if not music_file.is_in_use():
- continue
-
- text = "{}/{}".format(
- duration_to_min_sec(music_file.sound_position),
- duration_to_min_sec(music_file.sound_duration))
-
- if music_file.is_loaded_paused():
- self.playlist.append(["⏸", music_file.name, text, False])
- else:
- self.playlist.append(["⏵", music_file.name, text, True])
-
-
class ActionList(RelativeLayout):
action_title = StringProperty("")
action_list = ListProperty([])