ModeSelectorModel

Allows to switch between different items by clicking on them. The selected Item can also be changed by calling the exposed select function. A change in the selected item is signalled with the selectionChanged signal providing the newly selected item.

The items need to be provided as an array of objects. The keys name and text need to be present. Optionally, a tooltip property is accepted.

If no other selectedItem is provided, the first element of items will be selected by default. This initial selection does not trigger the above mentioned signal. In the selected item or the item to be selected is specified by the name of the item as a string. This is also what the selectionChanged signal will provide. The ModeSelector can be deactivated, graying out its UI elements and not accepting mouse inputs any longer.