Krita Source Code Documentation
Loading...
Searching...
No Matches
comics_project_management_tools.comics_template_dialog.comics_template_create Class Reference
+ Inheritance diagram for comics_project_management_tools.comics_template_dialog.comics_template_create:

Public Member Functions

 __init__ (self, templateDirectory)
 
 prepare_krita_file (self)
 
 setDefaults (self, type)
 
 slot_call_color_dialog (self)
 
 updateImagePreview (self)
 
 url (self)
 

Public Attributes

 accept
 
 bleedBottom
 
 bleedBottomUnit
 
 bleedLeft
 
 bleedLeftUnit
 
 bleedRight
 
 bleedRightUnit
 
 bleedTop
 
 bleedTopUnit
 
 DPI
 
 heightUnit
 
 imagePreview
 
 marginBottom
 
 marginBottomUnit
 
 marginLeft
 
 marginLeftUnit
 
 marginRight
 
 marginRightUnit
 
 marginTop
 
 marginTopUnit
 
 reject
 
 slot_call_color_dialog
 
 spn_height
 
 spn_width
 
 templateName
 
 updateImagePreview
 
 widthUnit
 

Static Public Attributes

 currentColor = QColor(Qt.GlobalColor.white)
 
 templateDirectory = str()
 
 urlSavedTemplate = str()
 

Detailed Description

Definition at line 133 of file comics_template_dialog.py.

Constructor & Destructor Documentation

◆ __init__()

comics_project_management_tools.comics_template_dialog.comics_template_create.__init__ ( self,
templateDirectory )

Definition at line 138 of file comics_template_dialog.py.

