Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++

CPMT: recover frames and text export.

Wolthera van Hövell tot Westerflier46a0cef24de6
diff --git a/plugins/python/comics_project_management_tools/comics_exporter.py b/plugins/python/comics_project_management_tools/comics_exporter.py
index 757aa7a55d..32e9401459 100644
--- a/plugins/python/comics_project_management_tools/comics_exporter.py
+++ b/plugins/python/comics_project_management_tools/comics_exporter.py
@@ -418,11 +418,19 @@ class comicsExporter():
"""
def handleShapeDescription(self, shape, list, textOnly=False):
+ if (shape.type() != "KoSvgTextShapeID" and textOnly is True):
+ return
+ shapeDesc = {}
+ shapeDesc["name"] = shape.name()
+ rect = shape.boundingBox()
+ listOfPoints = [rect.topLeft(), rect.topRight(), rect.bottomRight(), rect.bottomLeft()]
+ shapeDesc["boundingBox"] = listOfPoints
+ if (shape.type() == "KoSvgTextShapeID" and textOnly is True):
+ shapeDesc["text"] = shape.toSvg()
+ list.append(shapeDesc)
return
# Turn off shape retrieval for now until the new text tool is finished.
r"""
- if (shape.type() != "KoSvgTextShapeID" and textOnly is True):
- return
shapeDesc = {}
shapeDesc["name"] = shape.name()
rect = shape.boundingBox()
diff --git a/plugins/python/comics_project_management_tools/exporters/CPMT_ACBF_XML_Exporter.py b/plugins/python/comics_project_management_tools/exporters/CPMT_ACBF_XML_Exporter.py
index bbdab6dcba..ee25c0d612 100644
--- a/plugins/python/comics_project_management_tools/exporters/CPMT_ACBF_XML_Exporter.py
+++ b/plugins/python/comics_project_management_tools/exporters/CPMT_ACBF_XML_Exporter.py
@@ -282,7 +282,7 @@ def write_xml(configDictionary = {}, pageData = [], pagesLocationList = [], loc
if "publishingDate" in configDictionary.keys():
publishingDate = document.createElement("publish-date")
publishingDate.setAttribute("value", configDictionary["publishingDate"])
- publishingDate.appendChild(document.createTextNode(QDate.fromString(configDictionary["publishingDate"], Qt.DateFormat.ISODate).toString(Qt.DateFormat.SystemLocaleLongDate)))
+ publishingDate.appendChild(document.createTextNode(QDate.fromString(configDictionary["publishingDate"], Qt.DateFormat.ISODate).toString(Qt.DateFormat.TextDate)))
publisherInfo.appendChild(publishingDate)
if "publisherCity" in configDictionary.keys():
publishCity = document.createElement("city")
diff --git a/plugins/python/comics_project_management_tools/exporters/CPMT_EPUB_exporter.py b/plugins/python/comics_project_management_tools/exporters/CPMT_EPUB_exporter.py
index eda5067257..492f58d258 100644
--- a/plugins/python/comics_project_management_tools/exporters/CPMT_EPUB_exporter.py
+++ b/plugins/python/comics_project_management_tools/exporters/CPMT_EPUB_exporter.py
@@ -144,7 +144,7 @@ def export(configDictionary = {}, projectURL = str(), pagesLocationList = [], pa
transform = data["transform"]
for v in data["vector"]:
pointsList = []
- dominantColor = QColor(Qt.white)
+ dominantColor = QColor(Qt.GlobalColor.white)
listOfColors = []
for point in v["boundingBox"]:
offset = QPointF(transform["offsetX"], transform["offsetY"])