def set_controls(self):
     # self.ok_button = pyxbmct.Button("OK", focusTexture="button-focus.png", noFocusTexture="button-nofocus.png")
     self.ok_button = pyxbmct.Button("OK")
     self.placeControl(self.ok_button, 14, 2, columnspan=1, pad_x=1, pad_y=1)
     # self.cancel_button = pyxbmct.Button("Cancel", focusTexture="button-focus.png", noFocusTexture="button-nofocus.png")
     self.cancel_button = pyxbmct.Button("Cancel")
     self.placeControl(self.cancel_button, 14, 3, columnspan=1, pad_x=1, pad_y=1)
Exemple #2
0
    def set_active_controls(self, game):
        self.button_play = pyxbmct.Button('Play',
                                          focusTexture='',
                                          noFocusTexture='',
                                          focusedColor=COLOR_FO,
                                          textColor=COLOR_NF,
                                          font='Med',
                                          alignment=pyxbmct.ALIGN_LEFT)
        self.placeControl(self.button_play, 11, 0)
        self.connect(self.button_play, self.launch_game)

        self.button_cover_art = pyxbmct.Button('Choose Cover Art',
                                               focusTexture='',
                                               noFocusTexture='',
                                               focusedColor=COLOR_FO,
                                               textColor=COLOR_NF,
                                               font='Med',
                                               alignment=pyxbmct.ALIGN_LEFT)
        self.placeControl(self.button_cover_art, 11, 1, columnspan=2)
        self.connect(self.button_cover_art, self.select_cover_art)

        self.button_fanart = pyxbmct.Button('Choose Fanart',
                                            focusTexture='',
                                            noFocusTexture='',
                                            focusedColor=COLOR_FO,
                                            textColor=COLOR_NF,
                                            font='Med',
                                            alignment=pyxbmct.ALIGN_LEFT)
        self.placeControl(self.button_fanart, 11, 3, columnspan=2)
        self.connect(self.button_fanart, self.select_fanart)
Exemple #3
0
	def set_active_controls(self):
		self.button1 = pyxbmct.Button('',   focusTexture=ButtonTrending1S,   noFocusTexture=ButtonTrending1)
		self.placeControl(self.button1, 68, 0,  40, 8)
		
		self.button2 = pyxbmct.Button('',   focusTexture=ButtonTrending1S,   noFocusTexture=ButtonTrending1)
		self.placeControl(self.button2, 68, 10,  40, 8)
		
		self.button3 = pyxbmct.Button('',   focusTexture=ButtonTrending1S,   noFocusTexture=ButtonTrending1)
		self.placeControl(self.button3, 68, 20,  40, 8)
		
		self.button4 = pyxbmct.Button('',   focusTexture=ButtonTrending1S,   noFocusTexture=ButtonTrending1)
		self.placeControl(self.button4, 68, 31,  40, 8)
		
		self.button5 = pyxbmct.Button('',   focusTexture=ButtonTrending1S,   noFocusTexture=ButtonTrending1)
		self.placeControl(self.button5, 68, 42,  40, 8)
		
		#Selection Buttons
		self.button6 = pyxbmct.Button('',   focusTexture=ButtonMoviesS,   noFocusTexture=ButtonMovies)
		self.placeControl(self.button6, 10, 0,  10, 6)
		
		self.button7 = pyxbmct.Button('',   focusTexture=ButtonTvShowsS,   noFocusTexture=ButtonTvShows)
		self.placeControl(self.button7, 22, 0,  10, 8)

		self.button8 = pyxbmct.Button('',   focusTexture=ButtonReleaseS,   noFocusTexture=ButtonRelease)
		self.placeControl(self.button8, 34, 0,  10, 10)
		
		self.button9 = pyxbmct.Button('',   focusTexture=ButtonSearchS,   noFocusTexture=ButtonSearch)
		self.placeControl(self.button9, 54, 45,  13, 5)
		
		self.button10 = pyxbmct.Button('',   focusTexture=ButtonQuitS,   noFocusTexture=ButtonQuit)
		self.placeControl(self.button10, 46, 0,  10, 6)
Exemple #4
0
 def set_controls(self):
     self.listing = pyxbmct.List(_imageWidth=15)
     self.placeControl(self.listing, 0, 0, rowspan=9, columnspan=4)
     self.ok_button = pyxbmct.Button("OK")
     self.placeControl(self.ok_button, 9, 1)
     self.cancel_button = pyxbmct.Button("Cancel")
     self.placeControl(self.cancel_button, 9, 2)
