The SDialog class provides simple Dialog creation methods.
The SDialog creation can be done by calling the static function :
More...
|
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 Array | 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...
|
|
| Clear () |
| To deallocate memory of the object. More...
|
|
String | toString () |
| Get the type of the variable. More...
|
|
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.
◆ 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
-
- Parameters
-
imgPath | Image path |
width | Image width. Negative to ignore. |
height | Image height. Negative to ignore. |
keepRatio | Should 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
-
label | Label text |
isInput | Should the line include a text input field ? |
labParams | Label text parameters, as associative array. |
_iDefaultInput | Available 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
-
label | Label text |
output | Output text |
labParams | Label text parameters, as associative array. |
outParams | Available 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.ErrorCode | The error code.
- 0: The OK button was pressed.
- 1: The Dialog was canceled / closed or an error occurred.
|
Array.InputTbl | The resulting user input strings (in the same order as the input lines). |
◆ New
static Array SDialog::New |
( |
String |
title = String() , |
|
|
QWidget |
parent |
|
) |
| |
|
staticslot |
Dialog constructor.
- Parameters
-
title | Window title |
parent | Parent 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.