@@ -326,10 +326,9 @@ def k_createDialog(self, command):
326
326
if self .peek () == 'title' :
327
327
self .nextToken ()
328
328
title = self .nextValue ()
329
- elif self .peek () == 'layout ' :
329
+ elif self .peek () == 'type ' :
330
330
self .nextToken ()
331
- if self .nextIsSymbol ():
332
- command ['layout' ] = self .getSymbolRecord ()['name' ]
331
+ command ['type' ] = self .nextToken ()
333
332
else : break
334
333
command ['title' ] = title
335
334
self .add (command )
@@ -462,14 +461,18 @@ def r_createComboBox(self, command, record):
462
461
return self .nextPC ()
463
462
464
463
def r_createDialog (self , command , record ):
465
- layout = self .getVariable (command ['layout' ])['widget' ]
466
464
dialog = QDialog ()
465
+ mainLayout = QVBoxLayout (dialog )
467
466
dialog .setWindowTitle (self .getRuntimeValue (command ['title' ]))
467
+ dialogType = command ['type' ]
468
+ if dialogType in ['lineinput' ]:
469
+ if dialogType == 'lineinput' :
470
+ input = QLineEdit ()
471
+ mainLayout .addWidget (input )
468
472
dialog .buttonBox = QDialogButtonBox ((QDialogButtonBox .Ok | QDialogButtonBox .Cancel ))
469
473
dialog .buttonBox .accepted .connect (dialog .accept )
470
474
dialog .buttonBox .rejected .connect (dialog .reject )
471
- layout .addWidget (dialog .buttonBox )
472
- dialog .setLayout (layout )
475
+ mainLayout .addWidget (dialog .buttonBox , alignment = Qt .AlignHCenter )
473
476
record ['dialog' ] = dialog
474
477
return self .nextPC ()
475
478
@@ -948,7 +951,8 @@ def r_show(self, command):
948
951
window .show ()
949
952
elif 'dialog' in command :
950
953
dialog = self .getVariable (command ['dialog' ])['dialog' ]
951
- dialog .exec ()
954
+ result = dialog .exec ()
955
+ # TODO: Finish the dialog box for getting the request relay name
952
956
return self .nextPC ()
953
957
954
958
# Start the graphics
0 commit comments