eric6/Plugins/WizardPlugins/ColorDialogWizard/ColorDialogWizardDialog.py

changeset 7258
aff39db4dacc
parent 7229
53054eb5b15a
child 7360
9190402e4505
equal deleted inserted replaced
7257:c4d0cac9b5c9 7258:aff39db4dacc
153 else: 153 else:
154 code += '{0}QColor(Qt.white),{1}'.format(istring, os.linesep) 154 code += '{0}QColor(Qt.white),{1}'.format(istring, os.linesep)
155 code += '{0}{1},{2}'.format(istring, parent, os.linesep) 155 code += '{0}{1},{2}'.format(istring, parent, os.linesep)
156 code += '{0}self.tr("{1}"),{2}'.format( 156 code += '{0}self.tr("{1}"),{2}'.format(
157 istring, self.eTitle.text(), os.linesep) 157 istring, self.eTitle.text(), os.linesep)
158 code += '{0}QColorDialog.ColorDialogOptions(' \ 158 code += (
159 '{0}QColorDialog.ColorDialogOptions('
159 'QColorDialog.ShowAlphaChannel)'.format(istring) 160 'QColorDialog.ShowAlphaChannel)'.format(istring)
161 )
160 code += '){0}'.format(estring) 162 code += '){0}'.format(estring)
161 elif self.rRGBA.isChecked(): 163 elif self.rRGBA.isChecked():
162 code += 'getColor({0}'.format(os.linesep) 164 code += 'getColor({0}'.format(os.linesep)
163 if not self.eRGB.text(): 165 if not self.eRGB.text():
164 code += '{0}QColor({1:d}, {2:d}, {3:d}, {4:d}),{5}'.format( 166 code += '{0}QColor({1:d}, {2:d}, {3:d}, {4:d}),{5}'.format(
168 code += '{0}{1},{2}'.format( 170 code += '{0}{1},{2}'.format(
169 istring, self.eRGB.text(), os.linesep) 171 istring, self.eRGB.text(), os.linesep)
170 code += '{0}{1},{2}'.format(istring, parent, os.linesep) 172 code += '{0}{1},{2}'.format(istring, parent, os.linesep)
171 code += '{0}self.tr("{1}"),{2}'.format( 173 code += '{0}self.tr("{1}"),{2}'.format(
172 istring, self.eTitle.text(), os.linesep) 174 istring, self.eTitle.text(), os.linesep)
173 code += '{0}QColorDialog.ColorDialogOptions(' \ 175 code += (
176 '{0}QColorDialog.ColorDialogOptions('
174 'QColorDialog.ShowAlphaChannel)'.format(istring) 177 'QColorDialog.ShowAlphaChannel)'.format(istring)
178 )
175 code += '){0}'.format(estring) 179 code += '){0}'.format(estring)
176 180
177 return code 181 return code

eric ide

mercurial