MCPcopy
hub / github.com/tonquer/JMComic-qt / CopyPicture

Method CopyPicture

src/view/read/read_view.py:995–1015  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

993 Log.Error(es)
994
995 def CopyPicture(self):
996 info = self.pictureData.get(self.curIndex)
997 if not info:
998 return
999 assert isinstance(info, QtFileData)
1000 if not info.data and not info.waifuData:
1001 return
1002 if info.waifuData:
1003 data = info.waifuData
1004 else:
1005 data = info.data
1006 if not (self.isLocal or self.isOffline) and info.saveParams:
1007 epsId, scrambleId, pitureName = info.saveParams
1008 data = TaskMulti().GetJmPicResultsResult(info.data, epsId, scrambleId, pitureName)
1009 p = QImage()
1010 p.loadFromData(data)
1011
1012 clipboard = QApplication.clipboard()
1013 clipboard.setImage(p)
1014 QtOwner().ShowMsg(Str.GetStr(Str.CopySuc))
1015 return

Callers 1

eventFilterMethod · 0.45

Calls 5

TaskMultiClass · 0.90
QtOwnerClass · 0.90
GetJmPicResultsResultMethod · 0.80
GetStrMethod · 0.80
ShowMsgMethod · 0.45

Tested by

no test coverage detected