comparison src/cagou.py @ 13:12a189fbb9ba

widget handler first draft: This widget handle other widgets location and size. It is currently loosely inspired from Blender's UI, and the implementation is currenlty naïve. It should be updated in the future to have a behaviour more close to Blender one.
author Goffi <goffi@goffi.org>
date Fri, 08 Jul 2016 20:18:43 +0200
parents 30f6586f904b
children 21a432afd06d
comparison
equal deleted inserted replaced
12:30f6586f904b 13:12a189fbb9ba
31 import kivy.support 31 import kivy.support
32 kivy.support.install_gobject_iteration() 32 kivy.support.install_gobject_iteration()
33 from kivy.app import App 33 from kivy.app import App
34 import xmlui 34 import xmlui
35 from profile_manager import ProfileManager 35 from profile_manager import ProfileManager
36 from widgets_handler import WidgetsHandler
36 from kivy.uix.boxlayout import BoxLayout 37 from kivy.uix.boxlayout import BoxLayout
37 from widget_selector import WidgetSelector 38 from widget_selector import WidgetSelector
38 from cagou_widget import CagouWidget 39 from cagou_widget import CagouWidget
39 import os.path 40 import os.path
40 41
72 def run(self): 73 def run(self):
73 self.app.run() 74 self.app.run()
74 75
75 def plugging_profiles(self): 76 def plugging_profiles(self):
76 widget_selector = WidgetSelector(self) 77 widget_selector = WidgetSelector(self)
77 self.app.root.change_widgets([widget_selector]) 78 self.app.root.change_widgets([WidgetsHandler(self, widget_selector)])
78 79
79 def setPresenceStatus(self, show='', status=None, profile=C.PROF_KEY_NONE): 80 def setPresenceStatus(self, show='', status=None, profile=C.PROF_KEY_NONE):
80 log.info(u"Profile presence status set to {show}/{status}".format(show=show, status=status)) 81 log.info(u"Profile presence status set to {show}/{status}".format(show=show, status=status))
81 82
82 def switchWidget(self, old, new): 83 def switchWidget(self, old, new):