138 def __init__(self, templateDirectory):
139 super().__init__()
140 self.templateDirectory = templateDirectory
141 self.setWindowTitle(i18n("Create new Template"))
142 self.setLayout(QVBoxLayout())
143 buttons = QDialogButtonBox(QDialogButtonBox.StandardButton.Ok | QDialogButtonBox.StandardButton.Cancel)
144 buttons.accepted.connect(self.accept)
145 buttons.rejected.connect(self.reject)
146 mainWidget = QWidget()
147 explanation = QLabel(i18n("This allows you to make a template document with guides.\nThe width and height are the size of the live-area, the safe area is the live area minus the margins, and the full image is the live area plus the bleeds."))
148 explanation.setWordWrap(True)
149 self.layout().addWidget(explanation)
150 self.layout().addWidget(mainWidget)
151 self.layout().addWidget(buttons)
152 mainWidget.setLayout(QHBoxLayout())
153 elements = QWidget()
154 elements.setLayout(QVBoxLayout())
155 previewLayout = QWidget()
156 previewLayout.setLayout(QVBoxLayout())
157 mainWidget.layout().addWidget(elements)
158 mainWidget.layout().addWidget(previewLayout)
159 self.imagePreview = QLabel()
160 self.imagePreview.setMinimumSize(256, 256)
161 previewLayout.layout().addWidget(self.imagePreview)
162
163 self.templateName = QLineEdit()
164 self.templateName.setPlaceholderText("...")
165 elements.layout().addWidget(self.templateName)
166
167 templateBGColor = QPushButton(i18n("Select background color"))
168 templateBGColor.clicked.connect(self.slot_call_color_dialog)
169 previewLayout.layout().addWidget(templateBGColor)
170
171 self.DPI = QSpinBox()
172 self.DPI.setMaximum(1200)
173 self.DPI.setValue(300)
174 self.spn_width = QDoubleSpinBox()
175 self.spn_width.setMaximum(10000)
176 self.spn_height = QDoubleSpinBox()
177 self.spn_height.setMaximum(10000)
178 self.widthUnit = simpleUnitBox()
179 self.heightUnit = simpleUnitBox()
180
181 widgetSize = QWidget()
182 sizeForm = QFormLayout()
183 sizeForm.addRow(i18n("DPI:"), self.DPI)
184 widthLayout = QHBoxLayout()
185 widthLayout.addWidget(self.spn_width)
186 widthLayout.addWidget(self.widthUnit)
187 sizeForm.addRow(i18n("Width:"), widthLayout)
188 heightLayout = QHBoxLayout()
189 heightLayout.addWidget(self.spn_height)
190 heightLayout.addWidget(self.heightUnit)
191 sizeForm.addRow(i18n("Height:"), heightLayout)
192 widgetSize.setLayout(sizeForm)
193 elements.layout().addWidget(widgetSize)
194
195 marginAndBleed = QTabWidget()
196 elements.layout().addWidget(marginAndBleed)
197
198 margins = QWidget()
199 marginForm = QGridLayout()
200 margins.setLayout(marginForm)
201 self.marginLeft = QDoubleSpinBox()
202 self.marginLeft.setMaximum(1000)
203 self.marginLeftUnit = simpleUnitBox()
204 self.marginRight = QDoubleSpinBox()
205 self.marginRight.setMaximum(1000)
206 self.marginRightUnit = simpleUnitBox()
207 self.marginTop = QDoubleSpinBox()
208 self.marginTop.setMaximum(1000)
209 self.marginTopUnit = simpleUnitBox()
210 self.marginBottom = QDoubleSpinBox()
211 self.marginBottom.setMaximum(1000)
212 self.marginBottomUnit = simpleUnitBox()
213 marginForm.addWidget(QLabel(i18n("Left:")), 0, 0, Qt.AlignmentFlag.AlignRight)
214 marginForm.addWidget(self.marginLeft, 0, 1)
215 marginForm.addWidget(self.marginLeftUnit, 0, 2)
216 marginForm.addWidget(QLabel(i18n("Top:")), 1, 0, Qt.AlignmentFlag.AlignRight)
217 marginForm.addWidget(self.marginTop, 1, 1)
218 marginForm.addWidget(self.marginTopUnit, 1, 2)
219 marginForm.addWidget(QLabel(i18n("Right:")), 2, 0, Qt.AlignmentFlag.AlignRight)
220 marginForm.addWidget(self.marginRight, 2, 1)
221 marginForm.addWidget(self.marginRightUnit, 2, 2)
222 marginForm.addWidget(QLabel(i18n("Bottom:")), 3, 0, Qt.AlignmentFlag.AlignRight)
223 marginForm.addWidget(self.marginBottom, 3, 1)
224 marginForm.addWidget(self.marginBottomUnit, 3, 2)
225 marginAndBleed.addTab(margins, i18n("Margins"))
226
227 bleeds = QWidget()
228 bleedsForm = QGridLayout()
229 bleeds.setLayout(bleedsForm)
230 self.bleedLeft = QDoubleSpinBox()
231 self.bleedLeft.setMaximum(1000)
232 self.bleedLeftUnit = simpleUnitBox()
233 self.bleedRight = QDoubleSpinBox()
234 self.bleedRight.setMaximum(1000)
235 self.bleedRightUnit = simpleUnitBox()
236 self.bleedTop = QDoubleSpinBox()
237 self.bleedTop.setMaximum(1000)
238 self.bleedTopUnit = simpleUnitBox()
239 self.bleedBottom = QDoubleSpinBox()
240 self.bleedBottom.setMaximum(1000)
241 self.bleedBottomUnit = simpleUnitBox()
242 bleedsForm.addWidget(QLabel(i18n("Left:")), 0, 0, Qt.AlignmentFlag.AlignRight)
243 bleedsForm.addWidget(self.bleedLeft, 0, 1)
244 bleedsForm.addWidget(self.bleedLeftUnit, 0, 2)
245 bleedsForm.addWidget(QLabel(i18n("Top:")), 1, 0, Qt.AlignmentFlag.AlignRight)
246 bleedsForm.addWidget(self.bleedTop, 1, 1)
247 bleedsForm.addWidget(self.bleedTopUnit, 1, 2)
248 bleedsForm.addWidget(QLabel(i18n("Right:")), 2, 0, Qt.AlignmentFlag.AlignRight)
249 bleedsForm.addWidget(self.bleedRight, 2, 1)
250 bleedsForm.addWidget(self.bleedRightUnit, 2, 2)
251 bleedsForm.addWidget(QLabel(i18n("Bottom:")), 3, 0, Qt.AlignmentFlag.AlignRight)
252 bleedsForm.addWidget(self.bleedBottom, 3, 1)
253 bleedsForm.addWidget(self.bleedBottomUnit, 3, 2)
254
255 marginAndBleed.addTab(bleeds, i18n("Bleeds"))
256
257 if QLocale().system().measurementSystem() is QLocale.MeasurementSystem.MetricSystem:
258 self.setDefaults("European")
259 else:
260 self.setDefaults("American")
261
262 self.spn_width.valueChanged.connect(self.updateImagePreview)
263 self.widthUnit.currentIndexChanged.connect(self.updateImagePreview)
264 self.spn_height.valueChanged.connect(self.updateImagePreview)
265 self.heightUnit.currentIndexChanged.connect(self.updateImagePreview)
266 self.marginLeft.valueChanged.connect(self.updateImagePreview)
267 self.marginLeftUnit.currentIndexChanged.connect(self.updateImagePreview)
268 self.marginRight.valueChanged.connect(self.updateImagePreview)
269 self.marginRightUnit.currentIndexChanged.connect(self.updateImagePreview)
270 self.marginTop.valueChanged.connect(self.updateImagePreview)
271 self.marginTopUnit.currentIndexChanged.connect(self.updateImagePreview)
272 self.marginBottom.valueChanged.connect(self.updateImagePreview)
273 self.marginBottomUnit.currentIndexChanged.connect(self.updateImagePreview)
274 self.bleedLeft.valueChanged.connect(self.updateImagePreview)
275 self.bleedLeftUnit.currentIndexChanged.connect(self.updateImagePreview)
276 self.bleedRight.valueChanged.connect(self.updateImagePreview)
277 self.bleedRightUnit.currentIndexChanged.connect(self.updateImagePreview)
278 self.bleedTop.valueChanged.connect(self.updateImagePreview)
279 self.bleedTopUnit.currentIndexChanged.connect(self.updateImagePreview)
280 self.bleedBottom.valueChanged.connect(self.updateImagePreview)
281 self.bleedBottomUnit.currentIndexChanged.connect(self.updateImagePreview)
282
283 self.updateImagePreview()
284

