class ExportTool(Tool): def __init__(self): super(ExportTool, self).__init__("Export Data", "tools/export", util.resourceIcon("ide/table_export")) self.__export_widget = None def trigger(self): if self.__export_widget is None: self.__export_widget = ExportPanel() self.__dialog = ClosableDialog("Export", self.__export_widget, self.parent()) self.__dialog.addButton("Export", self.export) self.__dialog.exec_() def export(self): self.__export_widget.export() self.__dialog.accept()
def trigger(self): if self.__export_widget is None: self.__export_widget = ref(ExportPanel(self.parent())) self.__exporter = Exporter() self.__export_widget().runExport.connect(self.__exporter.runExport) self.__export_widget().setSelectedCase(getCurrentCaseName()) self.__dialog = ref(ClosableDialog("Export", self.__export_widget(), self.parent())) self.__export_widget().updateExportButton.connect(self.__dialog().toggleButton) self.__dialog().addButton("Export", self.export) self.__dialog().show()
def trigger(self): if self.__export_widget is None: self.__export_widget = ref(ExportPanel(self.parent())) self.__export_widget().runExport.connect(self._run_export) self.__dialog = ref( ClosableDialog("Export", self.__export_widget(), self.parent()) ) self.__export_widget().updateExportButton.connect(self.__dialog().toggleButton) self.__dialog().addButton("Export", self.export) self.__dialog().show()
def trigger(self): if self.__export_widget is None: self.__export_widget = ExportPanel() self.__dialog = ClosableDialog("Export", self.__export_widget, self.parent()) self.__dialog.addButton("Export", self.export) self.__dialog.exec_()