コード例 #1
0
    def set_controls(self):
        """Set up UI controls"""
        # Description Text
        self.description = pyxbmct.TextBox()
        self.placeControl(self.description, 2, 0, columnspan=4)

        # Username label
        self.name_label = pyxbmct.Label('Username:'******'', aspectRatio=2)
        self.placeControl(self.thumb, 1, 4)

        # Email Label
        self.email_label = pyxbmct.Label('Email:')
        self.placeControl(self.email_label, 2, 1)
        # Email text box
        self.email_field = pyxbmct.TextBox()
        self.placeControl(self.email_field, 2, 2, columnspan=2)

        # plexpass Label
        self.plexpass_label = pyxbmct.Label('Plexpass:'******'Joined:')
        self.placeControl(self.membersince_label, 4, 1)
        # Membersince text box
        self.membersince_field = pyxbmct.TextBox()
        self.placeControl(self.membersince_field, 4, 2, columnspan=2)

        # Cancel button
        self.cancel_button = pyxbmct.Button('Exit')
        self.placeControl(self.cancel_button, 5, 1)
        # Cancel button closes window

        # Switch button
        self.switch_button = pyxbmct.Button('Switch User')
        self.placeControl(self.switch_button, 5, 2, columnspan=2)

        # Signout button
        self.signout_button = pyxbmct.Button('Sign out')
        self.placeControl(self.signout_button, 5, 4)

        # Submit button to get token
        self.connect(self.cancel_button, self.close)
        self.connect(self.switch_button, lambda: self.switch())
        self.connect(self.signout_button, lambda: self.signout())
コード例 #2
0
ファイル: Live.py プロジェクト: krazware/therealufo
	def set_info_controls(self):
		
		#SET THE PYXBMCT LABLES THAT DISPLAY TEXT ON SCREEN
		self.TIME			=	pyxbmct.Label('',textColor='0xFF006400', font='font14')
		self.DATE			=	pyxbmct.Label('',textColor='0xFF006400')
		self.EPGNEXT		=	pyxbmct.Label('Now',textColor='0xFFFFFFFF')
		self.EPGLATER		=	pyxbmct.Label('Next',textColor='0xFFFFFFFF')
		self.DESCRIPTION	=	pyxbmct.TextBox(textColor='0xFF006400')

		
		#SIMPLE PLACE TO ENTER THE CHANNELS ICON FOR DISPLAYING IN THE FOOTER
		self.CHANNEL_LOGO_FOOTER	=	pyxbmct.Image('')
		self.tmdb_country =	pyxbmct.Image('')
		self.Quality =	pyxbmct.Image('')
		

		#PLACE THE PYXBMCT LABLES THAT DISPLAY TEXT ON SCREEN USING X, Y, H, W
		self.placeControl(self.DATE,  13, 1, 12, 15)
		self.placeControl(self.TIME,  -9, 48, 12, 15)
		#self.placeControl(self.EPGNOW,  14, 7, 10,4)
		self.placeControl(self.EPGNEXT,  14, 19, 10,4)
		self.placeControl(self.EPGLATER, 14, 33, 10,4)
		self.placeControl(self.DESCRIPTION, 107, 13, 20,35)
		#PLACE THE PYXBMCT IMAGE THAT DISPLAYS THE CHANNELS LOGO IN FOOTER WITH X, Y, H, W
		self.placeControl(self.CHANNEL_LOGO_FOOTER, 102, 1, 29, 4)
		self.placeControl(self.tmdb_country, 107, 50, 5, 2)
		self.placeControl(self.Quality, 107, 48, 5, 2)
コード例 #3
0
    def set_method(self, METHOD_NAME, method_steps):
        # List
        list_label = pyxbmct.Label(METHOD_NAME)
        self.placeControl(list_label, 4, 1.65)
        #
        self.list_item_label = pyxbmct.TextBox()
        self.placeControl(self.list_item_label, 4.5, 1.95, 4, 2)
        # List
        self.list = pyxbmct.List()
        self.placeControl(self.list, 4.5, 1.4, 5, 0.6)
        # Add items to the list
        step_num = 1
        for i in method_steps:
            items = ['{0}.  '.format(step_num) + i['step']]
            self.list.addItems(items)
            step_num = step_num + 1

        # Connect the list to a function to display which list is selected
        self.connect(
            self.list, lambda: xbmc.executebuiltin(
                'Notification(Note!,{0} selected.)'.format(
                    self.list.getListItem(self.list.getSelectedPosition()).
                    getLabel())))
        # Connect key and mouse events for the list navaigation feedback
        self.connectEventList([
            pyxbmct.ACTION_MOVE_DOWN, pyxbmct.ACTION_MOVE_UP,
            pyxbmct.ACTION_MOUSE_WHEEL_DOWN, pyxbmct.ACTION_MOUSE_WHEEL_UP,
            pyxbmct.ACTION_MOUSE_MOVE
        ], self.list_update)
