This shows you the differences between two versions of the page.
Next revision | Previous revisionNext revisionBoth sides next revision | ||
dev:v3:gui_api:dialog:inputgui1 [2020/07/09 04:52] – created jedi18 | dev:v3:gui_api:dialog:inputgui1 [2020/07/09 05:16] – jedi18 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Input GUI Class ====== | + | ====== Input GUI Widgets I ====== |
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Input GUI Class ===== | ||
+ | |||
+ | ---- | ||
[[https:// | [[https:// | ||
<code cpp-qt> namespace lc::ui::api </ | <code cpp-qt> namespace lc::ui::api </ | ||
Line 7: | Line 14: | ||
---- | ---- | ||
- | ===== Label ===== | + | ==== Label ==== |
---- | ---- | ||
- | ==== Description | + | === Description === |
Get and set label for the Input GUI widget. | Get and set label for the Input GUI widget. | ||
- | ==== Examples | + | === Examples === |
* <code lua> message(input1: | * <code lua> message(input1: | ||
Line 22: | Line 29: | ||
---- | ---- | ||
- | ===== Enable and Disable | + | ==== Enable and Disable ==== |
---- | ---- | ||
- | ==== Description | + | === Description === |
Enable or disable the input gui widget. | Enable or disable the input gui widget. | ||
- | ==== Examples | + | === Examples === |
* <code lua> input1: | * <code lua> input1: | ||
* <code lua> input1: | * <code lua> input1: | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Angle GUI Class ===== | ||
+ | |||
+ | ---- | ||
+ | |||
+ | [[https:// | ||
+ | <code cpp-qt> namespace lc::ui::api </ | ||
+ | |||
+ | The Angle GUI class is used to enter an angle. Angle can be toggled between radians and degrees by clicking on the Rad/Deg button or by using the appropriate functions. Needs to be added to the dialog widget to be used. | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Constructor ==== | ||
+ | |||
+ | ---- | ||
+ | |||
+ | === Description === | ||
+ | |||
+ | Constructs an angle gui widget. | ||
+ | |||
+ | === Examples === | ||
+ | |||
+ | * <code lua> local angle1 = gui.AngleGUI(" | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Get and Set Values ==== | ||
+ | |||
+ | ---- | ||
+ | |||
+ | === Description === | ||
+ | |||
+ | Used to get the current value of the angle widget or set it to a desired value. | ||
+ | |||
+ | //Note:- Always returns and expects the value to be in **RADIANS** . If the current display mode is in degrees, the angle is converted to degrees and displayed. When retrieving the mode dosen' | ||
+ | |||
+ | === Examples === | ||
+ | |||
+ | * <code lua> local val = angle1: | ||
+ | * <code lua> angle1: | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== To Degrees ==== | ||
+ | |||
+ | ---- | ||
+ | |||
+ | === Description === | ||
+ | |||
+ | Used to switch the display mode to degrees, if the value is in radians it is automatically converted and shown in degrees. | ||
+ | |||
+ | === Examples === | ||
+ | |||
+ | * <code lua> angle1: | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== To Radians ==== | ||
+ | |||
+ | ---- | ||
+ | |||
+ | === Description === | ||
+ | |||
+ | Used to switch the display mode to radians, if the value is in degrees it is automatically converted and shown in radians. | ||
+ | |||
+ | === Examples === | ||
+ | |||
+ | * <code lua> angle1: | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Add Finish Callback ==== | ||
+ | |||
+ | ---- | ||
+ | |||
+ | === Description === | ||
+ | |||
+ | Add a finish callback which is called when the user presses enter after entering the angle or clicks somewhere else and the input gui loses focus. This is different from the dialog widget finish callback. | ||
+ | |||
+ | === Examples === | ||
+ | |||
+ | * <code lua> angle1: | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Add On Change Callback ==== | ||
+ | |||
+ | ---- | ||
+ | |||
+ | === Description === | ||
+ | |||
+ | Add an on change callback which is called when the user types anything i.e. on any change to the input. | ||
+ | |||
+ | === Examples === | ||
+ | |||
+ | * <code lua> angle1: | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Button GUI Class ===== | ||
+ | |||
+ | ---- | ||
+ | |||
+ | [[https:// | ||
+ | <code cpp-qt> namespace lc::ui::api </ | ||
+ | |||
+ | The Button GUI class is used to add a button to the dialog widget. Callbacks can be added to the button which is called when the button is clicked. | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Constructor ==== | ||
+ | |||
+ | ---- | ||
+ | |||
+ | === Description === | ||
+ | |||
+ | Constructs an button gui widget | ||
+ | |||
+ | === Examples === | ||
+ | |||
+ | * <code lua> local button1 = gui.ButtonGUI(" | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Add Callback ==== | ||
+ | |||
+ | ---- | ||
+ | |||
+ | === Description === | ||
+ | |||
+ | Add a callback to be called whenever the user clicks on the button. | ||
+ | |||
+ | === Examples === | ||
+ | |||
+ | * <code lua> button1: | ||
---- | ---- |