def setOtherUnits(self): color = colorSetting(self.parent) color.setColor("rgb(" + str(self.parent.rSpin.GetValue()) + ", " + str(self.parent.gSpin.GetValue()) + ", " + str(self.parent.bSpin.GetValue()) + ")") color.setCmyk() color.setHex() color.setSelect()
def setOtherUnits(self): textCtrl = self.GetWindow() rgb = textCtrl.GetValue() colors = colorSetting(self.parent) colors.setColor("rgb(" + str(rgb[0]) + ", " + str(rgb[1]) + ", " + str(rgb[2]) + ")") colors.setRgb() colors.setCmyk() colors.setHex()
def setUnit(self): textCtrl = self.GetWindow() color = colorSetting(self.parent) window = ["select", "rgb", "cmyk", "hex"] for obj in window: self.frame.FindWindowByName("color" + obj.capitalize() + "Panel").Disable() if textCtrl.GetSelection() == 0: self.frame.FindWindowByName("colorSelectPanel").Enable() self.frame.FindWindowByName("colorRgbPanel").Enable() elif textCtrl.GetSelection() == 1: self.frame.FindWindowByName("colorCmykPanel").Enable() elif textCtrl.GetSelection() == 2: self.frame.FindWindowByName("colorHexPanel").Enable()
def TransferToWindow(self): textCtrl = self.GetWindow() colors = colorSetting(self.parent) content = self.xml.find("{http://www.bitplant.de/template}content") if re.match(self.rgbRe, content.text): textCtrl.SetSelection(0) elif re.match(self.cmykRe, content.text): textCtrl.SetSelection(1) elif re.match(self.hexRe, content.text): textCtrl.SetSelection(2) colors.setColor(content.text) colors.setRgb() colors.setHex() colors.setCmyk() colors.setSelect() self.setUnit() self.frame.tempItemData["contentType"] = "color" return True
def setOtherUnits(self): colors = colorSetting(self.parent) colors.setColor("#" + self.parent.input.GetValue()) colors.setRgb() colors.setCmyk() colors.setSelect()
def setOtherUnits(self): colors = colorSetting(self.parent) colors.setColor("cmyk(" + str(self.parent.cSpin.GetValue()) + ", " + str(self.parent.mSpin.GetValue()) + ", " + str(self.parent.ySpin.GetValue()) +", " + str(self.parent.kSpin.GetValue()) + ")") colors.setRgb() colors.setHex() colors.setSelect()