Пример #1
0
    def __init__(self, client, configuration_builder, **kwargs):
        BoxLayout.__init__(self, **kwargs)

        carousel = self.ids.control_carousel
        pages = configuration_builder.build_pages(client=client)
        for page in pages:
            carousel.add_widget(page)
    def __init__(self, **kwargs):

        BoxLayout.__init__(self, **kwargs)
        EventDispatcher.__init__(self, **kwargs)

        self.size_hint_y = None
        self.orientation = "horizontal"

        self.textInput = TextInput()
        self.textInput.size_hint_x = 0.9
        self.textInput.multiline = False
        self.button = Button()
        self.button.text = "..."
        self.button.size_hint_min_x = 20
        self.button.size_hint_x = None
        self.button.height = 25
        self.button.width = 25
        self.button.bind(width=self.set_button_width)

        self.add_widget(self.textInput)
        self.add_widget(self.button)

        self.register_event_type('on_value_changed')
        self.textInput.bind(on_text_validate=self.trigger_on_value_changed)
        self.height = 25
Пример #3
0
    def __init__(self, app, **kwargs):
        BoxLayout.__init__(self, **kwargs)

        self.app = app

        self.spacing = 10
        self.padding = [10, 10, 325, 10]
Пример #4
0
    def __init__(self, **kwargs):
        BoxLayout.__init__(self, **kwargs)
        # self.bind(minimum_height=self.setter('height'))

        account_storage = AccountStorage()
        accounts = account_storage.get_data()
        self.items = accounts
Пример #5
0
 def __init__(self, **kwargs):
     BoxLayout.__init__(self, **kwargs)
     self.thread = Thread(target=self.prepare_players)
     self.thread.daemon = True
     self.thread.start()
     self.player = Placeholder()
     self.add_widget(self.player)
Пример #6
0
    def __init__(self):
        BoxLayout.__init__(self, orientation='horizontal')
        self.UpdatedSize = (0, 0)

        self.QuestLayout = BoxLayout(orientation='horizontal', size_hint_x=0.8)
        self.QuestPattern = Pattern_ScreenManager.Pattern_ScreenManager()
        self.QuestPattern.size_hint_x = 0.5

        self.QuestLayout.add_widget(self.QuestPattern)
        self.QuestPattern.Switch_Button(
            Pattern_Libary.Rand_Pattern(randint(1, 3)))

        self.ChoiceLayout = BoxLayout(orientation='vertical', size_hint_x=0.2)
        self.List_ChoicePattern = []
        for I in range(3):
            self.List_ChoicePattern.append(
                Pattern_ScreenManager.Pattern_ScreenManager())

            self.ChoiceLayout.add_widget(self.List_ChoicePattern[I])
            self.List_ChoicePattern[I].Switch_Button(
                Pattern_Libary.Rand_Pattern(I + 1))
            self.List_ChoicePattern[I].press_target = self.Choice_Pressed

        self.add_widget(self.QuestLayout)
        self.add_widget(self.ChoiceLayout)

        self.List_ToSwitch = []

        Clock.schedule_interval(self.Check_Size, 1)
Пример #7
0
 def __init__(self, context_free_goal, section, section_goal_grades):
     BoxLayout.__init__(self)
     self.section = section
     self.cfg = context_free_goal
     self.grades = section_goal_grades
     self.app = None
     Clock.schedule_once(self.init, 0.0)
Пример #8
0
 def __init__(self, *args, **kwargs):
     BoxLayout.__init__(self, *args, **kwargs)
     with self.canvas.before:
         Color(1, 1, .5, 1)
         self.bg = Rectangle(pos=self.pos, size=self.size)
     self.bind(pos=self.update_bg)
     self.bind(size=self.update_bg)
Пример #9
0
 def __init__(self, *args, **kwargs):
     BoxLayout.__init__(self, *args, **kwargs)
     print('init method of TeleMlMain')
     Clock.max_iteration = 20
     self._panel_disable = True
     atexit.register(self.on_clean)
     self.init_client()
