def copyImage(self): page, rect = self.widget().view.rubberband().selectedPage() if not page: return filename = self.widget().view.document().filename() import copy2image copy2image.copy_image(self, page, rect, filename)
def copyImage(self): page = self.widget().view.surface().selectedPage() if not page: return rect = self.widget().view.surface().selectedPageRect(page) import copy2image copy2image.copy_image(self, page, rect, documents.filename(page.document()))