120 il = indLevel + 1 |
120 il = indLevel + 1 |
121 istring = il * indString |
121 istring = il * indString |
122 estring = os.linesep + indLevel * indString |
122 estring = os.linesep + indLevel * indString |
123 |
123 |
124 # now generate the code |
124 # now generate the code |
125 code = 'QColorDialog.' |
125 # TODO: support entering 'parent' |
|
126 resvar = self.eResultVar.text() |
|
127 if not resvar: |
|
128 resvar = "color" |
|
129 code = '{0} = QColorDialog.'.format(resvar) |
126 if self.rColor.isChecked(): |
130 if self.rColor.isChecked(): |
127 code += 'getColor({0}'.format(os.linesep) |
131 code += 'getColor({0}'.format(os.linesep) |
128 if self.eColor.currentText(): |
132 if self.eColor.currentText(): |
129 col = self.eColor.currentText() |
133 col = self.eColor.currentText() |
130 if col.startswith('#'): |
134 if col.startswith('#'): |