Пример #10
0
    def __init__(self, node_):
        BoxLayout.__init__(self, orientation='vertical', size_hint=(0.25,1), pos_hint={'x': 0.75 if node_.pos_hint['x'] <= 0.5 else 0, 'y': 0})
        self.node = node_

        self.canvas.add(Color(0.745098, 0.745098, 0.745098))
        self.bg_rect = Rectangle(pos=self.pos, size=self.size)
        self.canvas.add(self.bg_rect)
        self.canvas.add(Color(0,0,0))
        def temp_labeller_redraw(a, b):
            self.bg_rect.pos = self.pos
            self.bg_rect.size = self.size
        self.bind(pos=temp_labeller_redraw, size=temp_labeller_redraw)

        self.add_below = Label(size_hint=(1, None), height=0.36*self.height, text = "Node\nX: %(x).3f\nY: %(y).3f" % self.node.pos_hint, font_size=20) 
        def add_below_callback(thing, instance):
            if self.add_below.collide_point(*instance.pos):
               self.parent.dont_check = True
            return super(Label, self.add_below).on_touch_down(instance)
        self.add_below.bind(on_touch_down=add_below_callback)
        self.add_widget(self.add_below)

        self.scroller = ScrollView(size_hint=(1,1), do_scroll_y=True, do_scroll_x=False)
        self.add_widget(self.scroller)
        self.grid = GridLayout(cols=1, spacing=10, size_hint_y=None)
        self.scroller.add_widget(self.grid)
        self.grid.bind(minimum_height=self.grid.setter('height'))
        self.bind(pos=self.redraw, size=self.redraw)

        if len(self.node.command_list) == 0:
            self.grid.add_widget(SetCommandButton())
        else:
            for i in self.node.command_list:
                self.grid.add_widget(SetCommandButton(val=i))
Пример #11
0
    def __init__(self, *args, **kwargs):
        BoxLayout.__init__(self, *args, **kwargs)
        self.size = Window.size
        layout1 = BoxLayout(opacity=1)

        def draw():
            with self.canvas.before:
                Color(1, 1, .5, 1)
                self.bg = Rectangle(pos=self.pos, size=self.size)
                self.bind(pos=draw)
                self.bind(size=draw)

        # with self.canvas.before:
        #     Color(1,1,.5,1)
        #     self.bg = Rectangle(pos=self.pos, size=self.size)
        # self.bind(pos=self.update)
        # self.bind(size=self.update)
        #
        # with layout1.canvas:
        #     Color(1, 0, 0, 1)   # red colour
        #     Line(points=[self.center_x, self.height / 4, self.center_x, self.height * 3/4], width=dp(2))
        #     Line(points=[self.width * 3/ 4, self.center_y, self.width /4, self.center_y], width=dp(2))

        self.add_widget(layout1)
        draw()
Пример #12
0
 def __init__(self, **kwargs):
     """Add suit win details below the total score display (kvlang)."""
     BoxLayout.__init__(self, orientation="vertical", **kwargs)
     announce = BoxLayout()
     announce.add_widget(DealerDisplay(player=PLAYER, score=self.score))
     announce.add_widget(Label(text=self.get_win_text()))
     announce.add_widget(DealerDisplay(player=DEALER, score=self.score))
     self.add_widget(announce)
     pwins = self.score.wins(PLAYER)
     dwins = self.score.wins(DEALER)
     winner = len(pwins) > len(dwins)
     wins = BoxLayout()
     for i, suit in enumerate(pwins):
         display = SuitDisplay(suit=suit)
         Clock.schedule_once(display.flash, 2.0 + 0.45 * (i+1))
         if winner:
             Clock.schedule_once(display.flash,
                                 2.5 + 0.45 * (len(pwins)+1))
         wins.add_widget(ScoreSurround(scores=self.score.by_suit(suit),
                                       center_widget=display))
     main_bar = ProgressBar(max=len(pwins + dwins), value=len(pwins))
     wins.add_widget(ScoreSurround(scores=(self.score.total(DEALER),
                                           self.score.total(PLAYER)),
                                   center_widget=main_bar,
                                   size_hint=(7, 1)))
     for suit in dwins:
         wins.add_widget(ScoreSurround(scores=self.score.by_suit(suit),
                                       center_widget=SuitDisplay(suit=suit)))
     self.add_widget(wins)
