CustomUI Plugin - UI XML Syntax

Elements:


^
Element: <ui>
Description: Root element (related to Custom UI window).
Attributes:
Name: enabled
Type: bool
Default: true
Description: Enable status of widget.
Name: modal
Type: bool
Default: false
Description: If true, the dialog window will be modal.
Name: style
Type: string
Default:
Description: Qt stylesheet.
Name: title
Type: string
Default: Custom UI
Description: Title of the Custom UI window.
Name: resizable
Type: bool
Default: false
Description: Make window resizable if true.
Name: closeable
Type: bool
Default: false
Description: Make window closeable if true.
Name: layout
Type: One of:
  • vbox
  • hbox
  • form
  • grid
  • none
Default: vbox
Description: Layout of the widget. When layout is 'none', specify widget placement using the geometry attribute, like: geometry="x,y,width,height".
Name: content-margins
Type: int[4]
Default: 7,7,7,7
Description: Sets the left, top, right, and bottom margins to use around the layout.
Name: placement
Type: One of:
  • center
  • relative
  • absolute
Default: center
Description: Placement of the window widget. It will affect how the position attribute is interpreted.
Name: position
Type: int[2]
Default: 50,50
Description: Position of the window widget.
Name: size
Type: int[2]
Default: -1,-1
Description: Initial size of the window widget. -1,-1 will use the default behavior (automatically compute the optimal size).
Name: activate
Type: bool
Default: true
Description: If false, the window is shown without activating it (Qt flag WA_ShowWithoutActivating).
Name: on-close
Type: string
Default:
Description: Name of a script function to handle the close event. Arguments of the function are: (uiHandle). When a callback is specified, the window will not close upon pressing the close button. It may be hidden or destroyed explicitly in the callback.
See also:
^
Element: <button>
Description: Push button widget.
Attributes:
Name: enabled
Type: bool
Default: true
Description: Enable status of widget.
Name: style
Type: string
Default:
Description: Qt stylesheet.
Name: text
Type: string
Default: ???
Description: Text on the button.
Name: default
Type: bool
Default: false
Description: If true, this is the default button of the dialog window.
Name: auto-repeat
Type: bool
Default: false
Description: If auto-repeat is enabled, then the click() signal is emitted at regular intervals when the button is down.
Name: auto-repeat-delay
Type: int
Default: 0
Description: Defines the initial delay in milliseconds before auto-repetition kicks in.
Name: auto-repeat-interval
Type: int
Default: 200
Description: Defines the length of the auto-repetition interval in milliseconds.
Name: checkable
Type: bool
Default: false
Description: If true, the button is checkable.
Name: checked
Type: bool
Default: false
Description: If true, the button is initially checked.
Name: auto-exclusive
Type: bool
Default: false
Description: If true, checkable buttons that belong to the same parent widget behave as if they were part of the same exclusive button group. In an exclusive button group, only one button can be checked at any time; checking another button automatically unchecks the previously checked one.
Name: on-click
Type: string
Default:
Description: Name of a script function to handle the click event. Arguments of the function are: (uiHandle, id).
Name: icon
Type: string
Default:
Description: Name of a icon to use. The only icon name scheme supported is default://SP_xxx where SP_xxx is a constant from http://doc.qt.io/qt-5/qstyle.html#StandardPixmap-enum
^
Element: <checkbox>
Description: Checkbox widget.
Attributes:
Name: enabled
Type: bool
Default: true
Description: Enable status of widget.
Name: style
Type: string
Default:
Description: Qt stylesheet.
Name: text
Type: string
Default: ???
Description: Text on the checkbox label.
Name: checked
Type: bool
Default: false
Description: If true, the checkbox is initially checked.
Name: checkable
Type: bool
Default: true
Description: If true, the button is checkable.
Name: auto-exclusive
Type: bool
Default: false
Description: If true, checkable buttons that belong to the same parent widget behave as if they were part of the same exclusive button group. In an exclusive button group, only one button can be checked at any time; checking another button automatically unchecks the previously checked one.
Name: on-change
Type: string
Default:
Description: Name of a script function to handle the change event. Arguments of the function are: (uiHandle, id, newValue).
^
Element: <combobox>
Description: A combobox widget. It allows to select one from many items from a dropdown menu. Items can be added as child XML nodes, e.g. <item>Item text</item>, or dynamically via the script API.
Attributes:
Name: enabled
Type: bool
Default: true
Description: Enable status of widget.
Name: style
Type: string
Default:
Description: Qt stylesheet.
Name: checkable
Type: bool
Default: true
Description: If true, the button is checkable.
Name: auto-exclusive
Type: bool
Default: true
Description: If true, checkable buttons that belong to the same parent widget behave as if they were part of the same exclusive button group. In an exclusive button group, only one button can be checked at any time; checking another button automatically unchecks the previously checked one.
Name: on-change
Type: string
Default:
Description: Name of a script function to handle the change event. Arguments of the function are: (uiHandle, id, newValue).
^
Element: <edit>
Description: A widget for text input.
Attributes:
Name: enabled
Type: bool
Default: true
Description: Enable status of widget.
Name: style
Type: string
Default:
Description: Qt stylesheet.
Name: value
Type: string
Default: ???
Description: Initial text.
Name: password
Type: bool
Default: false
Description: If true, display platform-dependent password mask characters instead of the characters actually entered.
Name: evaluate-expressions
Type: bool
Default: false
Description: If true, the text input into the edit will be evaluated by the sandbox script.
Name: on-change
Type: string
Default:
Description: Name of a script function to handle the change event. Arguments of the function are: (uiHandle, id, newValue).
Name: on-editing-finished
Type: string
Default:
Description: Name of a script function to handle the editing finished event. Arguments of the function are: (uiHandle, id, newValue).
^
Element: <group>
Description: A widget for grouping other widgets. Other widgets are specified as children of the <group> node. It has its own layout, so it can be used to use a different layout only for a group of widgets. It is also required to group a set of radiobutton widgets.
Attributes:
Name: enabled
Type: bool
Default: true
Description: Enable status of widget.
Name: style
Type: string
Default:
Description: Qt stylesheet.
Name: flat
Type: bool
Default: false
Description: If true, the group will have no visual appearance (text will be ignored). Otherwise, it will have some visual appearance, depending on the platform.
Name: layout
Type: One of:
  • vbox
  • hbox
  • form
  • grid
  • none
