GO2cam Javascript API  6.11
Widget generic methods

Functions

static void GO2SDialogUtil::ExecDialog (String uiName)
 
static Number GO2SDialogUtil::GetDouble (String name)
 
static Number GO2SDialogUtil::GetInt (String name)
 
static Number GO2SDialogUtil::GetTabIndex (String name)
 
static String GO2SDialogUtil::GetTabName (String name)
 
static String GO2SDialogUtil::GetText (String name)
 
static Boolean GO2SDialogUtil::IsChecked (String name)
 
static Boolean GO2SDialogUtil::IsEnabled (String name)
 
static Boolean GO2SDialogUtil::IsVisible (String name)
 
static void GO2SDialogUtil::SetChecked (String name, Boolean bChecked)
 
static void GO2SDialogUtil::SetDouble (String name, Number value)
 
static void GO2SDialogUtil::SetEnabled (String name, Boolean bEnabled)
 
static void GO2SDialogUtil::SetFocus (String name)
 
static void GO2SDialogUtil::SetInt (String name, Number value)
 
static void GO2SDialogUtil::SetText (String name, String value)
 
static void GO2SDialogUtil::SetVisible (String name, Boolean bVisible)
 

Detailed Description

Generic methods for widgets.

Function Documentation

◆ ExecDialog()

static void GO2SDialogUtil::ExecDialog ( String uiName)
static

Open a modal dialog box from a .ui (display the dialog)

var dialog = GO2SDialogUtil.ExecDialog(scriptFilePath+'/LineParam.ui')
Helper containing utility methods for dialog.
Definition GO2SDialogUtil.hpp:12
static void ExecDialog(String uiName)
Parameters
[in]uiNamethe full path name of the .ui file

◆ GetDouble()

static Number GO2SDialogUtil::GetDouble ( String name)
static

Get a Number value from a widget

static Number GetDouble(String name)
Parameters
[in]namethe name of the widget in the .ui file

◆ GetInt()

static Number GO2SDialogUtil::GetInt ( String name)
static

Get an integer value from a widget

Parameters
[in]namethe name of the widget in the .ui file

◆ GetTabIndex()

static Number GO2SDialogUtil::GetTabIndex ( String name)
static

Get the current index of the tab widget.

Parameters
[in]namethe name of widget in the .ui file

◆ GetTabName()

static String GO2SDialogUtil::GetTabName ( String name)
static

Get the name of the current index of the tab widget.

Parameters
[in]namethe name of widget in the .ui file

◆ GetText()

static String GO2SDialogUtil::GetText ( String name)
static

Get a text value from a widget

Parameters
[in]namethe name of the widget in the .ui file

◆ IsChecked()

static Boolean GO2SDialogUtil::IsChecked ( String name)
static

Get if a widget is checked see GO2SDialogUtil.SetCheck

Parameters
[in]namethe name of the widget in the .ui file

◆ IsEnabled()

static Boolean GO2SDialogUtil::IsEnabled ( String name)
static

Get if a widget is enabled

Parameters
[in]namethe name of the widget in the .ui file

◆ IsVisible()

static Boolean GO2SDialogUtil::IsVisible ( String name)
static

Get if a widget is visible

Parameters
[in]namethe name of the widget in the .ui file

◆ SetChecked()

static void GO2SDialogUtil::SetChecked ( String name,
Boolean bChecked )
static

Set checked or not the widgets:

  • QRadioButton
  • QCheckBox
  • QPushButton
  • QToolButton
  • QGroupBox
Parameters
[in]namethe name of the widget in the .ui file
[in]bCheckedchecked if true

◆ SetDouble()

static void GO2SDialogUtil::SetDouble ( String name,
Number value )
static

Set the value in a QDoubleSpinBox widget

GO2SDialogUtil.SetDouble("lenght", 12.42)
static void SetDouble(String name, Number value)
Parameters
[in]namethe name of the widget in the .ui file
[in]valuethe value

◆ SetEnabled()

static void GO2SDialogUtil::SetEnabled ( String name,
Boolean bEnabled )
static

Set a widget enabled or not

Parameters
[in]namethe name of the widget in the .ui file
[in]bEnabledenabled if true

◆ SetFocus()

static void GO2SDialogUtil::SetFocus ( String name)
static

Set the focus on a widget

Parameters
[in]namethe name of the widget in the .ui file

◆ SetInt()

static void GO2SDialogUtil::SetInt ( String name,
Number value )
static

This method can be used to

  • set the value of a QSpinBox
  • set the position of a QSlider
  • set the selected item in a QComboBox
Parameters
[in]namethe name of the widget in the .ui file
[in]valuethe value

◆ SetText()

static void GO2SDialogUtil::SetText ( String name,
String value )
static

Set the text of one of the following widget

  • QLineEdit
  • QTextEdit
  • QPlainTextEdit
  • QLabel
  • QFontComboBox
Parameters
[in]namethe name of the widget in the .ui file
[in]valuethe text

◆ SetVisible()

static void GO2SDialogUtil::SetVisible ( String name,
Boolean bVisible )
static

Set a widget visible or not

Parameters
[in]namethe name of the widget in the .ui file
[in]bVisiblevisible if true