Пример #13
0
 def __init__(self, *args, **kwargs):
     BoxLayout.__init__(self, *args, **kwargs)
     self.bind(pos=self.draw)
     self.bind(size=self.draw)
     self.layout1 = BoxLayout(opacity=0.3)
     self.layout2 = BoxLayout()
     self.add_widget(self.layout1)
     self.add_widget(self.layout2)
Пример #14
0
 def __init__(self, signal, cb, name, ip, username, password):
     BoxLayout.__init__(self, orientation='horizontal', spacing=10, size_hint_y=None, height=40)
     self.signal = signal
     self.cb = cb
     self.name = name
     self.ip = ip
     self.username = username
     self.password = password
Пример #15
0
 def __init__(self, *args, **kwargs):
     BoxLayout.__init__(self, *args, **kwargs)
     self.task.control_panel.button_1.angle = 15
     self.task.control_panel.button_1.bind(
         on_press=self.task.display.turn_wheel)
     self.task.control_panel.button_1.bind(
         on_release=self.task.display.turn_wheel)
     self.launcher.button_exit.bind(on_press=App.get_running_app().stop)
Пример #16
0
 def __init__(self, item, container, **kv):
     self.item = item
     self.container = container
     BoxLayout.__init__(self, **kv)
     
     #for some reason all objects in kivy file are added twice, remove duplicates
     for child in self.children[4:9]:
         self.remove_widget(child)
Пример #17
0
 def __init__(self, duty, **kwargs):
     BoxLayout.__init__(self, **kwargs)
     self.date = duty.start.strftime(date_format)
     self.nature = duty.nature
     self.departure_time_local = duty.start.strftime(time_format)
     self.arrival_time_local = duty.end.strftime(time_format)
     self.buildLegs(duty)
     self.buildUtcTimes(duty)
Пример #18
0
	def __init__( self, **kargs ) :
		BoxLayout.__init__( self, orientation="vertical" )
		self.shell = PyShell( self.onPlotRequest )
		self.add_widget( self.shell ) 
		self.plotter = None
		self.mode = "calc"
		self.plottingOptionPanel = PlottingOptionPanel( self.onPlotConfirm )	  
		self._fooToPlot = None
Пример #19
0
    def __init__(self, **kwargs):
        BoxLayout.__init__(self, **kwargs)

        self.manager1 = Factory.PreLoadScreenManager
        self.manager2 = Factory.SpaceBuilderMergeGameScreenManager

        m = self.manager1()
        self.current = m
        self.add_widget(m)
Пример #20
0
    def __init__(self, group_name, on_change_method=None, **kwargs):
        BoxLayout.__init__(self, **kwargs)
        self.group_name = group_name
        self.buttons = []
        self.parent_method = on_change_method

        self.create_buttons(['Yes', 'No'])

        self.set_selection(0)
    def __init__(self, **kwargs):
        BetterLogger.__init__(self)
        ButtonBehavior.__init__(self)
        BoxLayout.__init__(self, **kwargs)

        self.label = MultiLangLabel(font_name="Buttons-merge_options_text", color=self.label_color,
                                    font_size=graphicsConfig.getint("Buttons", "flat_font_size"), size_hint=(1, 1))

        self.add_widget(self.label)
Пример #22
0
 def __init__(self):
     BoxLayout.__init__(self)
     self.pause = True
     self.clock_event = None
     self.nb_passages = 0
     self.nb_trampolines = NB_TRAMPOS_DEFAUT
     self.total_passages = NB_PERS_PAR_TRAMPO_DEFAUT
     self.nb_rotations = NB_TRAMPOS_DEFAUT
     self.maj_champs_saisie()
Пример #23
0
 def __init__(self, *args, **kwargs):
     BoxLayout.__init__(self, *args, **kwargs)
     self.bind(pos=self.draw)
     self.bind(size=self.draw)
     self.gridLayer = BoxLayout(opacity=1)
     self.neuronLayer = BoxLayout()
     self.add_widget(self.gridLayer)
     self.add_widget(self.neuronLayer)
     self._gridSize = 4
Пример #24
0
    def __init__(self, **kwargs):
        # super(Groups, self).__init__(**kwargs)
        BoxLayout.__init__(self, **kwargs)
        self.size_hint_y = .9
        self.orientation = 'vertical'

        self.model = None
        if 'model' in kwargs:
            self.model = kwargs['model']
