Cyclone 3DR Script
from Technodigit, part of Hexagon. Copyright 1997-2022.
 
Loading...
Searching...
No Matches
SDialog Class Reference

The SDialog class provides simple Dialog creation methods.
The SDialog creation can be done by calling the static function : More...

#include <SDialog.h>

Inheritance diagram for SDialog:
SObject

Public Slots

Boolean AddImage (String imgPath, Number width=-1, Number height=-1, Boolean keepRatio)
 Adds a new image to the Dialog. Supported formats include PNG, JPG, JPEG, GIF, BMP and more. More...
 
 AddLine (String label, Boolean isInput, Array labParams=Array(), String _iDefaultInput=String())
 Adds a new line to the Dialog. Either a simple line with a single label, or also with a text input field. The resulting inputs are then returned by the Execute() method. More...
 
 AddOutput (String label, String output, Array labParams=Array(), Array outParams=Array())
 Adds a new output line to the Dialog. This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
Array Execute ()
 Executes the dialog box. More...
 
static SDialog New (String title=String(), QWidget parent)
 Dialog constructor. More...
 
String toString ()
 Get the type of the variable. More...
 
static String toString ()
 Get the type of the variable. More...
 
- Public Slots inherited from SObject
 Clear ()
 To deallocate memory of the object. More...
 
String toString ()
 Get the type of the variable. More...
 

Detailed Description

The SDialog class provides simple Dialog creation methods.
The SDialog creation can be done by calling the static function :

For explanation about the SDialog class, check the SDialog Concept page.

Member Function Documentation

◆ AddImage

Boolean SDialog::AddImage ( String  imgPath,
Number  width = -1,
Number  height = -1,
Boolean  keepRatio 
)
slot

Adds a new image to the Dialog. Supported formats include PNG, JPG, JPEG, GIF, BMP and more.

Return values
trueSuccess
falseFailure
Parameters
imgPathImage path
widthImage width. Negative to ignore.
heightImage height. Negative to ignore.
keepRatioShould the original size ratio be respected ?

◆ AddLine

SDialog::AddLine ( String  label,
Boolean  isInput,
Array  labParams = Array(),
String  _iDefaultInput = String() 
)
slot

Adds a new line to the Dialog. Either a simple line with a single label, or also with a text input field. The resulting inputs are then returned by the Execute() method.

Parameters
labelLabel text
isInputShould the line include a text input field ?
labParamsLabel text parameters, as associative array.
_iDefaultInputAvailable key parameters :
  • 'align' : text alignment. Either 'left' / 'center' / 'right'.
  • 'size' : text size in points (pt).
  • 'color' : text color. You can specify a color using different formats (like with CSS) : either #rgb / #rrggbb / the color name (same names as CSS color names).
  • 'css' : Additionnal custom CSS code. Default text if input field

◆ AddOutput

SDialog::AddOutput ( String  label,
String  output,
Array  labParams = Array(),
Array  outParams = Array() 
)
slot

Adds a new output line to the Dialog. This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
labelLabel text
outputOutput text
labParamsLabel text parameters, as associative array.
outParamsAvailable key parameters :
  • 'align' : text alignment. Either 'left' / 'center' / 'right'.
  • 'size' : text size in points (pt).
  • 'color' : text color. You can specify a color using different formats (like with CSS) : either #rgb / #rrggbb / the color name (same names as CSS color names).
  • 'css' : Additionnal custom CSS code. Output text parameters (same usage as with labParams)

◆ Execute

Array SDialog::Execute ( )
slot

Executes the dialog box.

Return values
Array.ErrorCodeThe error code.
  • 0: The OK button was pressed.
  • 1: The Dialog was canceled / closed or an error occurred.
Array.InputTblThe resulting user input strings (in the same order as the input lines).

◆ New

static SDialog SDialog::New ( String  title = String(),
QWidget  parent 
)
staticslot

Dialog constructor.

Parameters
titleWindow title
parentParent window

◆ toString [1/2]

String SDialog::toString ( )
slot

Get the type of the variable.

◆ toString [2/2]

static String SDialog::toString ( )
staticslot

Get the type of the variable.