def disable_some_controls(self, disabled): tooltip = ("Available when the zoom is close enough to have " "<{} points in the viewport.".format( self.map.N_POINTS_PER_ITER) if disabled else '') for widget in (self._combo_label, self._combo_shape, self._clustering_check): widget.setDisabled(disabled) widget.setToolTip(tooltip)
def disable_some_controls(self, disabled): tooltip = ( "Available when the zoom is close enough to have " "<{} points in the viewport.".format(self.map.N_POINTS_PER_ITER) if disabled else '') for widget in (self._combo_label, self._combo_shape, self._clustering_check): widget.setDisabled(disabled) widget.setToolTip(tooltip)
def playthrough(self): playing = self.play_button.isChecked() for widget in (self.slider, self.step_forward, self.step_backward): widget.setDisabled(playing) if playing: self.play_timer.start() self.play_button.setText('▮▮') else: self.play_timer.stop() self.play_button.setText('▶')
def playthrough(self): playing = self.play_button.isChecked() for widget in (self.slider, self.step_forward, self.step_backward): widget.setDisabled(playing) for widget in (self.date_from, self.date_to): widget.setReadOnly(playing) if playing: self.play_timer.start() self.play_button.setText('⏸') else: self.play_timer.stop() self.play_button.setText('▶️') # hotfix self.repaint()