Пример #25
0
    def __init__(self):
        """Constructor method.
        """

        self.elapsed_time = 0
        self.end_call_btn_pressed = False
        BoxLayout.__init__(self)
        self.counter_update_evt = Clock.schedule_interval(
            lambda dt: self.update_counter(), 1)
Пример #26
0
 def __init__(self):
     BoxLayout.__init__(self)
     self.pause = True
     self.clock_event = None
     self.nb_passages = 0
     self.nb_trampolines = NB_TRAMPOS_DEFAUT
     self.total_passages = NB_PERS_PAR_TRAMPO_DEFAUT
     self.nb_rotations = NB_TRAMPOS_DEFAUT
     self.maj_champs_saisie()
Пример #27
0
    def __init__(self, **kwargs):
        BoxLayout.__init__(self, **kwargs)

        self.manager1 = Factory.PreLoadScreenManager
        self.manager2 = Factory.APP_NAME_ScreenManager

        m = self.manager1()
        self.current = m
        self.add_widget(m)
Пример #28
0
    def __init__(self, **kwargs):
        BoxLayout.__init__(self, **kwargs)

        self.nodes = []
        self.tree = TreeView(hide_root=True)

        #   Create UI
        self.add_node()
        self.add_widget(self.tree)
	def __init__(self, **kwargs):
		BoxLayout.__init__(self, **kwargs)
		self.players = []			
		self.selected_year = None
		self.next_screen_button_enabled = False

		print "Beginning widget walk:"
		for widget in self.walk():
			print ("{} -> {}").format(widget, widget.id)
		print "End of widget walk."
Пример #30
0
 def __init__(self, name, action, led_color=None, modifier=None, *args, **kwargs):
     BoxLayout.__init__(self, id=name, *args, **kwargs)
     self.bind(name=self.update_name)
     self.bind(action=self.update_action)
     self.bind(led_color=self.update_led_color)
     self.bind(modifier=self.update_modifier)
     self.name = name
     self.action = action
     self.led_color = led_color
     self.modifier = modifier
Пример #31
0
 def __init__(self, section):
     BoxLayout.__init__(self)
     self.section = section
     self.grades = SectionGrades()
     self.grades.course = section.course_name
     self.grades.semester = section.semester
     self.grades.year = section.year
     self.grades.section_id = section.section_id
     self.submit_callback = self.null_func
     Clock.schedule_once(self.init, 0.0)
Пример #32
0
	def __init__(self, procesos):
		BoxLayout.__init__(self)

		self.orientation = 'vertical'
		self.procesos = procesos

		self.tiempos = dict()
		self.cajas = dict()

		self.visores = dict()
Пример #33
0
	def __init__(self):
		BoxLayout.__init__(self)
		self.pos_hint={'center_x':.5,'center_y':.9}
		self.size_hint=(0.9,0.1)
		self.sub=Button(text='Sign in')
		self.show=Button(text='Show details')
		self.play=Button(text='Play')
		self.add_widget(self.sub)
		self.add_widget(self.show)
		self.add_widget(self.play)
Пример #34
0
	def __init__(self,name1,name2):
		BoxLayout.__init__(self)
		self.color=(1,0,0,1)
		self.padding=10
		self.spacing=10
		self.orientation='vertical'
		self.pos_hint={'center_x':.5,'center_y':.5}
		self.size_hint=(.5,.5)
		self.add_widget(Label(text='Player 1: '+ name1,size_hint=(.5,.5),pos_hint={'center_x':.5,'center_y':.5}))
		self.add_widget(Label(text='Player 2: '+ name2,size_hint=(.5,.5),pos_hint={'center_x':.5,'center_y':.5}))
Пример #35
0
    def __init__(self, username):
        """Constructor method.
        
        Args:
            username (str): Name of calling user.
        """

        self.username = username
        self.accept_btn_pressed = False
        BoxLayout.__init__(self)
Пример #36
0
 def __init__(self, **kwargs):
     BoxLayout.__init__(self, orientation="vertical", **kwargs)
     self.rows = []
     for i, suit in enumerate(self.scoreboard.suits):
         display = SuitScoreDisplay(suit=suit,
                                    pscore=self.scoreboard[PLAYER][i],
                                    dscore=self.scoreboard[DEALER][i])
         self.rows.append(display)
         self.add_widget(display)
     self.add_widget(ProgressBar(value=0, size_hint=(1, .2)))