コード例 #4
0
	def set_info_controls(self):
		self.Hello = pyxbmct.Label('', textColor='0xFFF44248', font='font60', alignment=pyxbmct.ALIGN_CENTER)
		self.DATE =  pyxbmct.Label('',textColor='0xFFFFFF00', font='font18')
		self.placeControl(self.Hello, -4, 1, 1, 50)
		self.placeControl(self.DATE,  -9, 42, 12, 15)
		self.textbox = pyxbmct.TextBox(textColor='0xFFFFFF00')
		self.placeControl(self.textbox, 10, 0, 90, 50)
コード例 #5
0
def PopupWindow(elements):
    # Create a window instance.
    window = pyxbmct.AddonDialogWindow(elements[0])
    # Set window width, height and grid resolution.
    window.setGeometry(700, 250, 2, 1)
    textbox = pyxbmct.TextBox(textColor='0xFFFFFFFF')
    
    window.placeControl(textbox, 0, 0,2,1)
    textbox.setText(elements[1] + " " +  elements[2]+ " " +  elements[3])
#     label = pyxbmct.Label(elements[1], alignment=pyxbmct.ALIGN_LEFT)
#     label2 = pyxbmct.Label(elements[2], alignment=pyxbmct.ALIGN_LEFT)
#     label3 = pyxbmct.Label(elements[3], alignment=pyxbmct.ALIGN_LEFT)
#     window.placeControl(label, 0, 0, columnspan=1)
#     window.placeControl(label2, 1, 0, columnspan=1)
#     window.placeControl(label3, 2, 0, columnspan=1)
    # Create a button.
    button = pyxbmct.Button('Close')
    # Place the button on the window grid.
    window.placeControl(button, 2, 0)
    # Set initial focus on the button.
    window.setFocus(button)
    # Connect the button to a function.
    window.connect(button, window.close)
    # Connect a key action to a function.
    window.connect(pyxbmct.ACTION_NAV_BACK, window.close)
    # Show the created window.
    window.doModal()
    # Delete the window instance when it is no longer used.
    del window 