Exemple #5
0
def _createButton (label, alignment):
    if alignment is not None:
        button = pyxbmct.Button(label, alignment=alignment)
    else:
        button = pyxbmct.Button(label)
        
    return button
Exemple #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
Exemple #7
0
    def set_active_controls(self):
        self.button = pyxbmct.Button('Zatvori')
        self.placeControl(self.button, 8, 2)
        self.connect(self.button, self.close)

        self.button2 = pyxbmct.Button('Zaustavi preuzimanje')
        self.placeControl(self.button2, 8, 0)
        self.connect(self.button2, lambda: self.stopDownload())
    def set_active_controls(self):
        self.Open_Issues    = pyxbmct.Button('',    focusTexture=Open_Selected % open_issues,noFocusTexture=Open % open_issues)
        self.Closed_Issues  = pyxbmct.Button('',    focusTexture=Closed_Seleted % closed_issues,noFocusTexture=Closed % closed_issues)
        self.button = pyxbmct.Button('',    focusTexture=ButtonF,   noFocusTexture=Button)

        self.placeControl(self.Open_Issues, 80, 2, 37, 20)
        self.placeControl(self.Closed_Issues, 80, 30, 37, 20)
        self.placeControl(self.button, 115,22,15,7)
Exemple #9
0
 def set_controls(self):
     self.listing = pyxbmct.List(_imageWidth=15)
     self.placeControl(self.listing, row=0, column=0,
                       rowspan=_rows-1, columnspan=_cols)
     self.ok_button = pyxbmct.Button("OK")
     self.placeControl(self.ok_button, row=_rows-1, column=(_cols/2)-1)
     self.cancel_button = pyxbmct.Button("Cancel")
     self.placeControl(self.cancel_button, row=_rows-1, column=(_cols/2))
Exemple #10
0
    def set_active_controls(self):
        self.button = pyxbmct.Button('Close')
        self.placeControl(self.button, 8, 2)
        self.connect(self.button, self.close)

        self.button2 = pyxbmct.Button('Stop Download')
        self.placeControl(self.button2, 8, 0)
        self.connect(self.button2, lambda: self.stopDownload())
Exemple #11
0
    def __init__(self, context=None, window=None):
        self.title = i18n('Composite Playlist')
        self.description_label = i18n(
            'Generate a playlist from the information below')

        super(CompositePlaylistWindow, self).__init__(self.title)  # pylint: disable=super-with-arguments

        self._context = context
        self.window = window

        self.player = xbmc.Player()

        self.playlist_data = {
            'content': 'tvshows',
            'item_count': 50,
            'servers': [(i18n('All Servers'), None)],
            'source': (i18n('On Deck'), 'on_deck'),
            'shuffle': False
        }

        self._servers = []
        self._sources = [
            (i18n('All'), 'all'),
            (i18n('On Deck'), 'on_deck'),
            (i18n('Recently Added'), 'recent_added'),
            (i18n('Recently Released'), 'recent_released'),
        ]
        self._item_counts = [
            '1', '5', '10', '25', '50', '100', '250', '500', '1000'
        ]

        self.description = pyxbmct.Label(self.description_label, alignment=0)

        self.movies_radio = pyxbmct.RadioButton(self.bold(i18n('Movies')))
        self.tvshows_radio = pyxbmct.RadioButton(self.bold(i18n('TV Shows')))
        self.mixed_radio = pyxbmct.RadioButton(self.bold(i18n('Mixed')))

        self.item_count_label = pyxbmct.Label(self.bold(i18n('Item Count')),
                                              alignment=0)
        self.item_count = pyxbmct.Label(str(self.playlist_data['item_count']),
                                        alignment=1)
        self.item_count_list = pyxbmct.List()

        self.server_label = pyxbmct.Label(self.bold(i18n('Server(s)')),
                                          alignment=0)
        self.server_choice_label = pyxbmct.FadeLabel()
        self.server_list = pyxbmct.List()

        self.source_label = pyxbmct.Label(self.bold(i18n('Source')))
        self.source_choice_label = pyxbmct.FadeLabel()
        self.source_list = pyxbmct.List()

        self.shuffle_radio = pyxbmct.RadioButton(self.bold(i18n('Shuffle')))

        self.cancel_button = pyxbmct.Button(i18n('Cancel'))
        self.play_button = pyxbmct.Button(i18n('Play'))

        self.generated = False
 def set_active_controls(self):
 
     self.button1 = pyxbmct.Button('',   noFocusTexture=SearchNF, focusTexture=SearchF)
     self.placeControl(self.button1, 99, 40,  12, 8)
 
     self.button11 = pyxbmct.Button('',   noFocusTexture=Addon_Icon, focusTexture=Addon_Icon)
     self.placeControl(self.button11, -4, 42,  20, 8)
     self.button12 = pyxbmct.Button('',   noFocusTexture=Background_Logo1, focusTexture=Background_Logo1)
     self.placeControl(self.button12, -4, 16,  25, 26)
    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())