Пример #37
0
 def __init__(self, **kwargs):
     BoxLayout.__init__(self)
     # super(RootWidget, self).__init__(**kwargs)
     self.BAZY = False
     self.wordlist = []
     self.ltrVals = {}
     self.literki.text = ''.join(random.sample(LETTERS, 7))
     self.bestWords = []
     self.prog.value = 0
     self.hand = 0
Пример #38
0
 def __init__(self, **kwargs):
     BoxLayout.__init__(self, **kwargs)
     self.app = App.get_running_app()
     self.gameLayout = self.app.gameLayouts[0]
     buttonGrid = self.ids["buttonGrid"]
     for gameLayout in self.app.gameLayouts:
         button = Button(
             text=gameLayout.name,
             on_press=lambda sender, gameLayout=gameLayout: self.setGame(gameLayout),
         )
         buttonGrid.add_widget(button)
Пример #39
0
    def __init__(self, image, text, **kwargs):
        BoxLayout.__init__(self, **kwargs)
        self.text = text
        self.height = NODE_HEIGHT
        self.width = 800
        self.add_widget(image)
        label = Label(text=text, size_hint_x=0.9, text_size=(400, None), halign='left')
        label.width = 700

        self.category_name = label
        self.add_widget(self.category_name)
Пример #40
0
    def __init__(self, **kwargs):
        """Constructor method.
        
        Args:
            **kwargs: Keyword arguments supplied in dictionary form.
        """

        self.username = kwargs['name']
        self.status = kwargs['status']
        self.color = design.get_random_color()
        BoxLayout.__init__(self)
Пример #41
0
    def __init__(self,*args,**kwargs):
        BoxLayout.__init__(self,**kwargs)
        found_projects = [fn for fn in next(os.walk(app.path_app))[1]]
        for project in found_projects:
            proj_btn = Button(text=project)
            temp_func = partial(self.open_existing,project)
            proj_btn.bind(on_press=temp_func)
            self.ids.found_projects.add_widget(proj_btn)

        if found_projects == []:
            label = Label(text='No existing projects were found. Press on "+" button to create new project')
            self.ids.found_projects.add_widget(label)
Пример #42
0
    def __init__(self, username):
        """Constructor method.
        
        Args:
            username (str): The user to call.
        """

        self.username = username
        self.elapsed_time = 0
        BoxLayout.__init__(self)
        self.counter_update_evt = Clock.schedule_interval(
            lambda dt: self.update_counter(), 1)
Пример #43
0
    def __init__(self, **kwargs):
        """Constructor method.
        
        Args:
            **kwargs: Keyword arguments supplied in dictionary form.
        """

        self.user_lst = kwargs['user_lst']
        self.master = kwargs['master']
        self.color = design.get_random_color()
        BoxLayout.__init__(self)
        self.ids.user_lbl.text = ', '.join(kwargs['user_lst'])
Пример #44
0
 def __init__(self, context_free_goal, section):
     BoxLayout.__init__(self)
     self.section = section
     self.cfg = context_free_goal
     self.grades = SectionGoalGrades()
     self.grades.course = section.course_name
     self.grades.semester = section.semester
     self.grades.year = section.year
     self.grades.section_id = section.section_id
     self.grades.goal_id = context_free_goal.id
     self.submit_callback = self.null_func
     Clock.schedule_once(self.init, 0.0)
Пример #45
0
 def __init__(self, **kwargs):
     BoxLayout.__init__(self, **kwargs)
     current_job = App.get_running_app().current_job
     self.job_dict = current_job.info_dict
     self.ids['jo_no'].text = 'JO No.: {}'.format(self.job_dict['jo_no'])
     self.ids['to_do'].text = 'To do: {}'.format(self.job_dict['to_do'])
     self.ids['code'].text = 'Code: {}'.format(self.job_dict['code'])
     self.ids['desc'].text = 'Description: {}'.format(self.job_dict['desc'])
     if not current_job.qc:
         self.qc_label.text = 'QC check: Not complete'
     else:
         self.qc_label.text = 'QC check: {}'.format(current_job.qc[-1])