Default: vbox
Description: Layout of the widget. When layout is 'none', specify widget placement using the geometry attribute, like: geometry="x,y,width,height".
Name: content-margins
Type: int[4]
Default: 7,7,7,7
Description: Sets the left, top, right, and bottom margins to use around the layout.
See also:
^
Element: <hslider>
Description: A horizontal slider widget.
Attributes:
Name: enabled
Type: bool
Default: true
Description: Enable status of widget.
Name: style
Type: string
Default:
Description: Qt stylesheet.
Name: value
Type: int
Default: 0
Description: Initial value.
Name: minimum
Type: int
Default: 0
Description: Minimum value.
Name: maximum
Type: int
Default: 100
Description: Maximum value.
Name: tick-interval
Type: int
Default: 0
Description: Tick interval.
Name: tick-position
Type: One of:
  • none
  • both-sides
  • above
  • below
  • left
  • right
Default: none
Description: In which direction to draw ticks.
Name: inverted
Type: bool
Default: false
Description: If true, minimum and maximum will be swapped.
Name: on-change
Type: string
Default:
Description: Name of a script function to handle the change event. Arguments of the function are: (uiHandle, id, newValue).
See also:
^
Element: <image>
Description: A image display widget.
Attributes:
Name: enabled
Type: bool
Default: true
Description: Enable status of widget.
Name: style
Type: string
Default:
Description: Qt stylesheet.
Name: file
Type: string
Default:
Description: Display the image from the specified file.
Name: width
Type: int
Default: -1
Description: Desired width for the initial image.
Name: height
Type: int
Default: -1
Description: Desired height for the initial image.
Name: scaled-contents
Type: bool
Default: false
Description: This property holds whether this widget will scale its image to fill all available space.
Name: keep-aspect-ratio
Type: bool
Default: false
Description: If true, and also scaled-contents is true, will keep aspect ratio when resizing.
Name: on-mouse-down
Type: string
Default:
Description: Name of a script function to handle the mouseDown event. Arguments of the function are: (uiHandle, id, type, flags, x, y).
Name: on-mouse-up
Type: string
Default:
Description: Name of a script function to handle the mouseUp event. Arguments of the function are: (uiHandle, id, type, flags, x, y).
Name: on-mouse-move
Type: string
Default:
Description: Name of a script function to handle the mouseMove event. Arguments of the function are: (uiHandle, id, type, flags, x, y).
See also:
^
Element: <label>
Description: A static text widget.
Attributes:
Name: enabled
Type: bool
Default: true
Description: Enable status of widget.
Name: style
Type: string
Default:
Description: Qt stylesheet.
Name: text
Type: string
Default: ???
Description: Text on the label.
Name: wordwrap
Type: bool
Default: false
Description: If true, long text will wrap in multiple lines, otherwise will be cut.
Name: on-link-activated
Type: string
Default:
Description: Name of a script function to handle the linkActivated event. Arguments of the function are: (uiHandle, id, linkHref).
See also:
^
Element: <plot>
Description: A widget for displaying time series charts.
Attributes:
Name: background-color
Type: int[3]
Default: -1,-1,-1
Description: Color of the background, as three RGB components in the 0...255 range. The special value -1,-1,-1 means to use the color of the window's background.
Name: foreground-color
Type: int[3]
Default: -1,-1,-1
Description: Color of the foreground elements (i.e.: axes, axes labels, tick labels, tick marks and grid lines), as three RGB components in the 0...255 range. The special value -1,-1,-1 means to use the default color. This value can be overridden by any of the specific attributes for the individual elements.
Name: axis-color
Type: int[3]
Default: -1,-1,-1
Description: Color of the axes, as three RGB components in the 0...255 range. The special value -1,-1,-1 means to use the default color. Can be overridden by axis-x-color and axis-y-color.
Name: label-color
Type: int[3]
Default: -1,-1,-1
Description: Color of the axis labels, as three RGB components in the 0...255 range. The special value -1,-1,-1 means to use the default color. Can be overridden by label-x-color and label-y-color.
Name: grid-color
Type: int[3]
Default: -1,-1,-1
Description: Color of the grid, as three RGB components in the 0...255 range. The special value -1,-1,-1 means to use the default color. Can be overridden by grid-x-color and grid-y-color.
Name: tick-label-color
Type: int[3]
Default: -1,-1,-1
Description: Color of the tick labels, as three RGB components in the 0...255 range. The special value -1,-1,-1 means to use the default color.
Name: axis-x-color
Type: int[3]
Default: -1,-1,-1
Description: Color of the X axis, as three RGB components in the 0...255 range. The special value -1,-1,-1 means to use the default color.
Name: axis-y-color
Type: int[3]
Default: -1,-1,-1
Description: Color of the Y axis, as three RGB components in the 0...255 range. The special value -1,-1,-1 means to use the default color.
Name: label-x-color
Type: int[3]
Default: -1,-1,-1
Description: Color of the X label, as three RGB components in the 0...255 range. The special value -1,-1,-1 means to use the default color.
Name: label-y-color
Type: int[3]
Default: -1,-1,-1
Description: Color of the Y label, as three RGB components in the 0...255 range. The special value -1,-1,-1 means to use the default color.
Name: grid-x-color
Type: int[3]
Default: -1,-1,-1
Description: Color of the X grid, as three RGB components in the 0...255 range. The special value -1,-1,-1 means to use the default color.
Name: grid-y-color
Type: int[3]
Default: -1,-1,-1
Description: Color of the Y grid, as three RGB components in the 0...255 range. The special value -1,-1,-1 means to use the default color.
Name: tick-label-x-color
Type: int[3]
Default: -1,-1,-1
Description: Color of the X tick labels, as three RGB components in the 0...255 range. The special value -1,-1,-1 means to use the default color.
Name: tick-label-y-color
Type: int[3]
Default: -1,-1,-1
Description: Color of the Y tick labels, as three RGB components in the 0...255 range. The special value -1,-1,-1 means to use the default color.
Name: square
Type: bool
Default: false
Description:
Name: max-buffer-size
Type: int
Default: 1000
Description: Maximum size of the buffer(s).
Name: cyclic-buffer
Type: bool
Default: false
Description: If true, buffers will be cyclic when full.
Name: ticks
Type: bool
Default: true
Description: If true, x and y tickmarks will be visible.
Name: x-ticks
Type: bool
Default: true
Description: If true, x tickmarks will be visible.
Name: y-ticks
Type: bool
Default: true
Description: If true, y tickmarks will be visible.
Name: tick-labels
Type: bool
Default: true
Description: If true, x and y tick labels will be visible.
Name: x-tick-labels
Type: bool
Default: true
Description: If true, x tick labels will be visible.
Name: y-tick-labels
Type: bool
Default: true
Description: If true, y tick labels will be visible.
Name: on-click
Type: string
Default:
Description: Name of a script function to handle the click event on a curve data point. Arguments of the function are: (uiHandle, id, curveName, dataIndex, xValue, yValue).
Name: on-legend-click
Type: string
Default:
Description: Name of a script function to handle the click event on a legend item. Arguments of the function are: (uiHandle, id, curveName).
^
Element: <progressbar>
Description: A progress indicator widget.
Attributes:
Name: enabled
Type: bool
Default: true
Description: Enable status of widget.
Name: style
Type: string
Default:
Description: Qt stylesheet.
Name: minimum
Type: int
Default: 0
Description: Minimum value of the progress.
Name: maximum
Type: int
Default: 100
Description: Maximum value of the progress.
Name: orientation
Type: One of:
  • horizontal
  • vertical
