The bps.gui extension is a namespace assembling GUI properties and functions.
More...
|
Number | exec () |
| Executes the event loop for standalone GUI scripts. More...
|
|
Widget | loadUiFile (Widget aParent, String aFileName) |
| Loads a ui file that was created by the Qt Designer into a widget. More...
|
|
Widget | loadUiText (Widget aParent, String aXml) |
| Loads a ui XML text that was created by the Qt Designer into a widget. More...
|
|
|
QString | uiFileName |
| This is a convenience UI filename suggestion, derived from the script name. More...
|
|
The bps.gui extension is a namespace assembling GUI properties and functions.
The extension needs to be loaded before it can be used. Note that the bps extension will automaticly be loaded before the bps.gui extension:
var retval = 0;
ui.show();
}
} else {
perror(
'This is a GUI script. Please run it by gui.exe, not by bps.exe.');
retval = 1;
}
retval;
void perror(...)
Print the expressions (applying toString() if necessary) to the console error output (stderr),...
Boolean isGui
GUI environment indicator.
Definition: Global.js:22
void importExtension(String aExtensionName)
Imports the named extension into the script engine.
The bps.gui extension is a namespace assembling GUI properties and functions.
Definition: bps.gui.js:24
Number exec()
Executes the event loop for standalone GUI scripts.
Widget loadUiFile(Widget aParent, String aFileName)
Loads a ui file that was created by the Qt Designer into a widget.
QString uiFileName
This is a convenience UI filename suggestion, derived from the script name.
Definition: bps.gui.js:30
The bps extension is a namespace assembling general BPS properties and functions.
Definition: bps.AsyncIO.js:1
◆ exec()
Number bps::gui::exec |
( |
| ) |
|
Executes the event loop for standalone GUI scripts.
Call this after showing a non-modal main widget.
- Returns
- The exit code.
◆ loadUiFile()
Widget bps::gui::loadUiFile |
( |
Widget |
aParent, |
|
|
String |
aFileName |
|
) |
| |
Loads a ui file that was created by the Qt Designer into a widget.
- Parameters
-
aParent | Parent widget object. Pass 0 if there is no parent. |
aFileName | Name of the ui file to load. |
- Returns
- The widget that was loaded.
- Exceptions
-
Error | thrown when file can not read, or the ui content not processed without error. |
◆ loadUiText()
Widget bps::gui::loadUiText |
( |
Widget |
aParent, |
|
|
String |
aXml |
|
) |
| |
Loads a ui XML text that was created by the Qt Designer into a widget.
- Parameters
-
aParent | Parent widget object. Pass 0 if there is no parent. |
aXml | The XML code describing the widget. |
- Returns
- The widget that was loaded.
- Exceptions
-
Error | when the ui content not processed without error. |
◆ uiFileName
QString bps::gui::uiFileName |
This is a convenience UI filename suggestion, derived from the script name.
If scriptFileName is for example C:\test\hello.js, then uiFileName will be set to C:\test\hello.ui