78 elif self.rRGBA.isChecked(): |
78 elif self.rRGBA.isChecked(): |
79 QColorDialog.getColor( |
79 QColorDialog.getColor( |
80 QColor(self.sRed.value(), self.sGreen.value(), |
80 QColor(self.sRed.value(), self.sGreen.value(), |
81 self.sBlue.value(), self.sAlpha.value()), |
81 self.sBlue.value(), self.sAlpha.value()), |
82 None, self.eTitle.text(), |
82 None, self.eTitle.text(), |
83 QColorDialog.ColorDialogOptions( |
83 QColorDialog.ColorDialogOption.ShowAlphaChannel) |
84 QColorDialog.ColorDialogOption.ShowAlphaChannel)) |
|
85 |
84 |
86 def on_eRGB_textChanged(self, text): |
85 def on_eRGB_textChanged(self, text): |
87 """ |
86 """ |
88 Private slot to handle the textChanged signal of eRGB. |
87 Private slot to handle the textChanged signal of eRGB. |
89 |
88 |
155 istring, os.linesep) |
154 istring, os.linesep) |
156 code += '{0}{1},{2}'.format(istring, parent, os.linesep) |
155 code += '{0}{1},{2}'.format(istring, parent, os.linesep) |
157 code += '{0}self.tr("{1}"),{2}'.format( |
156 code += '{0}self.tr("{1}"),{2}'.format( |
158 istring, self.eTitle.text(), os.linesep) |
157 istring, self.eTitle.text(), os.linesep) |
159 code += ( |
158 code += ( |
160 '{0}QColorDialog.ColorDialogOptions(' |
159 '{0}QColorDialog.ColorDialogOption.ShowAlphaChannel' |
161 'QColorDialog.ColorDialogOption.ShowAlphaChannel)' |
|
162 .format(istring) |
160 .format(istring) |
163 ) |
161 ) |
164 code += '){0}'.format(estring) |
162 code += '){0}'.format(estring) |
165 elif self.rRGBA.isChecked(): |
163 elif self.rRGBA.isChecked(): |
166 code += 'getColor({0}'.format(os.linesep) |
164 code += 'getColor({0}'.format(os.linesep) |
173 istring, self.eRGB.text(), os.linesep) |
171 istring, self.eRGB.text(), os.linesep) |
174 code += '{0}{1},{2}'.format(istring, parent, os.linesep) |
172 code += '{0}{1},{2}'.format(istring, parent, os.linesep) |
175 code += '{0}self.tr("{1}"),{2}'.format( |
173 code += '{0}self.tr("{1}"),{2}'.format( |
176 istring, self.eTitle.text(), os.linesep) |
174 istring, self.eTitle.text(), os.linesep) |
177 code += ( |
175 code += ( |
178 '{0}QColorDialog.ColorDialogOptions(' |
176 '{0}QColorDialog.ColorDialogOption.ShowAlphaChannel' |
179 'QColorDialog.ColorDialogOption.ShowAlphaChannel)' |
|
180 .format(istring) |
177 .format(istring) |
181 ) |
178 ) |
182 code += '){0}'.format(estring) |
179 code += '){0}'.format(estring) |
183 |
180 |
184 return code |
181 return code |