Пример #1
0
    def __init__(self, parent, id):
        """
        Init function for the audio panel. Sets everything up.
        """
        self.parent = parent

        wx.Panel.__init__(self, parent, id)  # init the panel

        # setup the main frame
        self.SetPosition(wx.Point(0, 0))  # set the main window position
        self.SetSize(wx.Size(
            800, 420))  # set the main window size TODO: use settings
        #self.SetWindowStyle(wx.NO_BORDER) # set window style to have no border
        self.Hide()

        # this will be a BitmapButton to access a menu popup to choose search, MP3, playlist, radio, podcasts, etc.
        self.menu_button = wx.Button(self, -1, "Menu", (0, 10), (60, 50))

        # add the audio player panel
        self.playerPanel = TuxTruck_AudioPanel_PlayerPanel(self, -1)

        # setup the skins
        self.reSkin(parent, parent._currentColorScheme)

        # we're going to show the player panel by default.
        self.playerPanel.Show()
    def __init__(self, parent, id):
        """
        Init function for the audio panel. Sets everything up.
        """
        self.parent = parent

        wx.Panel.__init__(self, parent, id) # init the panel

        # setup the main frame
        self.SetPosition(wx.Point(0,0)) # set the main window position
        self.SetSize(wx.Size(800,420)) # set the main window size TODO: use settings
        #self.SetWindowStyle(wx.NO_BORDER) # set window style to have no border
        self.Hide()

        # this will be a BitmapButton to access a menu popup to choose search, MP3, playlist, radio, podcasts, etc.
        self.menu_button = wx.Button(self, -1, "Menu", (0,10), (60,50))

        # add the audio player panel
        self.playerPanel = TuxTruck_AudioPanel_PlayerPanel(self, -1)

        # setup the skins
        self.reSkin(parent, parent._currentColorScheme)

        # we're going to show the player panel by default.
        self.playerPanel.Show()
Пример #3
0
class TuxTruck_AudioPanel_Main(wx.Panel):
    """
    This is the top-level panel for audio functions, including audio file playing, radio, and podcast playing.
    """
    def __init__(self, parent, id):
        """
        Init function for the audio panel. Sets everything up.
        """
        self.parent = parent

        wx.Panel.__init__(self, parent, id)  # init the panel

        # setup the main frame
        self.SetPosition(wx.Point(0, 0))  # set the main window position
        self.SetSize(wx.Size(
            800, 420))  # set the main window size TODO: use settings
        #self.SetWindowStyle(wx.NO_BORDER) # set window style to have no border
        self.Hide()

        # this will be a BitmapButton to access a menu popup to choose search, MP3, playlist, radio, podcasts, etc.
        self.menu_button = wx.Button(self, -1, "Menu", (0, 10), (60, 50))

        # add the audio player panel
        self.playerPanel = TuxTruck_AudioPanel_PlayerPanel(self, -1)

        # setup the skins
        self.reSkin(parent, parent._currentColorScheme)

        # we're going to show the player panel by default.
        self.playerPanel.Show()

    def reSkin(self, parent, colorSchemeName):
        # re-skin me

        if colorSchemeName == "day":
            # switch to day
            self.SetBackgroundColour(parent.settings.skin.day_bgColor)
            self.playerPanel.reSkin(parent, "day")
        else:
            # switch to night
            self.SetBackgroundColour(parent.settings.skin.night_bgColor)
            self.playerPanel.reSkin(parent, "night")
        self.Refresh()
class TuxTruck_AudioPanel_Main(wx.Panel):
    """
    This is the top-level panel for audio functions, including audio file playing, radio, and podcast playing.
    """

    def __init__(self, parent, id):
        """
        Init function for the audio panel. Sets everything up.
        """
        self.parent = parent

        wx.Panel.__init__(self, parent, id) # init the panel

        # setup the main frame
        self.SetPosition(wx.Point(0,0)) # set the main window position
        self.SetSize(wx.Size(800,420)) # set the main window size TODO: use settings
        #self.SetWindowStyle(wx.NO_BORDER) # set window style to have no border
        self.Hide()

        # this will be a BitmapButton to access a menu popup to choose search, MP3, playlist, radio, podcasts, etc.
        self.menu_button = wx.Button(self, -1, "Menu", (0,10), (60,50))

        # add the audio player panel
        self.playerPanel = TuxTruck_AudioPanel_PlayerPanel(self, -1)

        # setup the skins
        self.reSkin(parent, parent._currentColorScheme)

        # we're going to show the player panel by default.
        self.playerPanel.Show()

    def reSkin(self, parent, colorSchemeName):
        # re-skin me
        
        if colorSchemeName == "day":
            # switch to day
            self.SetBackgroundColour(parent.settings.skin.day_bgColor)
            self.playerPanel.reSkin(parent, "day")
        else:
            # switch to night
            self.SetBackgroundColour(parent.settings.skin.night_bgColor)
            self.playerPanel.reSkin(parent, "night")
        self.Refresh()