References comics_project_management_tools.comics_template_dialog.comics_template_create.__init__(), KisPipeBrushParasite.dim, KisSpinBoxUnitManager.dim, FlattenSpec.dim, xcfLayer.dim, comics_project_management_tools.comics_template_dialog.comics_template_dialog.templateDirectory, and comics_project_management_tools.comics_template_dialog.comics_template_create.templateDirectory.

Member Function Documentation

◆ prepare_krita_file()

comics_project_management_tools.comics_template_dialog.comics_template_create.prepare_krita_file ( self)

Definition at line 293 of file comics_template_dialog.py.

293 def prepare_krita_file(self):
294 wBase = max(self.widthUnit.pixelsForUnit(self.spn_width.value(), self.DPI.value()), 1)
295 bL = self.bleedLeftUnit.pixelsForUnit(self.bleedLeft.value(), self.DPI.value())
296 bR = self.bleedRightUnit.pixelsForUnit(self.bleedRight.value(), self.DPI.value())
297 mL = self.marginLeftUnit.pixelsForUnit(self.marginLeft.value(), self.DPI.value())
298 mR = self.marginRightUnit.pixelsForUnit(self.marginRight.value(), self.DPI.value())
299
300 hBase = max(self.heightUnit.pixelsForUnit(self.spn_height.value(), self.DPI.value()), 1)
301 bT = self.bleedTopUnit.pixelsForUnit(self.bleedTop.value(), self.DPI.value())
302 bB = self.bleedBottomUnit.pixelsForUnit(self.bleedBottom.value(), self.DPI.value())
303 mT = self.marginTopUnit.pixelsForUnit(self.marginTop.value(), self.DPI.value())
304 mB = self.marginBottomUnit.pixelsForUnit(self.marginBottom.value(), self.DPI.value())
305
306 template = Application.createDocument(int(wBase + bL + bR), int(hBase + bT + bB), self.templateName.text(), "RGBA", "U8", "sRGB built-in", self.DPI.value())
307
308 backgroundName = i18n("Background")
309 if len(template.topLevelNodes()) > 0:
310 backgroundNode = template.topLevelNodes()[0]
311 backgroundNode.setName(backgroundName)
312 else:
313 backgroundNode = template.createNode(backgroundName, "paintlayer")
314 template.rootNode().addChildNode(backgroundNode, None)
315
316 pixelByteArray = QByteArray()
317 if self.currentColor == Qt.GlobalColor.white:
318 pixelByteArray = backgroundNode.pixelData(0, 0, template.width(), template.height())
319 pixelByteArray.fill(int(255).to_bytes(1, byteorder='little'))
320 else:
321 red = int(self.currentColor.redF()*255).to_bytes(1, byteorder='little')
322 green = int(self.currentColor.greenF()*255).to_bytes(1, byteorder='little')
323 blue = int(self.currentColor.blueF()*255).to_bytes(1, byteorder='little')
324 alpha = int(self.currentColor.alphaF()*255).to_bytes(1, byteorder='little')
325
326 progress = QProgressDialog(i18n("Creating template"), str(), 0, template.width()*template.height())
327 progress.setCancelButton(None)
328 progress.show()
329 QApplication.instance().processEvents()
330 for byteNumber in range(template.width()*template.height()):
331 pixelByteArray.append( blue)
332 pixelByteArray.append(green)
333 pixelByteArray.append( red)
334 pixelByteArray.append(alpha)
335 progress.setValue(byteNumber)
336 backgroundNode.setPixelData(pixelByteArray, 0, 0, template.width(), template.height())
337 backgroundNode.setOpacity(255)
338 backgroundNode.setLocked(True)
339
340 sketchNode = template.createNode(i18n("Sketch"), "paintlayer")
341 template.rootNode().addChildNode(sketchNode, backgroundNode)
342
343 verticalGuides = []
344 verticalGuides.append(bL)
345 verticalGuides.append(bL + mL)
346 verticalGuides.append((bL + wBase) - mR)
347 verticalGuides.append(bL + wBase)
348
349 horizontalGuides = []
350 horizontalGuides.append(bT)
351 horizontalGuides.append(bT + mT)
352 horizontalGuides.append((bT + hBase) - mB)
353 horizontalGuides.append(bT + hBase)
354
355 template.setHorizontalGuides(horizontalGuides)
356 template.setVerticalGuides(verticalGuides)
357 template.setGuidesVisible(True)
358 template.setGuidesLocked(True)
359 template.refreshProjection()
360
361 self.urlSavedTemplate = os.path.join(self.templateDirectory, self.templateName.text() + ".kra")
362 success = template.exportImage(self.urlSavedTemplate, InfoObject())
363 print("CPMT: Template", self.templateName.text(), "made and saved.")
364 template.waitForDone()
365 template.close()
366
367 return success
368
float value(const T *src, size_t ch)

