122 il = indLevel + 1 |
122 il = indLevel + 1 |
123 istring = il * indString |
123 istring = il * indString |
124 estring = os.linesep + indLevel * indString |
124 estring = os.linesep + indLevel * indString |
125 |
125 |
126 # now generate the code |
126 # now generate the code |
127 code = 'QInputDialog.' |
127 # TODO: support entering 'parent' |
|
128 resvar = self.eResultVar.text() |
|
129 if not resvar: |
|
130 resvar = "result" |
|
131 code = '{0}, ok = QInputDialog.'.format(resvar) |
128 if self.rText.isChecked(): |
132 if self.rText.isChecked(): |
129 code += 'getText({0}{1}'.format(os.linesep, istring) |
133 code += 'getText({0}{1}'.format(os.linesep, istring) |
130 code += 'None,{0}{1}'.format(os.linesep, istring) |
134 code += 'None,{0}{1}'.format(os.linesep, istring) |
131 code += 'self.trUtf8("{0}"),{1}{2}'.format( |
135 code += 'self.trUtf8("{0}"),{1}{2}'.format( |
132 self.eCaption.text(), os.linesep, istring) |
136 self.eCaption.text(), os.linesep, istring) |