Пример #46
0
 def __init__(self,**kwargs):
     BoxLayout.__init__(self,**kwargs)
     self.orientation='vertical'
     self.add_widget(searchbar(pos_hint={'center_x':0.5,'center_y':0.5}))
     self.list=MDList()
     self.suggestions=[]
     self.scroll=ScrollView(do_scroll_x=False)
     self.scroll.add_widget(self.list)
     for x in range(10):
         self.suggestions.append(OneLineListItem())
     self.add_widget(self.scroll)
     self.add_widget(BoxLayout())
    def __init__( self, handlerfoo, plotfoo ) :
        BoxLayout.__init__( self, orientation="vertical" )
        inp = BoxLayout( orientation="horizontal" )
        inp.padding = 1
        self.current = TextInput( text=u"" )
        self.current.font_name = FONT_NAME
        self.current.font_size = FONT_SIZE
        self.current.size_hint = 0.85, 1

        inp.add_widget( self.current )
        btnExec = Button( text="Exec()" )
        btnExec.font_name = FONT_NAME
        btnExec.font_size = FONT_SIZE
        btnExec.bind( on_press=handlerfoo )
        btnPlot = Button( text="Plot!" )
        btnPlot.font_name = FONT_NAME
        btnPlot.font_size = FONT_SIZE
        btnPlot.bind( on_press=plotfoo )
        b = BoxLayout( orientation="vertical" )
        b.add_widget( btnExec )
        b.add_widget( btnPlot )
        b.size_hint = 0.25, 1
        inp.add_widget( b )
        
        self.static_keys = BoxLayout( orientation="vertical" )
        self.loadStaticKeys()

        self.numpad = GridLayout( cols=4 )
        self.loadNumpad()
        self.numpad.size_hint = 0.6, 1

        self.symbols = GridLayout( cols=4 )
        self.loadSymbols()
        self.symbols.size_hint = 0.6, 1
         
        self.foo1 = GridLayout( cols=2 )
        self.loadFoo1()
        self.foo1.size_hint = 0.4, 1

        self.foo2 = GridLayout( cols=2 )
        self.loadFoo2()
        self.foo2.size_hint = 0.4, 1

        self.kb = BoxLayout( orientation="horizontal" )
        self.kb.size_hit = 1, 0.33
        self.static_keys.size_hit = 1, 0.33
        inp.size_hint = 1, 0.6
        self.add_widget( inp )
        self.add_widget( self.static_keys )
        self.add_widget( self.kb )
        self.shiftCount = -1
        self.onShift()
Пример #48
0
    def __init__(self, **args):
        BoxLayout.__init__(self)
        self.score = 0
        self.bon = 0
        self.total = 0
        self.record = 0

        # Language variable
        config = MultipyApp.get_running_app().config
        language = config.getdefault("General", "language_type", "French")
        self.language_type = language.upper()

        self.new_question()
Пример #49
0
 def __init__(self, fields):
     global input_field
     BoxLayout.__init__(self)
     self.spacing = 2
     self.size_hint = (1, None)
     self.size = (0, 50)
     self.pos_hint = {'y': 0.9}
     submit_button = Button(text='Send')
     submit_button.on_press = my_event
     submit_button.size_hint = (None, None)
     submit_button.size = (100, 50)
     input_field = TextInput(text='0')
     self.add_widget(submit_button)
     self.add_widget(input_field)
Пример #50
0
    def __init__(self, controller, character):
        BoxLayout.__init__(self)

        self.controller = controller
        self.character = character
        self.points = character.ability_points

        for ability in self.character.abilities:
            spinner = AbilityScoreSpinner(self.controller, ability)
            self.character.subscribe(spinner.update, character.ABILITY_CHANGE_EVENT)
            self.add_widget(spinner)

        self.character.subscribe(self.update_points_spent,
                                 character.ABILITY_CHANGE_EVENT)
Пример #51
0
 def __init__(self, player, **kwargs):
     BoxLayout.__init__(self, **kwargs)
     self.queue = Queue()
     self.activeslider = False
     self.dropdown = DropDown()
     self.stationdropdown = DropDown()
     self.currentplayer = player
     self.playerstatus = "Pending ...."
     self.playername = self.currentplayer.group.label
     self.rendering = self.currentplayer.renderingControl.subscribe(
         event_queue=self.queue)
     self.info = self.currentplayer.avTransport.subscribe(
         event_queue=self.queue)
     self.timer = Clock.schedule_interval(self.monitor, 0)
