Skip to content

Commit

Permalink
Corregido el con la seleccion de parametros
Browse files Browse the repository at this point in the history
  • Loading branch information
manublesa committed Feb 11, 2019
1 parent 4138249 commit 5cbbff0
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions src/gui/paramForm.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,30 @@ def __init__(self, param_list):
layout = QtGui.QGridLayout(self)
counter = 0
for row in param_list:

for parametro in row:
self.labels[counter] = QtGui.QLabel(parametro, self)

print "el parametro es: " + parametro[:1]
if parametro[:1] == "#":
self.labels[counter] = QtGui.QLabel(parametro[1:], self)
self.texts[counter] = QtGui.QLineEdit(self)
self.buttons[counter] = QtGui.QPushButton("examinar")
self.buttons[counter] = QtGui.QPushButton("file")
self.buttons[counter].clicked.connect(lambda ignore, co=counter: self.getFileName(co))
fileMod=1
else:
self.labels[counter] = QtGui.QLabel(parametro, self)
self.texts[counter] = QtGui.QLineEdit(self)
fileMod=0

layout.addWidget(self.labels[counter], counter, 0)
layout.addWidget(self.texts[counter], counter, 1)
layout.addWidget(self.buttons[counter], counter, 2)

if fileMod==1:
layout.addWidget(self.buttons[counter], counter, 2)

counter += 1



buttons = QtGui.QDialogButtonBox(
QtGui.QDialogButtonBox.Ok | QtGui.QDialogButtonBox.Cancel,
Expand Down Expand Up @@ -67,8 +78,6 @@ def getFileName(self, counter):
filename = QtGui.QFileDialog.getOpenFileName()
self.texts[counter].setText(filename)



if __name__ == '__main__':
app = QtGui.QApplication(sys.argv)
gui = paramForm.getNewParams(
Expand Down

0 comments on commit 5cbbff0

Please sign in to comment.