MCPcopy Index your code
hub / github.com/pyfa-org/Pyfa / importPatterns

Method importPatterns

gui/targetProfileEditor.py:338–360  ·  view source on GitHub ↗

Event fired when import from clipboard button is clicked

(self, event)

Source from the content-addressed store, hash-verified

336 pass
337
338 def importPatterns(self, event):
339 """Event fired when import from clipboard button is clicked"""
340
341 text = fromClipboard()
342 if text:
343 sTR = TargetProfile.getInstance()
344 try:
345 sTR.importPatterns(text)
346 self.stNotice.SetLabel(_t("Profiles successfully imported from clipboard"))
347 except ImportError as e:
348 pyfalog.error(e)
349 self.stNotice.SetLabel(str(e))
350 except (KeyboardInterrupt, SystemExit):
351 raise
352 except Exception as e:
353 msg = _t("Could not import from clipboard:")
354 pyfalog.warning(msg)
355 pyfalog.error(e)
356 self.stNotice.SetLabel(msg)
357 finally:
358 self.entityEditor.refreshEntityList()
359 else:
360 self.stNotice.SetLabel(_t("Could not import from clipboard"))
361
362 def exportPatterns(self, event):
363 """Event fired when export to clipboard button is clicked"""

Callers

nothing calls this directly

Calls 5

fromClipboardFunction · 0.90
SetLabelMethod · 0.80
refreshEntityListMethod · 0.80
_tFunction · 0.50
getInstanceMethod · 0.45

Tested by

no test coverage detected