Exemple #14
0
 def set_active_controls(self):
     
     self.button1 = pyxbmct.Button('',   focusTexture=Buttonaf,   noFocusTexture=Buttona)
     self.placeControl(self.button1, 10, 0,  30, 15)
     
     self.button2 = pyxbmct.Button('',   focusTexture=Buttonbf,   noFocusTexture=Buttonb)
     self.placeControl(self.button2, 40, 0,  30, 15)
     
     self.button3 = pyxbmct.Button('',   focusTexture=Buttoncf,   noFocusTexture=Buttonc)
     self.placeControl(self.button3, 70, 0,  30, 15)
Exemple #15
0
 def set_controls(self):
     # Text label
     label = pyxbmct.Label('Note: You can select mulltiple items! To delete click on  "delete"')
     self.placeControl(label, 4, 0,columnspan=4)
     self.listing = pyxbmct.List(_imageWidth=20)
     self.placeControl(self.listing, 0,1, rowspan=4, columnspan=4)
     self.ok_button = pyxbmct.Button("Delete")
     self.placeControl(self.ok_button, 0, 0)
     self.cancel_button = pyxbmct.Button("Cancel")
     self.placeControl(self.cancel_button, 1, 0)
Exemple #16
0
    def set_active_controls(self):

        self.button11 = pyxbmct.Button('',
                                       noFocusTexture=Addon_Icon,
                                       focusTexture=Addon_Icon)
        self.placeControl(self.button11, -4, 42, 20, 8)
        self.button12 = pyxbmct.Button('',
                                       noFocusTexture=Background_Logo1,
                                       focusTexture=Background_Logo1)
        self.placeControl(self.button12, -4, 16, 25, 26)
        self.button13 = pyxbmct.Button('',
                                       noFocusTexture=Stripper,
                                       focusTexture=Stripper)
        self.placeControl(self.button13, 0, 1, 106, 13)
Exemple #17
0
    def set_active_controls(self):
        self.Button1 = pyxbmct.Button('',
                                      focusTexture=PlayButtonS,
                                      noFocusTexture=PlayButton)
        self.placeControl(self.Button1, 84, 30, 25, 9)
        self.Button2 = pyxbmct.Button('',
                                      focusTexture=BackButtonS,
                                      noFocusTexture=BackButton)
        self.placeControl(self.Button2, 84, 40, 25, 9)

        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)
Exemple #18
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 
    def __init__(self, context, window, **kwargs):
        self._context = context
        self.window = window

        self.demo = kwargs.get('mode') == 'demo'

        if self.demo:
            self.video_id = VIDEO_ITEM['id']

        else:
            self.video_id = kwargs.get('video_id')
            if not self.video_id:
                return

        self.title = context.i18n('Up Next')

        super().__init__(self.title)

        self.l_video_title = None
        self.l_channel_name = None
        self.l_premiered = None
        self.l_video_description = None
        self.l_video_thumbnail = None
        self.l_video_statistics = None

        self.spinner_image = pyxbmct.Image(
            os.path.join(MEDIA_PATH, 'spinner.gif'))

        self.select_button = pyxbmct.Button('')

        self.metadata = {}

        self.thread = None
        self._selected = False
Exemple #20
0
def START():
    if 'Red' in button_quit: text = '0xffffffff'
    elif 'Mono' in button_quit: text = '0xffffffff'
    else: text = '0xFF000000'
    global List
    global Icon
    #create butttons
    List = pyxbmct.List(buttonFocusTexture=button_focus,
                        buttonTexture=button_no_focus,
                        _space=11,
                        _itemTextYOffset=-7,
                        textColor=text)
    Icon = pyxbmct.Image(icon, aspectRatio=2)
    Icon.setImage(icon)
    Quit = pyxbmct.Button(' ',
                          noFocusTexture=button_quit,
                          focusTexture=button_quit_focus)
    #place buttons
    window.placeControl(List, 10, 1, 110, 30)
    window.placeControl(Icon, 30, 32, 60, 18)
    window.placeControl(Quit, 110, 48, 10, 3)
    #capture mouse moves or up down arrows
    window.connectEventList([
        pyxbmct.ACTION_MOVE_DOWN, pyxbmct.ACTION_MOVE_UP,
        pyxbmct.ACTION_MOUSE_MOVE
    ], LIST_UPDATE)
    #navigation
    List.controlRight(Quit)
    #button actions
    window.connect(List, PlayStream)
    window.connect(Quit, window.close)
    GETCHANNELS()
