Table of Contents

Dialog Widget Class

Github Link

 namespace lc::ui::api 

A Dialog widget object acts a parent widget containing all the input gui widgets. A finish button can be added which on being clicked retrieves the values of all the input guis in a table when the user is finished with the dialog. This table is passed in as a parameter to all the finish callbacks added to the dialog widget.


Constructor


Description

Constructs a dialog widget object. This dialog widget contains all the input gui widgets. The constructor takes in a label and a mainwindow pointer as parameters. Can be constructed using the

 CreateDialogWidget("DialogLabel") 

which takes care of passing in the mainwindow as parameter.

Examples


Add Input GUI Widget


Description

Add an input gui widget to the dialog widget. Expects a key and input widget as parameters. Key is used to retrieve the value of the input gui widget.

Note:- If button or checkbox is added, the addWidget function first adds it to a horizontal group gui widget which is then added to the dialog widget.

Examples


Get list of input widgets


Description

Returns a list of all input widgets present in the dialog widget.

Examples


Title


Description

Get and set title for the dialog widget

Examples


Set Finish Button


Description

Set a button as the finish button for the dialog widget which on being clicked will return a table of all values to all the finish lua callbacks added to the dialog widget.

Examples


Add Finish Callback


Description

Add a finish callback which is called whenever the user is done with the dialog and clicks on the finish button. The callback is passed in a table containing the key and value of all the input gui widgets.

Examples


Get keys


Description

Returns a list of keys of all the input gui widgets in the dialog.

Examples