• skip to content

Wiki

User Tools

  • Admin
  • Log In

Site Tools

  • Recent Changes
  • Media Manager
  • Sitemap
Trace: • start

dev:v3:gui_api:dialog:inputgui2

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
dev:v3:gui_api:dialog:inputgui2 [2020/07/09 12:24] – jedi18dev:v3:gui_api:dialog:inputgui2 [2020/07/09 12:41] (current) – jedi18
Line 151: Line 151:
  
   * <code lua> entity1:addEntity(lineEntity) </code>   * <code lua> entity1:addEntity(lineEntity) </code>
 +
 +----
 +
 +===== Number GUI Class =====
 +
 +----
 +
 +[[https://github.com/LibreCAD/LibreCAD_3/blob/master/lcUI/widgets/guiAPI/numbergui.h|Github Link]]
 +<code cpp-qt> namespace lc::ui::api </code>
 +
 +The number gui widget is used for entering a number (double).
 +
 +----
 +
 +==== Constructor ====
 +
 +----
 +
 +=== Description ===
 +
 +Constructs a Number GUI widget.
 +
 +=== Examples ===
 +
 +  * <code lua> local number1 = gui.Number("Number1") </code>
 +
 +----
 +
 +==== Get Values ====
 +
 +----
 +
 +=== Description ===
 +
 +Gets the value of the number widget.
 +
 +=== Examples ===
 +
 +  * <code lua> local val = number1:value() </code>
 +
 +----
 +
 +==== Set Value ====
 +
 +----
 +
 +=== Description ===
 +
 +Sets the number widget value.
 +
 +=== Examples ===
 +
 +  * <code lua> number1:setValue(2.4) </code>
 +
 +----
 +
 +==== Add Callback ====
 +
 +----
 +
 +=== Description ===
 +
 +Add callback for when the number is changed
 +
 +=== Examples ===
 +
 +  * <code lua> number1:addCallback(function(num) message(tostring(num)) end) </code>
 +
 +----
 +
 +===== Slider GUI Class =====
 +
 +----
 +
 +[[https://github.com/LibreCAD/LibreCAD_3/blob/master/lcUI/widgets/guiAPI/slidergui.h|Github Link]]
 +<code cpp-qt> namespace lc::ui::api </code>
 +
 +The slider gui widget is used for values that could use a slider input.
 +
 +----
 +
 +==== Constructor ====
 +
 +----
 +
 +=== Description ===
 +
 +Constructs a Slider GUI Widget.
 +
 +=== Examples ===
 +
 +  * <code lua> local slider1 = gui.Slider("Slider1") </code>
 +
 +----
 +
 +==== Get Values ====
 +
 +----
 +
 +=== Description ===
 +
 +Gets the value of the slider widget. Returns a //double// value.
 +
 +=== Examples ===
 +
 +  * <code lua> local val = slider1:value() </code>
 +
 +----
 +
 +==== Set Value ====
 +
 +----
 +
 +=== Description ===
 +
 +Sets the slider widget value. Expects a //double// parameter.
 +
 +=== Examples ===
 +
 +  * <code lua> slider1:setValue(2.4) </code>
 +
 +----
 +
 +==== Add Callback ====
 +
 +----
 +
 +=== Description ===
 +
 +Add callback for when the slider value is changed.
 +
 +=== Examples ===
 +
 +  * <code lua> slider1:addCallback(function(num) message(tostring(num)) end) </code>
  
 ---- ----
dev/v3/gui_api/dialog/inputgui2.1594297494.txt.gz · Last modified: 2020/07/09 12:24 by jedi18

Page Tools

  • Show page
  • Old revisions
  • Backlinks
  • Export to PDF
  • Rename Page
  • Back to top
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki