Exemple #1
0
 def _getBookmarkBtn(self) -> gui.Button:
     if isBookmark(self._node.bookmarkID):
         return createBtn("Delete bookmark", True,
                          self._deleteBookmarkOnClick)
     else:
         return createBtn("Create bookmark", True,
                          self._createBookmarkOnClick)
Exemple #2
0
    def __init__(self, app: 'WebApp', sourcePart: 'WebSourcePart',
                 showSkipBtns: bool, showNextBtns: bool):
        gui.VBox.__init__(self,
                          width=400,
                          height=app.getHeight(),
                          margin='0px auto')
        AddsPlaybackButtons.__init__(self,
                                     sourcePart=sourcePart,
                                     posKey="10",
                                     showSkipBtns=showSkipBtns,
                                     showNextBtns=showNextBtns)
        ShowsAudioParams.__init__(self)
        ShowsMetadata.__init__(self)
        self._sourcePart = sourcePart
        self._trackLabel = gui.Label(text="")
        self.append(self._trackLabel, "1")
        self._trackLabel.set_on_click_listener(self._trackLabelOnClick)

        button = Button(text="Select track")
        button.set_on_click_listener(self._onOpenSelectorButtonPressed)
        self.append(
            createBtn("Select track", True, self._onOpenSelectorButtonPressed),
            "20")

        button = Button(text="Select track")
        button.set_on_click_listener(self._onOpenSelectorButtonPressed)
        self.append(
            createBtn("Select track", True, self._onOpenSelectorButtonPressed),
            "20")
Exemple #3
0
 def __init__(self, sourcePart: 'WebSourcePart', node: NodeItem,
              isRoot: bool):
     self._sourcePart = sourcePart
     self._node = node
     gui.VBox.__init__(self,
                       width=self._getApp().getWidth(),
                       height=self._getApp().getHeight(),
                       margin='0px auto')
     self.append(gui.Label(node.label), "1")
     if not isRoot:
         # bookmarking root makes no sense
         self.append(self._getBookmarkBtn(), BOOKMARK_BTN_POSKEY)
     # all the way down
     self.append(createBtn("CLOSE", True, self._closeButtonOnClick), "100")
Exemple #4
0
    def _createControlsBox(self, width: int, height: int) -> gui.Widget:
        box = gui.VBox(width=width, height=height, margin='0px auto')
        self._homeButton = gui.Button("HOME")
        self._homeButton.set_on_click_listener(self._homeButtonOnClick)
        box.append(self._homeButton)
        self._prevButton = gui.Button("PREV")
        self._prevButton.set_on_click_listener(self._prevButtonOnClick)
        box.append(self._prevButton)
        box.append(createBtn("CLOSE", True, self._closeButtonOnClick))
        self._nextButton = gui.Button("NEXT")
        self._nextButton.set_on_click_listener(self._nextButtonOnClick)
        box.append(self._nextButton)
        self._endButton = gui.Button("END")
        self._endButton.set_on_click_listener(self._endButtonOnClick)

        box.append(self._endButton)
        return box
Exemple #5
0
 def _getMenuButton(self):
     return createBtn("M", True, self._menuOnClick)
Exemple #6
0
 def _getPlayButton(self):
     return createBtn("Play", True, self._playNodeOnClick)