Differential D11076 Diff 29164 plugins/python/comics_project_management_tools/comics_project_manager_docker.py
Changeset View
Changeset View
Standalone View
Standalone View
plugins/python/comics_project_management_tools/comics_project_manager_docker.py
Show First 20 Lines • Show All 742 Lines • ▼ Show 20 Line(s) | 741 | if os.path.exists(absoluteUrl): | |||
---|---|---|---|---|---|
743 | listScales = exporterSizes.get_scale_from_resize_config(config["Scale"], [doc.width(), doc.height(), doc.resolution(), doc.resolution()]) | 743 | listScales = exporterSizes.get_scale_from_resize_config(config["Scale"], [doc.width(), doc.height(), doc.resolution(), doc.resolution()]) | ||
744 | doc.scaleImage(listScales[0], listScales[1], listScales[2], listScales[3], "bicubic") | 744 | doc.scaleImage(listScales[0], listScales[1], listScales[2], listScales[3], "bicubic") | ||
745 | doc.waitForDone() | 745 | doc.waitForDone() | ||
746 | doc.save() | 746 | doc.save() | ||
747 | doc.waitForDone() | 747 | doc.waitForDone() | ||
748 | doc.close() | 748 | doc.close() | ||
749 | 749 | | |||
750 | def slot_show_page_viewer(self): | 750 | def slot_show_page_viewer(self): | ||
751 | index = self.comicPageList.currentIndex() | 751 | index = int(self.comicPageList.currentIndex().row()) | ||
752 | if index.column() is not 0: | 752 | self.page_viewer_dialog.load_comic(self.path_to_config) | ||
753 | index = self.pagesModel.index(index.row(), 0) | 753 | self.page_viewer_dialog.go_to_page_index(index) | ||
754 | # Get the absolute url from the relative one in the pages model. | 754 | self.page_viewer_dialog.show() | ||
755 | absoluteUrl = os.path.join(self.projecturl, str(self.pagesModel.data(index, role=Qt.ToolTipRole))) | 755 | | ||
756 | | ||||
757 | # Make sure the page exists. | | |||
758 | if os.path.exists(absoluteUrl): | | |||
759 | page = zipfile.ZipFile(absoluteUrl, "r") | | |||
760 | image = QImage.fromData(page.read("mergedimage.png")) | | |||
761 | self.page_viewer_dialog.update_image(image) | | |||
762 | self.page_viewer_dialog.show() | | |||
763 | page.close() | | |||
764 | """ | 756 | """ | ||
765 | Function to copy the current project location into the clipboard. | 757 | Function to copy the current project location into the clipboard. | ||
766 | This is useful for users because they'll be able to use that url to quickly | 758 | This is useful for users because they'll be able to use that url to quickly | ||
767 | move to the project location in outside applications. | 759 | move to the project location in outside applications. | ||
768 | """ | 760 | """ | ||
769 | 761 | | |||
770 | def slot_copy_project_url(self): | 762 | def slot_copy_project_url(self): | ||
771 | if self.projecturl is not None: | 763 | if self.projecturl is not None: | ||
Show All 35 Lines |