Exemple #21
0
def create_button():
    return pyxbmct.Button('',
                          focusTexture='',
                          noFocusTexture='',
                          focusedColor=COLOR_FO,
                          textColor=COLOR_NF,
                          font='Med',
                          alignment=pyxbmct.ALIGN_LEFT)
Exemple #22
0
 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
    def set_active_controls(self):
        self.button1 = pyxbmct.Button('',
                                      focusTexture=ButtonaF,
                                      noFocusTexture=ButtonaNF)
        self.placeControl(self.button1, 32, 0, 10, 12)
        self.button2 = pyxbmct.Button('',
                                      focusTexture=ButtonbF,
                                      noFocusTexture=ButtonbNF)
        self.placeControl(self.button2, 45, 0, 10, 12)
        self.button3 = pyxbmct.Button('',
                                      focusTexture=ButtoncF,
                                      noFocusTexture=ButtoncNF)
        self.placeControl(self.button3, 58, 0, 10, 12)
        self.button4 = pyxbmct.Button('',
                                      focusTexture=ButtondF,
                                      noFocusTexture=ButtondNF)
        self.placeControl(self.button4, 71, 0, 10, 12)
        self.button5 = pyxbmct.Button('',
                                      focusTexture=ButtoneF,
                                      noFocusTexture=ButtoneNF)
        self.placeControl(self.button5, 84, 0, 10, 12)
        self.button11 = pyxbmct.Button('[COLOR white]Version 1.3[/COLOR]')
        self.placeControl(self.button11, 103, 40, 10, 12)

        self.button11 = pyxbmct.Button('',
                                       noFocusTexture=Background_Logo,
                                       focusTexture=Background_Logo)
        self.placeControl(self.button11, 32, 33, 57, 15)
 def set_column(self, column=0, row_offset=0, header="", items=[]):
     if header is not "":
         typelabel = pyxbmct.Label(header, alignment=4)
         self.placeControl(typelabel, row_offset, column, rowspan=1, columnspan=1, pad_x=1, pad_y=1)
     #print items
     for i in range(0, len(items)):
         # btn = pyxbmct.Button(items[i], focusTexture="button-focus.png", noFocusTexture="button-nofocus.png")
         btn = pyxbmct.Button(items[i])
         self.placeControl(btn, i + 1 + row_offset, column, rowspan=1, columnspan=1, pad_x=1, pad_y=1)
         self.column_items[column].append(btn)
Exemple #25
0
    def set_active_controls(self):
        self.button1 = pyxbmct.Button('',
                                      focusTexture=ButtonaF,
                                      noFocusTexture=ButtonaNF)
        self.placeControl(self.button1, 65, 0, 34, 10)
        self.button2 = pyxbmct.Button('',
                                      focusTexture=ButtonbF,
                                      noFocusTexture=ButtonbNF)
        self.placeControl(self.button2, 65, 10, 34, 10)
        self.button3 = pyxbmct.Button('',
                                      focusTexture=ButtoncF,
                                      noFocusTexture=ButtoncNF)
        self.placeControl(self.button3, 65, 20, 34, 10)
        self.button4 = pyxbmct.Button('',
                                      focusTexture=ButtondF,
                                      noFocusTexture=ButtondNF)
        self.placeControl(self.button4, 65, 30, 34, 10)
        self.button5 = pyxbmct.Button('',
                                      focusTexture=ButtoneF,
                                      noFocusTexture=ButtoneNF)
        self.placeControl(self.button5, 65, 40, 34, 10)

        self.button6 = pyxbmct.Button('',
                                      focusTexture=ButtonfF,
                                      noFocusTexture=ButtonfF)
        self.placeControl(self.button6, 55, 1, 8, 8)
        self.button7 = pyxbmct.Button('',
                                      focusTexture=ButtongF,
                                      noFocusTexture=ButtongF)
        self.placeControl(self.button7, 55, 11, 8, 8)
        self.button8 = pyxbmct.Button('',
                                      focusTexture=ButtonhF,
                                      noFocusTexture=ButtonhF)
        self.placeControl(self.button8, 55, 21, 8, 8)
        self.button9 = pyxbmct.Button('',
                                      focusTexture=ButtoniF,
                                      noFocusTexture=ButtoniF)
        self.placeControl(self.button9, 55, 31, 8, 8)
        self.button10 = pyxbmct.Button('',
                                       focusTexture=ButtonjF,
                                       noFocusTexture=ButtonjF)
        self.placeControl(self.button10, 55, 41, 8, 8)
