Exemplo n.º 1
0
    def setWaiting(self, isWaiting):
        """Enable a waiting state.

        :param bool isWaiting: If true switch the widget to waiting state
        """
        if self.__isWaiting == isWaiting:
            return
        self.__isWaiting = isWaiting
        if isWaiting:
            self.__waitingIcon = icons.getWaitIcon()
            self.__waitingIcon.register(self)
            self.__waitingIcon.iconChanged.connect(self.__updateWaitingIcon)
        else:
            self.__waitingIcon.iconChanged.disconnect(self.__updateWaitingIcon)
            self.__waitingIcon.unregister(self)
            self.__waitingIcon = None
        self.__updateIcon()
Exemplo n.º 2
0
 def __init__(self, label):
     self.running = True
     self._label = label
     self.animated_icon = icons.getWaitIcon()
     self.animated_icon.register(self._label)
     super(_PlotWithWaitingLabel.AnimationThread, self).__init__()
Exemplo n.º 3
0
 def testProcessWorkingCache(self):
     icon1 = icons.getWaitIcon()
     icon2 = icons.getWaitIcon()
     self.assertIs(icon1, icon2)
Exemplo n.º 4
0
 def testProcessWorking(self):
     icon = icons.getWaitIcon()
     self.assertIsNotNone(icon)
Exemplo n.º 5
0
 def testProcessWorkingCache(self):
     icon1 = icons.getWaitIcon()
     icon2 = icons.getWaitIcon()
     self.assertIs(icon1, icon2)
Exemplo n.º 6
0
 def testProcessWorking(self):
     icon = icons.getWaitIcon()
     self.assertIsNotNone(icon)