Dialog Class Reference

The Dialog JavaScript class. A simplified Qt dialog. More...

Public Slots

void newTab (String &label)
 add a new tab to the dialog More...
 
void newColumn ()
 add a new column to the dialog More...
 
void addSpace (int space)
 add spacers to the dialog layout More...
 
void add (SCRIPT_QSWidget *widget)
 add widgets to the dialog More...
 
bool exec ()
 run the dialog in modal mode. Pressing ok accepts the dialog input. Pressing cancel cancels the dialog. More...
 

Properties

String title
 it is the title of the dialog More...
 
String caption
 it is the (legacy, but we still support it ) title of the dialog More...
 
int width
 it is the width of the dialog More...
 
String okButtonText
 it is the name of the ok button More...
 
String cancelButtonText
 it is the name of the cancel button More...
 

Detailed Description

The Dialog JavaScript class. A simplified Qt dialog.

This class and the associated widget classes are used to build simple dialogs.

function sampleDialog()
{
var d = new Dialog();
d.title = "Sample Dialog";
var inputL = new LineEdit;
inputL.label = "Sample Line Edit";
d.add( inputL );
if ( d.exec() )
{
var sampleText = inputL.text;
System.println(" the input text is " + sampleText );
}
}

Member Function Documentation

◆ add

void Dialog::add ( SCRIPT_QSWidget *  widget)
slot

add widgets to the dialog

◆ addSpace

void Dialog::addSpace ( int  space)
slot

add spacers to the dialog layout

◆ exec

bool Dialog::exec ( )
slot

run the dialog in modal mode. Pressing ok accepts the dialog input. Pressing cancel cancels the dialog.

◆ newColumn

void Dialog::newColumn ( )
slot

add a new column to the dialog

◆ newTab

void Dialog::newTab ( String &  label)
slot

add a new tab to the dialog

Property Documentation

◆ cancelButtonText

String Dialog::cancelButtonText
readwrite

it is the name of the cancel button

◆ caption

String Dialog::caption
readwrite

it is the (legacy, but we still support it ) title of the dialog

◆ okButtonText

String Dialog::okButtonText
readwrite

it is the name of the ok button

◆ title

String Dialog::title
readwrite

it is the title of the dialog

◆ width

int Dialog::width
readwrite

it is the width of the dialog