def onAction(self): dlg = QDialog() ui = Ui_QueryCallisto() ui.setupUi(dlg) now = QDateTime.currentDateTimeUtc() ui.start_time.setDateTime(now.addSecs(-2 * 60 * 60)) ui.end_time.setDateTime(now.addSecs(-1.50 * 60 * 60)) if dlg.exec_(): start_time = ui.start_time.dateTime().toString( QtCore.Qt.ISODate).replace("T", " ") end_time = ui.end_time.dateTime().toString( QtCore.Qt.ISODate).replace("T", " ") executeLongRunningTask( CallistoSpectrogram.from_range, [ui.instrument.currentText(), start_time, end_time], "Downloading", self._openSpectrogram)
def onAction(self): data_model = self.content_ctrl.getDataModel() call_after = lambda result: self.content_ctrl.setDataModel(result) executeLongRunningTask(self._action, [data_model], "Action in Progress", call_after)
def onAction(self): viewer_ctrl = self.content_ctrl.getViewerController() call_after = lambda result: self.content_ctrl.setDataModel(result) executeLongRunningTask(self._action, [viewer_ctrl], "Executing Action", call_after)
def onExtendEnd(self): v_id = self.content_ctrl.getViewerController().v_id executeLongRunningTask(self._extendAction, [15], "Downloading", self.content_ctrl.setDataModel, [v_id])