References comics_project_management_tools.comics_template_dialog.comics_template_create.bleedBottom, comics_project_management_tools.comics_template_dialog.comics_template_create.bleedBottomUnit, comics_project_management_tools.comics_template_dialog.comics_template_create.bleedLeft, comics_project_management_tools.comics_template_dialog.comics_template_create.bleedLeftUnit, comics_project_management_tools.comics_template_dialog.comics_template_create.bleedRight, comics_project_management_tools.comics_template_dialog.comics_template_create.bleedRightUnit, comics_project_management_tools.comics_template_dialog.comics_template_create.bleedTop, comics_project_management_tools.comics_template_dialog.comics_template_create.bleedTopUnit, SvgGraphicsContext.currentColor, KisColorizeMask::Private.currentColor, KisAsyncColorSamplerHelper::Private.currentColor, KisColorSamplerStrokeStrategy::Data.currentColor, KisScreenColorSampler::Private.currentColor, KisScreenColorSampler.currentColor(), KisDlgInternalColorSelector::Private.currentColor, KisVisualColorModel.currentColor(), KoColorPopupAction::KoColorPopupActionPrivate.currentColor, KisColorSelectorComponent.currentColor(), KoColorPopupAction.currentColor(), KoColorSlider.currentColor(), comics_project_management_tools.comics_template_dialog.comics_template_create.currentColor, comics_project_management_tools.comics_template_dialog.comics_template_create.DPI, RESN_INFO_1005.heightUnit, comics_project_management_tools.comics_template_dialog.comics_template_create.heightUnit, comics_project_management_tools.comics_template_dialog.comics_template_create.marginBottom, comics_project_management_tools.comics_template_dialog.comics_template_create.marginBottomUnit, comics_project_management_tools.comics_template_dialog.comics_template_create.marginLeft, comics_project_management_tools.comics_template_dialog.comics_template_create.marginLeftUnit, comics_project_management_tools.comics_template_dialog.comics_template_create.marginRight, comics_project_management_tools.comics_template_dialog.comics_template_create.marginRightUnit, comics_project_management_tools.comics_template_dialog.comics_template_create.marginTop, comics_project_management_tools.comics_template_dialog.comics_template_create.marginTopUnit, comics_project_management_tools.comics_export_dialog.comic_export_resize_widget.spn_height, comics_project_management_tools.comics_template_dialog.comics_template_create.spn_height, comics_project_management_tools.comics_export_dialog.comic_export_resize_widget.spn_width, comics_project_management_tools.comics_template_dialog.comics_template_create.spn_width, comics_project_management_tools.comics_template_dialog.comics_template_dialog.templateDirectory, comics_project_management_tools.comics_template_dialog.comics_template_create.templateDirectory, comics_project_management_tools.comics_template_dialog.comics_template_create.templateName, comics_project_management_tools.comics_template_dialog.comics_template_create.urlSavedTemplate, value(), RESN_INFO_1005.widthUnit, and comics_project_management_tools.comics_template_dialog.comics_template_create.widthUnit.