Default: horizontal
Description: Orientation.
Name: inverted
Type: bool
Default: true
Description: If true, the progress ends will be inverted.
Name: value
Type: int
Default: 0
Description: Initial value.
Name: text-visible
Type: bool
Default: true
Description: Visibility of progress text.
^
Element: <radiobutton>
Description: A radio button widget.
Attributes:
Name: enabled
Type: bool
Default: true
Description: Enable status of widget.
Name: style
Type: string
Default:
Description: Qt stylesheet.
Name: text
Type: string
Default: ???
Description: Text on the button.
Name: checked
Type: bool
Default: false
Description: If true, this button will be initially checked.
Name: on-click
Type: string
Default:
Description: Name of a script function to handle the click event. Arguments of the function are: (uiHandle, id).
^
Element: <scene3d>
Description: A widget for displaying a 3D scene.
Attributes:
Name: enabled
Type: bool
Default: true
Description: Enable status of widget.
Name: style
Type: string
Default:
Description: Qt stylesheet.
Name: clear-color
Type: int[3]
Default: -1,-1,-1
Description: Color of the background, as three RGB components in the 0...255 range. The special value -1,-1,-1 means to use the color of the window's background.
Name: on-click
Type: string
Default:
Description: Name of a script function to handle the click event. Arguments of the function are: (uiHandle, id, nodeId).
^
Element: <spinbox>
Description: A widget for numeric input, with increase/decrease buttons.
Attributes:
Name: enabled
Type: bool
Default: true
Description: Enable status of widget.
Name: style
Type: string
Default:
Description: Qt stylesheet.
Name: value
Type: int or float
Default: 0
Description: Initial value.
Name: minimum
Type: int or float
Default: 0
Description: Minimum value.
Name: maximum
Type: int or float
Default: 100
Description: Maximum value.
Name: prefix
Type: string
Default:
Description: String prefix in the displayed value.
Name: suffix
Type: string
Default:
Description: String suffix in the displayed value.
Name: step
Type: int or float
Default: 1
Description: Step (increment/decrement) when using the buttons.
Name: decimals
Type: int
Default: 6
Description: Number of displayed decimal places.
Name: float
Type: bool
Default: autodetect
Description: If true, the spinbox will display a floating point value. If false, the spinbox will display integer values. If omitted, this property will be automatically determined by minimum/maximum/step values: if any of those is not a round integer, or if decimals is specified, the spinbox will be float.
Name: on-change
Type: string
Default:
Description: Name of a script function to handle the change event. Arguments of the function are: (uiHandle, id, newValue).
^
Element: <table>
Description: A table widget. Can optionally contain a <header> elements and <row> elements. Each <header>/<row> element contains only <item> elements. <item> elements may have an optional "editable" attribute of type bool.
Attributes:
Name: show-horizontal-header
Type: bool
Default: true
Description: If true, column headers will be visible.
Name: show-vertical-header
Type: bool
Default: false
Description: If true, row headers will be visible. The 'label' attribute of the <row> can be used to change the displayed text of the row header. The default row header is the line number.
Name: autosize-horizontal-header
Type: bool
Default: false
Description: If true, column headers will resize to fit contents.
Name: autosize-vertical-header
Type: bool
Default: true
Description: If true, row headers will resize to fit contents.
Name: show-grid
Type: bool
Default: true
Description: If true, grid will be visible.
Name: selection-mode
Type: One of:
  • items
  • rows
  • columns