Exemple #26
0
    def set_active_controls(self):
        self.button_update = pyxbmct.Button('Update',
                                            focusTexture='',
                                            noFocusTexture='',
                                            focusedColor=COLOR_FO,
                                            textColor=COLOR_NF,
                                            font='Med',
                                            alignment=pyxbmct.ALIGN_LEFT)
        self.placeControl(self.button_update, 11, 0)
        self.connect(self.button_update, self.do_update)

        self.button_cancel = pyxbmct.Button('Cancel',
                                            focusTexture='',
                                            noFocusTexture='',
                                            focusedColor=COLOR_FO,
                                            textColor=COLOR_NF,
                                            font='Med',
                                            alignment=pyxbmct.ALIGN_LEFT)
        self.placeControl(self.button_cancel, 11, 1, columnspan=2)
        self.connect(self.button_cancel, self.cancel)
Exemple #27
0
    def __init__(self,
                 label,
                 values,
                 current,
                 default,
                 changeCallback=None,
                 saveCallback=None,
                 customLabels=None,
                 mode=EnumMode.SELECT,
                 returnValue=False,
                 alignment=pyxbmct.ALIGN_CENTER):

        self.label = label
        self.values = values
        self.customLabels = customLabels
        self.mode = mode
        self.returnValue = returnValue
        self.changeCallback = changeCallback
        self.saveCallback = saveCallback

        self.currentValue = current
        self.defaultValue = default
        self.currentIndex = None
        self.defaultIndex = None

        self.assignedValue = False

        if saveCallback is None:
            self.onSave = None

        if customLabels:
            self._findCurrentIndex()
            label = str(customLabels[self.currentIndex])

        else:
            label = str(current)

        if alignment is not None:
            self.button = pyxbmct.Button(label, alignment=alignment)
        else:
            self.button = pyxbmct.Button(label)
Exemple #28
0
 def __init__(self, title=''):
     # You need to call base class' constructor.
     super(MyWindow, self).__init__(title)
     # Set the window width, height and the grid resolution: 2 rows, 3 columns.
     self.setGeometry(350, 150, 2, 3)
     # Create a text label.
     label = pyxbmct.Label('This is a PyXBMCt window.', alignment=pyxbmct.ALIGN_CENTER)
     # Place the label on the window grid.
     self.placeControl(label, 0, 0, columnspan=3)
     # Create a button.
     button = pyxbmct.Button('Close')
     # Place the button on the window grid.
     self.placeControl(button, 1, 1)
     # Set initial focus on the button.
     self.setFocus(button)
     # Connect the button to a function.
     self.connect(button, self.close)
     # Connect a key action to a function.
     self.connect(pyxbmct.ACTION_NAV_BACK, self.close)
Exemple #29
0
 def set_active_controls(self):
     
     self.button1 = pyxbmct.Button('',   focusTexture=Buttonaf,   noFocusTexture=Buttona)
     self.placeControl(self.button1, -4, 2,  25, 10)
     
     self.button2 = pyxbmct.Button('',   focusTexture=Buttonbf,   noFocusTexture=Buttonb)
     self.placeControl(self.button2, -4, 14,  25, 10)
     
     self.button3 = pyxbmct.Button('',   focusTexture=Buttoncf,   noFocusTexture=Buttonc)
     self.placeControl(self.button3, -4, 26,  25, 10)
     
     self.button4 = pyxbmct.Button('',   focusTexture=Buttondf,   noFocusTexture=Buttond)
     self.placeControl(self.button4, -4, 38,  25, 10)
     
     self.button5 = pyxbmct.Button('',   focusTexture=Buttonef,   noFocusTexture=Buttone)
     self.placeControl(self.button5, 80, 36,  22, 12)
     
     
     
     self.button11 = pyxbmct.Button('',   focusTexture=Buttonzz,   noFocusTexture=Buttonzz)
     self.placeControl(self.button11, 102, 36,  10, 15)
Exemple #30
0
 def set_active_controls(self):
     self.button = pyxbmct.Button('',
                                  focusTexture=ButtonF,
                                  noFocusTexture=Button)
     self.placeControl(self.button, 147, 47, 15, 6)