◆ setDefaults()

comics_project_management_tools.comics_template_dialog.comics_template_create.setDefaults ( self,
type )

Definition at line 427 of file comics_template_dialog.py.

427 def setDefaults(self, type):
428
429 if type == "American":
430 # American 11x17 inch
431 self.spn_width.setValue(11)
432 self.widthUnit.setCurrentIndex(1)
433 self.spn_height.setValue(17)
434 self.heightUnit.setCurrentIndex(1)
435 self.bleedBottom.setValue(1)
436 self.bleedBottomUnit.setCurrentIndex(1)
437 self.bleedTop.setValue(1)
438 self.bleedTopUnit.setCurrentIndex(1)
439 self.bleedLeft.setValue(0.5)
440 self.bleedLeftUnit.setCurrentIndex(1)
441 self.bleedRight.setValue(0.5)
442 self.bleedRightUnit.setCurrentIndex(1)
443 self.marginBottom.setValue(0.745)
444 self.marginBottomUnit.setCurrentIndex(1)
445 self.marginTop.setValue(0.745)
446 self.marginTopUnit.setCurrentIndex(1)
447 self.marginRight.setValue(0.5)
448 self.marginRightUnit.setCurrentIndex(1)
449 self.marginLeft.setValue(0.5)
450 self.marginLeftUnit.setCurrentIndex(1)
451 if type == "European":
452 # European A4
453 self.spn_width.setValue(21)
454 self.widthUnit.setCurrentIndex(2)
455 self.spn_height.setValue(29.7)
456 self.heightUnit.setCurrentIndex(2)
457 self.bleedBottom.setValue(5)
458 self.bleedBottomUnit.setCurrentIndex(3)
459 self.bleedTop.setValue(5)
460 self.bleedTopUnit.setCurrentIndex(3)
461 self.bleedLeft.setValue(5)
462 self.bleedLeftUnit.setCurrentIndex(3)
463 self.bleedRight.setValue(5)
464 self.bleedRightUnit.setCurrentIndex(3)
465 self.marginBottom.setValue(1.5)
466 self.marginBottomUnit.setCurrentIndex(2)
467 self.marginTop.setValue(1.5)
468 self.marginTopUnit.setCurrentIndex(2)
469 self.marginRight.setValue(1)
470 self.marginRightUnit.setCurrentIndex(2)
471 self.marginLeft.setValue(1)
472 self.marginLeftUnit.setCurrentIndex(2)
473

