CSRelatedDisplay QML Type

Brings up more displays. More...

Import Statement: import CSDataQuick.Components 1.0
Inherits:

BaseItem

Properties

Detailed Description

The Related Display provides a means of bringing up more displays. It is by default a menu button that has a graphic consisting of two overlapping squares and a label. But it can also be a group of buttons layout in a row or column. This visual reprsentation is set by property visual.

The model denote the related displays that can be displayed. If there is only one related display specified in the menu, then the two overlapping squares and/or label appear in the middle of the button, and the related display is activated immediately without bringing up a menu.

It is not activated until the button is released, so you can depress the button to check if there is more than one menu item or not, then abort by releasing the button away from the Related Display. If there is more than one item on the menu, the squares and/or label are at the left of the button.

The new display can be configured by "replace" property to always replace the parent. When the parent display is replaced by the new display, its upper-left corner should be at the former position of the parent, unless the new display was already in existence. In that case the existing display is popped up, and its position is not changed.

Row {
    spacing: 10
    CSRelatedDisplay {
        width: 100
        height: 25
        label: 'More ...'
        model: ListModel {
            ListElement {label:'Monitors'; file: 'monitors.adl'; replace: true;}
            ListElement {label:'Graphics'; file: 'graphics.adl'; replace: true;}
        }
    }
    CSRelatedDisplay {
        width: 100
        height: 60
        visual: RelatedDisplayVisual.Column
        model: [
            {"label":"Monitors", "file":"monitor.adl", "macro":"", "replace":true},
            {"label":"Controls", "file":"control.adl", "macro":"", "replace":true}
        ]
    }
}

Property Documentation

font : font

The text font.


fontSizeMode : int

This property specifies how the font size of the displayed text is determined.

See also fontSizeMode.


label : string

This property holds the text displayed on the button.

Normally there are two overlapping squares on the button to denote a Related Display control. However, if the label text begins with "-" (for example "-My Label"), the overlapping squares will not appear.


model : var

This property holds the related display list model

The model contains entries to display files. It can be ListModel or JSON object array. In either case, each entry contains the following.

  • label: text description
  • file: display file name
  • macro: macro substitution
  • replace: replace the parent display if true

Note: Only in the form of JSON object array, it can be used in Qt Quick Designer


visual : int

  • RelatedDisplayVisual.Menu: Use a pull down menu for the choices.
  • RelatedDisplayVisual.Row: Use a row of buttons for the choices.
  • RelatedDisplayVisual.Column: Use a column of buttons for the choices.