コード例 #6
0
    def set_controls(self):
        """Set up UI controls"""
        # Description Text
        self.description = pyxbmct.TextBox()
        self.placeControl(self.description, 2, 0, columnspan=4)

        # Username label
        self.name_label = pyxbmct.Label('[B]%s[/B]' % i18n('Username:'******'', aspectRatio=2)
        self.placeControl(self.thumb, 1, 15, rowspan=2, columnspan=2)

        # Email Label
        self.email_label = pyxbmct.Label('[B]%s[/B]' % i18n('Email:'),
                                         alignment=1)
        self.placeControl(self.email_label, 2, 3, columnspan=4)
        # Email fade label
        self.email_field = pyxbmct.FadeLabel()
        self.placeControl(self.email_field, 2, 7, columnspan=8)

        # plexpass Label
        self.plexpass_label = pyxbmct.Label('[B]%s[/B]' % i18n('Plex Pass:'******'[B]%s[/B]' % i18n('Joined:'),
                                               alignment=1)
        self.placeControl(self.membersince_label, 4, 3, columnspan=4)
        # Member since fade label
        self.membersince_field = pyxbmct.FadeLabel()
        self.placeControl(self.membersince_field, 4, 7, columnspan=8)

        # Cancel button
        self.cancel_button = pyxbmct.Button(i18n('Exit'))
        self.placeControl(self.cancel_button, 6, 4, columnspan=4, rowspan=2)
        # Cancel button closes window

        # Switch button
        self.switch_button = pyxbmct.Button(i18n('Switch User'))
        self.placeControl(self.switch_button, 6, 8, columnspan=5, rowspan=2)

        # Signout button
        self.signout_button = pyxbmct.Button(i18n('Sign Out'))
        self.placeControl(self.signout_button, 6, 13, columnspan=4, rowspan=2)

        # Submit button to get token
        self.connect(self.cancel_button, self.close)
        self.connect(self.switch_button, lambda: self.switch())  # pylint: disable=unnecessary-lambda
        self.connect(self.signout_button, lambda: self.signout())  # pylint: disable=unnecessary-lambda
コード例 #7
0
ファイル: Movies.py プロジェクト: krazware/therealufo
	def set_info_controls(self):
		self.POSTER			=	pyxbmct.Image('')
		self.DESCRIPTION	=	pyxbmct.TextBox()
		self.SEARCH			=	pyxbmct.Edit('Search...', textColor='#000000', focusTexture=search_bg, noFocusTexture=search_bg, isPassword=False)
		
		
		self.placeControl(self.POSTER, 23, 38, 69, 10)
		self.placeControl(self.DESCRIPTION, 97, 35, 30, 17)
		self.placeControl(self.SEARCH, 11, 19, 9, 10)
コード例 #8
0
    def set_info_controls(self):
        self.Hello = pyxbmct.Label('', textColor='0xFFF44248', font='font60', alignment=pyxbmct.ALIGN_CENTER)
        self.placeControl(self.Hello, -4, 1, 1, 50)

        self.textbox = pyxbmct.TextBox(textColor='0xFFFFFFFF')
        self.placeControl(self.textbox, 69, 31, 28, 13)

        self.Show_Logo = pyxbmct.Image('')
        self.placeControl(self.Show_Logo, 23, 40, 40, 8)
コード例 #9
0
    def set_controls(self):

        self.placeControl(self.select_button, 12, 3, rowspan=50, columnspan=67)
        self.connect(self.select_button, self.selected)

        self.l_video_thumbnail = pyxbmct.Image(
            self.metadata.get('thumbnail', ''))
        self.placeControl(self.l_video_thumbnail,
                          12,
                          3,
                          rowspan=50,
                          columnspan=67)

        self.placeControl(self.spinner_image,
                          49,
                          57,
                          rowspan=10,
                          columnspan=10)

        self.l_video_title = pyxbmct.FadeLabel(font='font30_title', )
        self.placeControl(self.l_video_title, 3, 3, columnspan=190)
        self.l_video_title.addLabel(self.metadata.get('title'))

        self.l_channel_name = pyxbmct.FadeLabel(font='font25_title', )
        self.placeControl(self.l_channel_name, 12, 73, columnspan=95)
        self.l_channel_name.addLabel(self.metadata.get('channel_name'))

        self.l_premiered = pyxbmct.Label(
            self.metadata.get('premiered'),
            font='font20_title',
            alignment=3,
        )
        self.placeControl(self.l_premiered, 12, 157, columnspan=27)

        self.l_video_statistics = pyxbmct.Label(
            '%s %s / %s %s / %s %s' %
            (int_to_shortform_string(
                self.metadata.get('like_count')), self.context.i18n('likes'),
             int_to_shortform_string(self.metadata.get('dislike_count')),
             self.context.i18n('dislikes'),
             int_to_shortform_string(
                 self.metadata.get('view_count')), self.context.i18n('views')),
            font='font20_title',
            alignment=2,
        )
        self.placeControl(self.l_video_statistics, 19, 73, columnspan=122)

        self.l_video_description = pyxbmct.TextBox(font='font10')
        self.l_video_description.setText(self.metadata.get('description'))
        self.placeControl(self.l_video_description,
                          26,
                          73,
                          rowspan=35,
                          columnspan=122)
        self.l_video_description.autoScroll(1000, 5500, 500)
コード例 #10
0
    def set_info_controls(self):
        self.Hello = pyxbmct.Label('',
                                   textColor='0xFF00f72c',
                                   font='font60',
                                   alignment=pyxbmct.ALIGN_CENTER)
        self.placeControl(self.Hello, -4, 1, 1, 50)

        self.textbox = pyxbmct.TextBox(textColor='0xFFFFFFFF')
        self.placeControl(self.textbox, 76, 30, 28, 20)

        self.Show_Logo = pyxbmct.Image('')
        self.placeControl(self.Show_Logo, 7, 38, 40, 11)
コード例 #11
0
ファイル: default.py プロジェクト: 24061993/noobsandnerds
 def set_controls(self):
     Background = pyxbmct.Image(
         dialog_bg, aspectRatio=0)  # set aspect ratio to stretch
     Background.setImage(dialog_bg)
     self.listing = pyxbmct.List(_imageWidth=15)
     self.placeControl(Background, 0, 0, rowspan=20, columnspan=20)
     Icon = pyxbmct.Image(
         images[0], aspectRatio=2)  # set aspect ratio to keep original
     Icon.setImage(images[0])
     self.placeControl(Icon,
                       0,
                       11,
                       rowspan=8,
                       columnspan=8,
                       pad_x=10,
                       pad_y=10)
     self.textbox = pyxbmct.TextBox()
     self.placeControl(self.textbox,
                       8,
                       11,
                       rowspan=9,
                       columnspan=9,
                       pad_x=10,
                       pad_y=10)
     self.textbox.setText(description[0])
     self.textbox.autoScroll(5000, 2000, 8000)
     self.ok_button = pyxbmct.Button("OK")
     self.placeControl(self.ok_button,
                       17,
                       13,
                       pad_x=10,
                       pad_y=10,
                       rowspan=2,
                       columnspan=3)
     self.cancel_button = pyxbmct.Button("Cancel")
     self.placeControl(self.cancel_button,
                       17,
                       16,
                       pad_x=10,
                       pad_y=10,
                       rowspan=2,
                       columnspan=3)
     self.placeControl(
         self.listing, 0, 0, rowspan=20, columnspan=10, pad_y=10
     )  # grid reference, start top left and span 9 boxes down and 5 across
コード例 #12
0
def list_epg_item(pid, SESSION, pg_hash):
    url = 'https://zattoo.com/zapi/v2/cached/program/power_details/%s?program_ids=%s&complete=True' % (
        pg_hash, pid)
    json_data = get_json_data(url, SESSION)
    program_info = json.loads(json_data)['programs'][0]
    channel_name = program_info['channel_name']
    cid = program_info['cid']
    countries = program_info['country'].replace('|', ', ')
    genres = ', '.join(program_info['g'])
    categories = ', '.join(program_info['c'])
    directors = ', '.join([d for d in program_info['cr']['director']])
    actors = ', '.join([a for a in program_info['cr']['actor']])
    desc = program_info['d']
    subtitle = (program_info['et'] or '')
    thumb = program_info['i']
    title = program_info['t']
    if subtitle:
        title = '%s: %s' % (title, subtitle)
    year = program_info['year']
    text = ''
    if desc:
        text += '[COLOR blue]Plot:[/COLOR] %s\n\n' % desc
    if categories:
        text += '[COLOR blue]Kategorien:[/COLOR] %s' % categories
    if genres:
        text += '\n[COLOR blue]Genre:[/COLOR] %s' % genres
    if countries:
        text += '\n[COLOR blue]Produktionsland:[/COLOR] %s' % countries
    if directors:
        text += '\n[COLOR blue]Direktoren:[/COLOR] %s' % directors
    if actors:
        text += '\n[COLOR blue]Schauspieler:[/COLOR] %s' % actors

    if text:
        title = '[B][COLOR blue]%s[/COLOR][/B] %s' % (channel_name, title)
        if year:
            title = '%s (%i)' % (title, year)
        window = pyxbmct.AddonDialogWindow(title)
        window.connect(pyxbmct.ACTION_NAV_BACK, window.close)
        window.setGeometry(1000, 700, 1, 1)
        box = pyxbmct.TextBox()
        window.placeControl(box, 0, 0)
        box.setText(text)
        window.doModal()
        del window
コード例 #13
0
    def set_info_controls(self, update):
        update_headline = 'Luna %s available' % update.update_version
        title_label = pyxbmct.Label(update_headline,
                                    alignment=pyxbmct.ALIGN_LEFT,
                                    font='XLarge',
                                    textColor=COLOR_HEADING)
        self.placeControl(title_label, 0, 0, 2, 3)

        changelog_label = pyxbmct.Label('Changelog',
                                        alignment=pyxbmct.ALIGN_LEFT,
                                        font='Med',
                                        textColor=COLOR_DETAILS)
        self.placeControl(changelog_label, 2, 0)

        self.changelog = pyxbmct.TextBox(font='Med')
        self.placeControl(self.changelog, 4, 0, 6, 6)
        self.changelog.setText(update.changelog)
        self.changelog.autoScroll(delay=5000, time=2000, repeat=10000)
コード例 #14
0
 def set_info_controls(self):
     self.Hello = pyxbmct.Label('', textColor='0xFFFFD700', font='font60', alignment=pyxbmct.ALIGN_CENTER)
     self.placeControl(self.Hello, -4, 1, 1, 50)
     
     self.List =	pyxbmct.List(buttonFocusTexture=Listbg,_space=9,_itemTextYOffset=-7,textColor='0xFFFFD700')
     self.placeControl(self.List, 0, 2, 115, 10)
     
     
     self.textbox = pyxbmct.TextBox(textColor='0xFFFFD700')
     self.placeControl(self.textbox, 95, 18, 30, 30)
     
     self.Show_Logo = pyxbmct.Image('')
     self.placeControl(self.Show_Logo, 25, 18, 70, 30)
     
     self.connectEventList(
         [pyxbmct.ACTION_MOVE_DOWN,
          pyxbmct.ACTION_MOVE_UP,
          pyxbmct.ACTION_MOUSE_WHEEL_DOWN,
          pyxbmct.ACTION_MOUSE_WHEEL_UP,
          pyxbmct.ACTION_MOUSE_MOVE],
         self.List_update)
コード例 #15
0
    def __init__(self, title='EntertainMe'):
        super(Main, self).__init__(title)

        self.setGeometry(1280, 720, 100, 50)
        Background = pyxbmct.Image(Background_Image)

        self.placeControl(Background, -10, -1, 123, 52)
        Box1 = pyxbmct.Image(poster)
        self.placeControl(Box1, 12, 1, 89, 18)
        self.textbox = pyxbmct.TextBox(textColor='0xFFFFFFFF', font='font24')
        self.placeControl(self.textbox, 12, 27, 41, 22)
        self.textbox.autoScroll(2000, 2000, 2000)
        self.textbox.setText(MainTitle + '\n\n' + desc)
        self.set_info_controls()

        self.set_active_controls()

        self.set_navigation()

        self.connect(pyxbmct.ACTION_NAV_BACK, self.close)

        self.connect(self.Button1, lambda: resolve())
        self.setFocus(self.Button1)
コード例 #16
0
ファイル: gameinfo.py プロジェクト: rusguliev/Luna
    def set_info_controls(self, game):
        title_label = pyxbmct.Label(game.name,
                                    alignment=pyxbmct.ALIGN_LEFT,
                                    font='XLarge',
                                    textColor=COLOR_HEADING)
        self.placeControl(title_label, 0, 0, 2, 3)

        image_path = game.get_selected_poster()
        if image_path is None:
            image_path = ''
        self.image = pyxbmct.Image(image_path)
        self.placeControl(self.image, 2, 0, 6, 1)

        genre_label = pyxbmct.Label('Genre',
                                    alignment=pyxbmct.ALIGN_LEFT,
                                    font='Med',
                                    textColor=COLOR_DETAILS)
        self.placeControl(genre_label, 2, 2)
        self.genre = pyxbmct.FadeLabel(_alignment=pyxbmct.ALIGN_LEFT,
                                       font='Med')
        self.placeControl(self.genre, 2, 3, columnspan=3)
        self.genre.addLabel(game.get_genre_as_string())

        year_label = pyxbmct.Label('Year',
                                   alignment=pyxbmct.ALIGN_LEFT,
                                   font='Med',
                                   textColor=COLOR_DETAILS)
        self.placeControl(year_label, 3, 2)
        self.year = pyxbmct.Label(game.year,
                                  alignment=pyxbmct.ALIGN_LEFT,
                                  font='Med')
        self.placeControl(self.year, 3, 3)

        self.plot = pyxbmct.TextBox()
        self.placeControl(self.plot, 4, 2, 6, 3)
        self.plot.setText(game.plot)
        self.plot.autoScroll(delay=5000, time=2000, repeat=10000)
コード例 #17
0
ファイル: Row.py プロジェクト: radicaldelusion/Collections
 def addTextBox(self, column, columnspan=1, padX=0, rowspan=2):                                
     textBox = pyxbmct.TextBox(font='font4')                                        
     rowControl = self.addRowControl(textBox, column, columnspan, padX, rowspan=rowspan)
             
             
     return rowControl
コード例 #18
0
    def set_controls(self):
        """Set up UI controls"""
        # Description Text
        self.description = pyxbmct.TextBox()
        self.placeControl(self.description, 1, 3, columnspan=15, rowspan=2)

        # success message
        self.success_message = pyxbmct.Label(i18n('Successfully signed in'),
                                             alignment=2)
        self.placeControl(self.success_message, 1, 3, columnspan=15, rowspan=2)

        # tick
        self.tick = pyxbmct.Image(MEDIA_PATH + 'tick.png', aspectRatio=2)
        self.placeControl(self.tick, 3, 9, columnspan=3, rowspan=3)

        # Username label
        self.name_label = pyxbmct.Label(i18n('Username:'******'')
        self.placeControl(self.name_field, 3, 7, columnspan=10)
        if CONFIG['kodi_version'] > 17:
            self.name_field.setType(xbmcgui.INPUT_TYPE_TEXT, i18n('Username:'******'Password:'******'kodi_version'] < 18:
            self.password_field = pyxbmct.Edit('', isPassword=True)
        else:
            self.password_field = pyxbmct.Edit('')

        self.placeControl(self.password_field, 4, 7, columnspan=10)
        if CONFIG['kodi_version'] > 17:
            # must be done after control is placed
            self.password_field.setType(xbmcgui.INPUT_TYPE_PASSWORD,
                                        i18n('Password:'******'Cancel'))
        self.placeControl(self.cancel_button, 6, 3, columnspan=5, rowspan=2)
        # Cancel button closes window
        self.connect(self.cancel_button, self.close)

        # Submit button
        self.submit_button = pyxbmct.Button(i18n('Submit'))
        self.placeControl(self.submit_button, 6, 8, columnspan=5, rowspan=2)
        # Submit button to get token

        # Manual button
        self.manual_button = pyxbmct.Button(i18n('Manual'))
        self.placeControl(self.manual_button, 6, 13, columnspan=5, rowspan=2)

        # PIN button
        self.pin_button = pyxbmct.Button(i18n('Use PIN'))
        self.placeControl(self.pin_button, 6, 13, columnspan=5, rowspan=2)

        # PIN button
        self.submit_pin_button = pyxbmct.Button(i18n('Done'))
        self.placeControl(self.submit_pin_button,
                          6,
                          8,
                          columnspan=5,
                          rowspan=2)

        # Submit button to get token
        self.connect(self.submit_button, lambda: self.submit())  # pylint: disable=unnecessary-lambda
        self.connect(self.manual_button, lambda: self.display_manual())  # pylint: disable=unnecessary-lambda
        self.connect(self.pin_button, lambda: self.display_pin())  # pylint: disable=unnecessary-lambda
        self.connect(self.submit_pin_button, lambda: self.submit_pin())  # pylint: disable=unnecessary-lambda

        # set up failure message
        self.error_cross = pyxbmct.Image(MEDIA_PATH + 'error.png',
                                         aspectRatio=2)
        self.placeControl(self.error_cross, 5, 6)
        self.error_message = pyxbmct.Label(i18n('Unable to sign in'))
        self.placeControl(self.error_message, 5, 7, columnspan=7, rowspan=1)
        self.error_cross.setVisible(False)
        self.error_message.setVisible(False)

        self.digit_one = pyxbmct.Image(MEDIA_PATH + '-.png', aspectRatio=2)
        self.digit_two = pyxbmct.Image(MEDIA_PATH + '-.png', aspectRatio=2)
        self.digit_three = pyxbmct.Image(MEDIA_PATH + '-.png', aspectRatio=2)
        self.digit_four = pyxbmct.Image(MEDIA_PATH + '-.png', aspectRatio=2)

        self.placeControl(self.digit_one, 3, 5, columnspan=2, rowspan=2)
        self.placeControl(self.digit_two, 3, 8, columnspan=2, rowspan=2)
        self.placeControl(self.digit_three, 3, 11, columnspan=2, rowspan=2)
        self.placeControl(self.digit_four, 3, 14, columnspan=2, rowspan=2)
コード例 #19
0
    def set_controls(self):
        """Set up UI controls"""
        # Description Text
        self.description = pyxbmct.TextBox()
        self.placeControl(self.description, 1, 1, columnspan=4)

        # Username label
        self.name_label = pyxbmct.Label('Username:'******'')
        self.placeControl(self.name_field, 2, 2, columnspan=2)

        # Password Label
        self.password_label = pyxbmct.Label('Password:'******'', isPassword=True)
        self.placeControl(self.password_field, 3, 2, columnspan=2)

        # Cancel button
        self.cancel_button = pyxbmct.Button('Cancel')
        self.placeControl(self.cancel_button, 5, 1)
        # Cancel button closes window
        self.connect(self.cancel_button, self.close)

        # Submit button
        self.submit_button = pyxbmct.Button('Submit')
        self.placeControl(self.submit_button, 5, 4)
        # Submit button to get token

        # Manual button
        self.manual_button = pyxbmct.Button('Manual')
        self.placeControl(self.manual_button, 5, 4)

        # PIN button
        self.pin_button = pyxbmct.Button('Use PIN')
        self.placeControl(self.pin_button, 5, 2, columnspan=2)

        # PIN button
        self.submit_pin_button = pyxbmct.Button('Done')
        self.placeControl(self.submit_pin_button, 5, 2, columnspan=2)

        # Submit button to get token
        self.connect(self.submit_button, lambda: self.submit())
        self.connect(self.manual_button, lambda: self.display_manual())
        self.connect(self.pin_button, lambda: self.display_pin())
        self.connect(self.submit_pin_button, lambda: self.submit_pin())

        # set up failure message
        self.error_cross = pyxbmct.Image("%s/resources/media/error.png" %
                                         GLOBAL_SETUP['__cwd__'],
                                         aspectRatio=2)
        self.placeControl(self.error_cross, 4, 2)
        self.error_message = pyxbmct.Label("Unable to Login")
        self.placeControl(self.error_message, 4, 3, columnspan=2, rowspan=2)
        self.error_cross.setVisible(False)
        self.error_message.setVisible(False)

        self.digit_one = pyxbmct.Image("%s/resources/media/-.png" %
                                       GLOBAL_SETUP['__cwd__'],
                                       aspectRatio=2)
        self.digit_two = pyxbmct.Image("%s/resources/media/-.png" %
                                       GLOBAL_SETUP['__cwd__'],
                                       aspectRatio=2)
        self.digit_three = pyxbmct.Image("%s/resources/media/-.png" %
                                         GLOBAL_SETUP['__cwd__'],
                                         aspectRatio=2)
        self.digit_four = pyxbmct.Image("%s/resources/media/-.png" %
                                        GLOBAL_SETUP['__cwd__'],
                                        aspectRatio=2)

        self.placeControl(self.digit_one, 3, 1)
        self.placeControl(self.digit_two, 3, 2)
        self.placeControl(self.digit_three, 3, 3)
        self.placeControl(self.digit_four, 3, 4)
コード例 #20
0
 def create_textbox(self, name, **kwargs):
     self.__put_object(name, pyxbmct.TextBox(**kwargs))
     self.__get_object(name)._type = 'textbox'
コード例 #21
0
 def set_info_controls(self):
     self.Hello = pyxbmct.Label('', textColor='0xFFF44248', font='font60', alignment=pyxbmct.ALIGN_CENTER)
     self.placeControl(self.Hello, -4, 1, 1, 50)
     
     self.textbox = pyxbmct.TextBox(textColor='0xFFFFFFFF')
     self.placeControl(self.textbox, 80, 1, 30, 27)
コード例 #22
0
ファイル: xxxtext.py プロジェクト: AsvpArchy/naughty
 def set_info_controls(self):
     self.textbox = pyxbmct.TextBox()
     self.placeControl(self.textbox, 22, 1, 140, 48)
コード例 #23
0
ファイル: Live.py プロジェクト: krazware/therealufo
	def set_active_controls(self):
		
		##SET THE PYXBMCT BUTTONS THAT USERS INTERACT WITH
		
		self.UK			=	pyxbmct.TextBox(textColor='0xFF006400')

		##############
		############## GUIDE AND LISTS
		self.GUIDE		=	pyxbmct.Button('',	focusTexture=Guide_img_selected, noFocusTexture=Guide_img)
		self.ONDEMAND	=	pyxbmct.Button('',	focusTexture=od_img_selected, noFocusTexture=od_img)
		self.LIST		=	pyxbmct.List(buttonFocusTexture=List_Focused_default, buttonTexture=List_bg, _imageWidth=90, _imageHeight=90, _space=-1, _itemHeight=80,  _itemTextXOffset=30, _itemTextYOffset=-2, textColor='0xFFFFFFFF')
		self.LEFTC		=	pyxbmct.List(buttonFocusTexture=List_Focused, buttonTexture=List_bg_catz, _space=-1, _itemHeight=80,  _itemTextXOffset=5, _itemTextYOffset=-2, textColor='0xFFFFFFFF')
		self.EPG2		=	pyxbmct.List(buttonFocusTexture=List_Focused_EPG, buttonTexture=List_bg, _space=-1, _itemHeight=80,  _itemTextXOffset=10, _itemTextYOffset=-2, textColor='0xFFFFFFFF')
		
		#PLACE THE PYXBMCT BUTTONS THAT DISPLAY TEXT ON SCREEN USING X, Y, H, W
		self.placeControl(self.UK, -1, 0, 12, 53)
		
		############
		############ GUIDE AND LISTS
		self.placeControl(self.ONDEMAND, -11, 19, 12, 9)
		self.placeControl(self.GUIDE, -11, 12, 12, 9)
		self.placeControl(self.EPG2, 21, 31, 90, 24)
		self.placeControl(self.LEFTC, 21, 0, 90, 12)
		self.placeControl(self.LIST, 21, 12, 90, 20)
		
		##THERE IMAGES ARE PLACED HERE TO MAKE SURE THEY DISPLAY ABOVE OTHER ELIMENTS
		#Vert = pyxbmct.Image(Vert_Image)
		Hori = pyxbmct.Image(Hori_Image)
		Hori1 = pyxbmct.Image(Hori_Image)
		Hori2 = pyxbmct.Image(Hori_Image)
		Hori3 = pyxbmct.Image(Hori_Image)
		Hori4 = pyxbmct.Image(Hori_Image)
		Hori5 = pyxbmct.Image(Hori_Image)
		self.Arrow = pyxbmct.Image(Arrow_Image)
		self.Arrow1 = pyxbmct.Image(Arrow_Image)
		self.Arrow2 = pyxbmct.Image(Arrow_Image)
		
		#PLACE THE PYXBMCT IMAGES THAT DISPLAY TEXT ON SCREEN USING X, Y, H, W
		#self.placeControl(Vert, 21, 12, 90,5)
		self.placeControl(Hori, 100, 0, 5,60)
		self.placeControl(Hori1, 84, 0, 5,60)
		self.placeControl(Hori2, 69, 0, 5,60)
		self.placeControl(Hori3, 53, 0, 5,60)
		self.placeControl(Hori4, 37, 0, 5,60)
		self.placeControl(Hori5, 21, 0, 5,60)
		self.placeControl(self.Arrow, 13, 19, 10,4)
		self.placeControl(self.Arrow1, 13, 20, 10,4)
		self.placeControl(self.Arrow2, 13, 33, 10,4)
		
		#CALL FUNCTION TO GET LIVE CHANNEL LIST AND EPG INFORMATION
		#Get_Live(self, '')
		#SET THE BLUE ARROWS FOR NOW AND NEXT TO VISABLE = FALSE TO HIDE THEM ON START UP
		self.Arrow1.setVisible(False)
		self.Arrow2.setVisible(False)
		
		#SET UP THE CONTROL LISTENER FOR MOUSE AND BUTTON CLICKS TO UPDATE LISTS
		self.connectEventList(
			[pyxbmct.ACTION_MOVE_DOWN,
			pyxbmct.ACTION_MOVE_UP,
			pyxbmct.ACTION_MOUSE_WHEEL_DOWN,
			pyxbmct.ACTION_MOUSE_WHEEL_UP,
			pyxbmct.ACTION_MOUSE_MOVE],
			self.Multi_Update)