References comics_project_management_tools.comics_template_dialog.comics_template_create.bleedBottom, comics_project_management_tools.comics_template_dialog.comics_template_create.bleedBottomUnit, comics_project_management_tools.comics_template_dialog.comics_template_create.bleedLeft, comics_project_management_tools.comics_template_dialog.comics_template_create.bleedLeftUnit, comics_project_management_tools.comics_template_dialog.comics_template_create.bleedRight, comics_project_management_tools.comics_template_dialog.comics_template_create.bleedRightUnit, comics_project_management_tools.comics_template_dialog.comics_template_create.bleedTop, comics_project_management_tools.comics_template_dialog.comics_template_create.bleedTopUnit, RESN_INFO_1005.heightUnit, comics_project_management_tools.comics_template_dialog.comics_template_create.heightUnit, comics_project_management_tools.comics_template_dialog.comics_template_create.marginBottom, comics_project_management_tools.comics_template_dialog.comics_template_create.marginBottomUnit, comics_project_management_tools.comics_template_dialog.comics_template_create.marginLeft, comics_project_management_tools.comics_template_dialog.comics_template_create.marginLeftUnit, comics_project_management_tools.comics_template_dialog.comics_template_create.marginRight, comics_project_management_tools.comics_template_dialog.comics_template_create.marginRightUnit, comics_project_management_tools.comics_template_dialog.comics_template_create.marginTop, comics_project_management_tools.comics_template_dialog.comics_template_create.marginTopUnit, comics_project_management_tools.comics_export_dialog.comic_export_resize_widget.spn_height, comics_project_management_tools.comics_template_dialog.comics_template_create.spn_height, comics_project_management_tools.comics_export_dialog.comic_export_resize_widget.spn_width, comics_project_management_tools.comics_template_dialog.comics_template_create.spn_width, RESN_INFO_1005.widthUnit, and comics_project_management_tools.comics_template_dialog.comics_template_create.widthUnit.

◆ slot_call_color_dialog()

◆ updateImagePreview()

comics_project_management_tools.comics_template_dialog.comics_template_create.updateImagePreview ( self)

Definition at line 369 of file comics_template_dialog.py.

369 def updateImagePreview(self):
370 maxSize = 256
371
372 wBase = max(self.widthUnit.pixelsForUnit(self.spn_width.value(), self.DPI.value()), 1)
373 bL = self.bleedLeftUnit.pixelsForUnit(self.bleedLeft.value(), self.DPI.value())
374 bR = self.bleedRightUnit.pixelsForUnit(self.bleedRight.value(), self.DPI.value())
375 mL = self.marginLeftUnit.pixelsForUnit(self.marginLeft.value(), self.DPI.value())
376 mR = self.marginRightUnit.pixelsForUnit(self.marginRight.value(), self.DPI.value())
377
378 hBase = max(self.heightUnit.pixelsForUnit(self.spn_height.value(), self.DPI.value()), 1)
379 bT = self.bleedTopUnit.pixelsForUnit(self.bleedTop.value(), self.DPI.value())
380 bB = self.bleedBottomUnit.pixelsForUnit(self.bleedBottom.value(), self.DPI.value())
381 mT = self.marginTopUnit.pixelsForUnit(self.marginTop.value(), self.DPI.value())
382 mB = self.marginBottomUnit.pixelsForUnit(self.marginBottom.value(), self.DPI.value())
383
384 scaleRatio = maxSize / (hBase + bT + bB)
385 if wBase > hBase:
386 scaleRatio = maxSize / (wBase + bR + bL)
387
388 width = (wBase + bL + bR) * scaleRatio
389 height = (hBase + bT + bB) * scaleRatio
390 topLeft = [max((maxSize - width) / 2, 0), max((maxSize - height) / 2, 0)]
391
392 image = QImage(maxSize, maxSize, QImage.Format.Format_ARGB32)
393 image.fill(Qt.GlobalColor.transparent)
394
395 p = QPainter(image)
396
397 p.setBrush(self.currentColor)
398
399 CanvasSize = QRectF(topLeft[0], topLeft[1], width, height)
400 p.drawRect(CanvasSize.toRect())
401
402 # Draw bleeds.
403 PageSize = CanvasSize
404 PageSize.setWidth(width - (bR * scaleRatio))
405 PageSize.setHeight(height - (bB * scaleRatio))
406 PageSize.setX(PageSize.x() + (bL * scaleRatio))
407 PageSize.setY(PageSize.y() + (bT * scaleRatio))
408
409 p.setPen(Qt.GlobalColor.blue)
410 p.setBrush(Qt.GlobalColor.transparent)
411 p.drawRect(PageSize.toRect())
412
413 # Draw liveArea
414 LiveArea = PageSize
415 LiveArea.setWidth(LiveArea.width() - (mR * scaleRatio))
416 LiveArea.setHeight(LiveArea.height() - (mB * scaleRatio))
417 LiveArea.setX(LiveArea.x() + (mL * scaleRatio))
418 LiveArea.setY(LiveArea.y() + (mT * scaleRatio))
419
420 p.setPen(Qt.GlobalColor.blue)
421 p.drawRect(LiveArea.toRect())
422
423 p.end()
424
425 self.imagePreview.setPixmap(QPixmap.fromImage(image))
426