Пример #52
0
	def __init__(self, procesador, tabla):
		BoxLayout.__init__(self)

		self.procesador = procesador
		self.tabla = tabla

		self.listos = ListaProcesosListos(self.ids.listos)
		self.suspendidos = ListaProcesosSuspendidos(self.ids.suspendidos)
		self.bloqueados = ListaProcesosBloqueados(self.ids.bloqueados)

		self.diagrama_gantt = DiagramaGantt(self.procesador)
		self.visores = { 'nombre': self.ids.nombre, 'tiempo': self.ids.tiempo, 'recursos':self.ids.recursos}

		self.ids.id_procesador.text = self.procesador.nombre
		self.procesador.planificador.asignar_vista(self)
Пример #53
0
    def __init__(self, **kwargs):
        ip_address = App.get_running_app().config.get('connection', 'ip_address')

        coin = kwargs['coin']
        self.key = coin['key']
        self.have = coin['have']
        self.country = coin['country']
        self.flag = ip_address + coin['flag']
        self.img = ip_address + coin['img']
        self.year = coin['year']
        self.description = coin['description']

        BoxLayout.__init__(self, **kwargs)

        self.rect = None
        self.points = None
Пример #54
0
 def __init__(self, d, cb):
     self.id_ = d['id']
     self.name = d['name']
     self.type_ = d['type']
     self.params = d.get('params', {})
     self.drivers = d.get('drivers', [])
     self.cb = cb
     BoxLayout.__init__(self, orientation='horizontal', spacing=10, size_hint_y=None, height=40)
     if self.name == 'events':
         self.sort = 'eventts'
         self.sort_how = 'desc'
         self.name = 'event'
     else:
         self.sort = 'name'
         self.sort_how = 'asc'            
     self.offset = 0
     self.limit = 20
Пример #55
0
 def __init__(self, d, cb, supported):
     self.id_ = d['id']
     self.name = d['name']
     self.objtype_ = d['objtype']
     self.supported = supported.params
     self.cb = cb
     self.objapi = []
     self.loaded_for_show = False
     for k,v in self.supported.iteritems():
         if (k.startswith('api_')and(k.startswith('api_cmd')==False)): continue
         o = AyObjectApi(k, v, d, cb)
         self.objapi.append(o)
         self.props[k] = o
     o = AyObjectApi('id', {}, d, cb)
     self.props['id'] = o
     self.objapi.append(o)
     BoxLayout.__init__(self, orientation='vertical', spacing=10, size_hint_y=None, height=40)
Пример #56
0
	def __init__(self):
		BoxLayout.__init__(self)
		self.background_color=(1,0,0,1)
		self.padding=10
		self.spacing=10
		self.orientation='vertical'
		self.pos_hint={'center_x':.5,'center_y':.5}
		self.size_hint=(.5,.5)
		self.nameinput=TextInput(pos_hint={'center_x':.5,'center_y':.5},size_hint=(.5,.5),multiline=False)
		self.nameinput2=TextInput(pos_hint={'center_x':.5,'center_y':.5},size_hint=(.5,.5),multiline=False)
		self.subscribebutton=Button(text='Subscribe',pos_hint={'center_x':.5,'center_y':.5},size_hint=(.5,.5))
		self.add_widget(Label(text='Player 1: Name',size_hint=(.5,.5),pos_hint={'center_x':.5,'center_y':.5}))
		self.add_widget(self.nameinput)
		self.add_widget(Label(text='Player 2: Name',size_hint=(.5,.5),pos_hint={'center_x':.5,'center_y':.5}))
		self.add_widget(self.nameinput2)
		self.add_widget(Label(text=''))
		self.add_widget(self.subscribebutton)
Пример #57
0
    def __init__(self, **kwargs):
        """Set up the CardDisplays."""
        BoxLayout.__init__(self, **kwargs)
        for card in self.hand:
            display = CardDisplay(card=card)
            self.slots.append(display)
            self.add_widget(display)
        for i in range(len(self.hand) - len(self.slots)): # not full now?
            display = CardDisplay(card=None)
            self.slots.append(display)
            self.add_widget(display)
        self._played = []

        # Prep the "Can't Play" button
        self._cant_play = HomeButton(on_release=self.cant_play)
        self._cant_play.source = "atlas://gui/homescreen/cantplay"
        self._cant_play.text = "Stuck?"
