def changeLighting(self): parentWidget = self.scene().views()[0] dialog = LicDialogs.LightingDialog(parentWidget, *LicGLHelpers.getLightParameters()) parentWidget.connect(dialog, SIGNAL("changeValues"), self.changeLightValues) parentWidget.connect(dialog, SIGNAL("acceptValues"), self.acceptLightValues) dialog.exec_()
def __writeTemplate(stream, template): # Build part dictionary, since it's not implicitly stored anywhere partDictionary = {} for part in template.steps[0].csi.getPartList(): if part.abstractPart.filename not in partDictionary: part.abstractPart.buildSubAbstractPartDict(partDictionary) stream << QString(os.path.basename(template.filename)) stream.writeBool(template.separatorsVisible) __writePartDictionary(stream, partDictionary) __writeSubmodel(stream, template.submodelPart) __writePage(stream, template) __writeStaticInfo(stream) # Need to save PageSize, PLI|CSI size, etc, so we can apply these on template load values = LicGLHelpers.getLightParameters() stream.writeInt32(len(values)) for v in values: stream.writeFloat(v)