References comics_project_management_tools.comics_template_dialog.comics_template_create.bleedBottom, comics_project_management_tools.comics_template_dialog.comics_template_create.bleedBottomUnit, comics_project_management_tools.comics_template_dialog.comics_template_create.bleedLeft, comics_project_management_tools.comics_template_dialog.comics_template_create.bleedLeftUnit, comics_project_management_tools.comics_template_dialog.comics_template_create.bleedRight, comics_project_management_tools.comics_template_dialog.comics_template_create.bleedRightUnit, comics_project_management_tools.comics_template_dialog.comics_template_create.bleedTop, comics_project_management_tools.comics_template_dialog.comics_template_create.bleedTopUnit, SvgGraphicsContext.currentColor, KisColorizeMask::Private.currentColor, KisAsyncColorSamplerHelper::Private.currentColor, KisColorSamplerStrokeStrategy::Data.currentColor, KisScreenColorSampler::Private.currentColor, KisScreenColorSampler.currentColor(), KisDlgInternalColorSelector::Private.currentColor, KisColorSelectorComponent.currentColor(), KisVisualColorModel.currentColor(), KoColorPopupAction::KoColorPopupActionPrivate.currentColor, KoColorPopupAction.currentColor(), KoColorSlider.currentColor(), comics_project_management_tools.comics_template_dialog.comics_template_create.currentColor, comics_project_management_tools.comics_template_dialog.comics_template_create.DPI, RESN_INFO_1005.heightUnit, comics_project_management_tools.comics_template_dialog.comics_template_create.heightUnit, comics_project_management_tools.comics_template_dialog.comics_template_create.imagePreview, comics_project_management_tools.comics_template_dialog.comics_template_create.marginBottom, comics_project_management_tools.comics_template_dialog.comics_template_create.marginBottomUnit, comics_project_management_tools.comics_template_dialog.comics_template_create.marginLeft, comics_project_management_tools.comics_template_dialog.comics_template_create.marginLeftUnit, comics_project_management_tools.comics_template_dialog.comics_template_create.marginRight, comics_project_management_tools.comics_template_dialog.comics_template_create.marginRightUnit, comics_project_management_tools.comics_template_dialog.comics_template_create.marginTop, comics_project_management_tools.comics_template_dialog.comics_template_create.marginTopUnit, comics_project_management_tools.comics_export_dialog.comic_export_resize_widget.spn_height, comics_project_management_tools.comics_template_dialog.comics_template_create.spn_height, comics_project_management_tools.comics_export_dialog.comic_export_resize_widget.spn_width, comics_project_management_tools.comics_template_dialog.comics_template_create.spn_width, value(), RESN_INFO_1005.widthUnit, and comics_project_management_tools.comics_template_dialog.comics_template_create.widthUnit.

◆ url()

comics_project_management_tools.comics_template_dialog.comics_template_create.url ( self)

Definition at line 474 of file comics_template_dialog.py.

474 def url(self):
475 return self.urlSavedTemplate

References comics_project_management_tools.comics_template_dialog.comics_template_create.urlSavedTemplate.

Member Data Documentation

◆ accept

comics_project_management_tools.comics_template_dialog.comics_template_create.accept

Definition at line 144 of file comics_template_dialog.py.

◆ bleedBottom

comics_project_management_tools.comics_template_dialog.comics_template_create.bleedBottom

Definition at line 239 of file comics_template_dialog.py.

◆ bleedBottomUnit

comics_project_management_tools.comics_template_dialog.comics_template_create.bleedBottomUnit

Definition at line 241 of file comics_template_dialog.py.

◆ bleedLeft

comics_project_management_tools.comics_template_dialog.comics_template_create.bleedLeft

Definition at line 230 of file comics_template_dialog.py.

◆ bleedLeftUnit