Пример #58
0
    def __init__(self, plotFoo):
        BoxLayout.__init__(self, orientation="vertical")
        self._lastOutput = []
        self.console = InteractiveConsole()

        frm = BoxLayout(orientation="vertical")
        self.listed = TextInput()
        self.listed.font_size = FONT_SIZE
        self.listed.font_name = FONT_NAME
        self.listed.readonly = True
        self.listed.size_hint = 1, 0.3

        frm.add_widget(self.listed)
        self.kb = KiPyKeyboard(self.onBtnExecPress, plotFoo)
        self.kb.size_hint = 1, 0.7
        frm.add_widget(self.kb)
        frm.size_hint = 1, 1
        self.add_widget(frm)
Пример #59
0
    def __init__(self, action_callback, cancel_callback, action_text):
        """

        :return:
        """
        BoxLayout.__init__(self, orientation="vertical")

        self.file_chooser = FileChooserIconView(size_hint=(1,0.7), on_submit=self.update_file_input)
        self.file_input = TextInput()
        self.action_button = Button(text=action_text, on_press=action_callback)
        self.cancel_button = Button(text="Cancel", on_press=cancel_callback)

        self.horizontal_layout = GridLayout(cols=3, row_force_default=True, row_default_height=40, size_hint=(1, 0.055))
        self.horizontal_layout.add_widget(self.file_input)
        self.horizontal_layout.add_widget(self.action_button)
        self.horizontal_layout.add_widget(self.cancel_button)

        self.add_widget(self.file_chooser)
        self.add_widget(self.horizontal_layout)
Пример #60
0
 def __init__(self):
     BoxLayout.__init__(self)
     self.layout = BoxLayout(orientation='vertical')
     self.layout_b = GridLayout( cols = 4, rows = 4)
     self.textinput = TextInput (multiline=False, border=[10,10,10,10],\
         font_size =100, readonly=True, size_hint=[ 1.0, 0.3])
       
     btn1 = Button(text='1', font_size=50, on_press = self.btn_input) 
     btn2 = Button(text='2', font_size=50, on_press = self.btn_input)
     btn3 = Button(text='3', font_size=50, on_press = self.btn_input)
     btnp = Button(text='+', font_size=50, on_press = self.btn_input) 
     btn4 = Button(text='5', font_size=50, on_press = self.btn_input)
     btn5 = Button(text='4', font_size=50, on_press = self.btn_input)
     btn6 = Button(text='6', font_size=50, on_press = self.btn_input)
     btnm = Button(text='-', font_size=50, on_press = self.btn_input)
     btn7 = Button(text='7', font_size=50, on_press = self.btn_input)
     btn8 = Button(text='8', font_size=50, on_press = self.btn_input)
     btn9 = Button(text='9', font_size=50, on_press = self.btn_input)
     btnx = Button(text='*', font_size=50, on_press = self.btn_input)
     btnc = Button(text='c', font_size=50, background_color=[255,0,0,1] , on_press = self.remove)
     btn0 = Button(text='0', font_size=50, on_press = self.btn_input)
     btnr = Button(text='=', font_size=50, on_press = self.kalcul)
     btnd = Button(text='/', font_size=50, on_press = self.btn_input)    
     self.layout.add_widget(self.textinput)
     self.layout_b.add_widget(btn1)
     self.layout_b.add_widget(btn2)
     self.layout_b.add_widget(btn3)
     self.layout_b.add_widget(btnp)
     self.layout_b.add_widget(btn4)
     self.layout_b.add_widget(btn5)
     self.layout_b.add_widget(btn6)
     self.layout_b.add_widget(btnm)
     self.layout_b.add_widget(btn7)
     self.layout_b.add_widget(btn8)
     self.layout_b.add_widget(btn9)
     self.layout_b.add_widget(btnx)
     self.layout_b.add_widget(btnc)
     self.layout_b.add_widget(btn0)
     self.layout_b.add_widget(btnr)
     self.layout_b.add_widget(btnd)
     self.layout.add_widget(self.layout_b)
     self.add_widget(self.layout)