Default: items
Description: Controls the selection behavior, i.e. if the user can select individual items, entire rows, or entire columns.
Name: editable
Type: bool
Default: true
Description: If true, cells will be editable.
Name: sortable
Type: bool
Default: false
Description: If true, it will be possible to sort data by columns by clicking on column headers.
Name: on-cell-activate
Type: string
Default:
Description: Name of a script function to handle the cell activate event. Arguments of the function are: (uiHandle, id, row, column, cellValue).
Name: on-selection-change
Type: string
Default:
Description: Name of a script function to handle the selection change event. Arguments of the function are: (uiHandle, id, row, column). If selection mode is 'rows', column will be -1 and vice versa.
Name: on-key-press
Type: string
Default:
Description: Name of a script function to handle the key press event. Arguments of the function are: (uiHandle, id, key, text).
^
Element: <tabs>
Description: A tabs widget. Must contain only <tab> child elements.
Attributes:
Name: enabled
Type: bool
Default: true
Description: Enable status of widget.
Name: style
Type: string
Default:
Description: Qt stylesheet.
See also:
^
Element: <tab>
Description: A tab for the tabs widget. Can only be contained in a <tabs> element. Can contain widgets, just like <ui> and <group>, and has its own layout.
Attributes:
Name: enabled
Type: bool
Default: true
Description: Enable status of widget.
Name: style
Type: string
Default:
Description: Qt stylesheet.
Name: title
Type: string
Default: ???
Description: Title of the tab.
Name: layout
Type: One of:
  • vbox
  • hbox
  • form
  • grid
  • none