comics_project_management_tools.comics_template_dialog.comics_template_create.bleedLeftUnit

Definition at line 232 of file comics_template_dialog.py.

◆ bleedRight

comics_project_management_tools.comics_template_dialog.comics_template_create.bleedRight

Definition at line 233 of file comics_template_dialog.py.

◆ bleedRightUnit

comics_project_management_tools.comics_template_dialog.comics_template_create.bleedRightUnit

Definition at line 235 of file comics_template_dialog.py.

◆ bleedTop

comics_project_management_tools.comics_template_dialog.comics_template_create.bleedTop

Definition at line 236 of file comics_template_dialog.py.

◆ bleedTopUnit

comics_project_management_tools.comics_template_dialog.comics_template_create.bleedTopUnit

Definition at line 238 of file comics_template_dialog.py.

◆ currentColor

comics_project_management_tools.comics_template_dialog.comics_template_create.currentColor = QColor(Qt.GlobalColor.white)
static

Definition at line 136 of file comics_template_dialog.py.

◆ DPI

comics_project_management_tools.comics_template_dialog.comics_template_create.DPI

Definition at line 171 of file comics_template_dialog.py.

◆ heightUnit

comics_project_management_tools.comics_template_dialog.comics_template_create.heightUnit

Definition at line 179 of file comics_template_dialog.py.

◆ imagePreview

comics_project_management_tools.comics_template_dialog.comics_template_create.imagePreview

Definition at line 159 of file comics_template_dialog.py.

◆ marginBottom

comics_project_management_tools.comics_template_dialog.comics_template_create.marginBottom

Definition at line 210 of file comics_template_dialog.py.

◆ marginBottomUnit

comics_project_management_tools.comics_template_dialog.comics_template_create.marginBottomUnit

Definition at line 212 of file comics_template_dialog.py.

◆ marginLeft

comics_project_management_tools.comics_template_dialog.comics_template_create.marginLeft

Definition at line 201 of file comics_template_dialog.py.

◆ marginLeftUnit

comics_project_management_tools.comics_template_dialog.comics_template_create.marginLeftUnit

Definition at line 203 of file comics_template_dialog.py.

◆ marginRight

comics_project_management_tools.comics_template_dialog.comics_template_create.marginRight

Definition at line 204 of file comics_template_dialog.py.

◆ marginRightUnit

comics_project_management_tools.comics_template_dialog.comics_template_create.marginRightUnit

Definition at line 206 of file comics_template_dialog.py.

◆ marginTop

comics_project_management_tools.comics_template_dialog.comics_template_create.marginTop

Definition at line 207 of file comics_template_dialog.py.

◆ marginTopUnit

comics_project_management_tools.comics_template_dialog.comics_template_create.marginTopUnit

Definition at line 209 of file comics_template_dialog.py.

◆ reject

comics_project_management_tools.comics_template_dialog.comics_template_create.reject

Definition at line 145 of file comics_template_dialog.py.

◆ slot_call_color_dialog

comics_project_management_tools.comics_template_dialog.comics_template_create.slot_call_color_dialog

Definition at line 168 of file comics_template_dialog.py.

◆ spn_height

comics_project_management_tools.comics_template_dialog.comics_template_create.spn_height

Definition at line 176 of file comics_template_dialog.py.

◆ spn_width

comics_project_management_tools.comics_template_dialog.comics_template_create.spn_width

Definition at line 174 of file comics_template_dialog.py.

◆ templateDirectory

comics_project_management_tools.comics_template_dialog.comics_template_create.templateDirectory = str()
static

Definition at line 135 of file comics_template_dialog.py.

◆ templateName

comics_project_management_tools.comics_template_dialog.comics_template_create.templateName

Definition at line 163 of file comics_template_dialog.py.

◆ updateImagePreview

comics_project_management_tools.comics_template_dialog.comics_template_create.updateImagePreview

Definition at line 262 of file comics_template_dialog.py.

◆ urlSavedTemplate

comics_project_management_tools.comics_template_dialog.comics_template_create.urlSavedTemplate = str()
static

Definition at line 134 of file comics_template_dialog.py.

◆ widthUnit

comics_project_management_tools.comics_template_dialog.comics_template_create.widthUnit

Definition at line 178 of file comics_template_dialog.py.


The documentation for this class was generated from the following file: