QMessageBox.warning(None,'LogarithmPlotter',QCoreApplication.translate('main','Could not open file "{}":\n{}').format(filename,e),QMessageBox.Ok)# Cannot parse file
else:
QMessageBox.warning(None,'LogarithmPlotter',QCoreApplication.translate('main','Could not open file: "{}"\nFile does not exist.').format(filename),QMessageBox.Ok)# Cannot parse file
chdir(path.dirname(path.realpath(__file__)))
returndata
@Slot(result=str)
defgettmpfile(self):
returnself.tmpfile
@Slot()
defcopyImageToClipboard(self):
clipboard=QApplication.clipboard()
clipboard.setImage(QImage(self.tmpfile))
@Slot(result=str)
defgetVersion(self):
return__VERSION__
@Slot(str,result=str)
defgetSetting(self,namespace):
returnconfig.getSetting(namespace)
@Slot(str,result=bool)
defgetSettingBool(self,namespace):
returnconfig.getSetting(namespace)
@Slot(str,str)
defsetSetting(self,namespace,value):
returnconfig.setSetting(namespace,value)
@Slot(str,bool)
defsetSettingBool(self,namespace,value):
returnconfig.setSetting(namespace,value)
@Slot(str)
defsetLanguage(self,new_lang):
config.setSetting("language",new_lang)
@Slot(result=str)
defgetDebugInfos(self):
"""
ReturnstheversioninfoaboutQt,PySide2&Python
"""
returnQCoreApplication.translate('main',"Built with PySide2 (Qt) v{} and python v{}").format(PySide2_version,sys_version.split("\n")[0])