Default: vbox
Description: Layout of the widget. When layout is 'none', specify widget placement using the geometry attribute, like: geometry="x,y,width,height".
Name: content-margins
Type: int[4]
Default: 7,7,7,7
Description: Sets the left, top, right, and bottom margins to use around the layout.
See also:
^
Element: <text-browser>
Description: A text browser widget.
Attributes:
Name: enabled
Type: bool
Default: true
Description: Enable status of widget.
Name: style
Type: string
Default:
Description: Qt stylesheet.
Name: text
Type: string
Default:
Description: Initial text content.
Name: type
Type: One of:
  • plain
  • html
  • markdown
Default: html
Description: the type of the text content
Name: read-only
Type: bool
Default: true
Description: if true, text will be read-only
Name: on-change
Type: string
Default:
Description: Name of a script function to handle the change event. Arguments of the function are: (uiHandle, id, newText).
Name: on-link-activated
Type: string
Default:
Description: Name of a script function to handle the linkActivated event. Arguments of the function are: (uiHandle, id, linkHref).
See also:
^
Element: <tree>
Description: A tree widget. Must contain one <header> element and many <row> elements. Each <header>/<row> element contains only <item> elements. <row> elements can have 'id' and 'parent-id' attributes (positive integers) to set relationships between items, and a 'expanded' attribute (bool) to initially expand the item.
Attributes:
Name: show-header
Type: bool
Default: true
Description: If true, column headers will be visible.
Name: autosize-header
Type: bool
Default: false
Description: If true, column headers will resize to fit contents.
Name: sortable
Type: bool
Default: false
Description: If true, it will be possible to sort data by columns by clicking on column headers.
Name: on-selection-change
Type: string
Default:
Description: Name of a script function to handle the selection change event. Arguments of the function are: (uiHandle, id, item_id).
^
Element: <vslider>
Description: A vertical slider widget.
Attributes:
Name: enabled
Type: bool
Default: true
Description: Enable status of widget.
Name: style
Type: string
Default:
Description: Qt stylesheet.
Name: value
Type: int
Default: 0
Description: Initial value.
Name: minimum
Type: int
Default: 0
Description: Minimum value.
Name: maximum
Type: int
Default: 100
Description: Maximum value.
Name: tick-interval
Type: int
Default: 0
Description: Tick interval.
Name: tick-position
Type: One of:
  • none
  • both-sides
  • above
  • below
  • left
  • right
Default: none
Description: In which direction to draw ticks.
Name: inverted
Type: bool
Default: false
Description: If true, minimum and maximum will be swapped.
Name: on-change
Type: string
Default:
Description: Name of a script function to handle the change event. Arguments of the function are: (uiHandle, id, newValue).
See also:
^
Element: <svg>
Description: An SVG widget. Content can be embedded in the XML.
Attributes:
Name: enabled
Type: bool
Default: true
Description: Enable status of widget.
Name: style
Type: string
Default:
Description: Qt stylesheet.
Name: file
Type: string
Default:
Description: File to load.
Name: on-mouse-down
Type: string
Default:
Description: Name of a script function to handle the mouseDown event. Arguments of the function are: (uiHandle, id, type, flags, x, y).
Name: on-mouse-up
Type: string
Default:
Description: Name of a script function to handle the mouseUp event. Arguments of the function are: (uiHandle, id, type, flags, x, y).
Name: on-mouse-move
Type: string
Default:
Description: Name of a script function to handle the mouseMove event. Arguments of the function are: (uiHandle, id, type, flags, x, y).
See also:
^
Element: <stretch>
Description: Special element that can be put inside a parent with layout (such as <ui>, <group> or <tab>) if the layout is hbox or vbox.
Attributes:
Name: factor
Type: int
Default: 0
Description: Stretch factor (see http://doc.qt.io/qt-4.8/layout.html#stretch-factors).
^
Element: <br>
Description: Special element that can be put inside a parent with layout (such as <ui>, <group> or <tab>) if the layout is grid, and it is used to begin a new line in the grid layout.
Attributes: