Empty
A list item with no contents. The Empty class can be used for generic list items containing other components such as buttons. It is selectable and can take mouse clicks. It will attempt to detect if a thin dividing line at the bottom of the item is suitable, but this behaviour can be overridden (using showDivider). For specific types of list items, see its subclasses. More...
Inherits AbstractButton
Inherited by Base, SingleControl, Standard, and ValueSelector.
Properties
- action : Action
- backgroundIndicator : list<Item>
- bottomDividerLine : ThinDivider
- confirmRemoval : bool
- highlightWhenPressed : bool (preliminary)
- hovered : bool
- iconSource : url
- pressed : bool
- removable : bool (preliminary)
- selected : bool (preliminary)
- showDivider : bool (preliminary)
- style : Component
- swipingState : string
- text : string
- waitingConfirmationForRemoval : bool
Signals
- itemRemoved() (preliminary)
Methods
- cancelItemRemoval() (preliminary)
Detailed Description
The item will still remain in memory after being removed from the list so it is up to the application to destroy it. This can be handled by the signal itemRemoved that is fired after all animation is done.
Examples:
import Ubuntu.Components 0.1 import Ubuntu.Components.ListItems 0.1 as ListItem Item { Model { id: contactModel ListElement { name: "Bill Smith" number: "555 3264" } ListElement { name: "John Brown" number: "555 8426" } } ListView { width: 180; height: 200 model: contactModel delegate: ListItem.Empty { height: units.gu(6) removable: true onItemRemoved: contactModel.remove(index) Text { text: name + " " + number anchors.centerIn: parent } } } }
See the documentation of the derived classes of Empty for more examples. This component is under heavy development.
Property Documentation
action : Action |
The Action associated with this ActionItem. If action is set, the values of the Action properties are copied to the values of the ActionItem properties.
This documentation is under development and is subject to change.
Defines the item background item to be showed during the item swiping
This documentation is under development and is subject to change.
Defines if the item needs confirmation before removing by swiping.
bottomDividerLine : ThinDivider |
This documentation is under development and is subject to change.
Exposes our the bottom line divider.
This documentation is under development and is subject to change.
Highlight the list item when it is pressed. This is used to disable the highlighting of the full list item when custom highlighting needs to be implemented (for example in ListItem.Standard which can have a split).
The image associated with the actionItem. Default value: action.iconSource.
This documentation is under development and is subject to change.
Defines if this item can be removed or not.
This documentation is under development and is subject to change.
Specifies whether the list item is selected.
This documentation is under development and is subject to change.
Set to show or hide the thin bottom divider line (drawn by the ThinDivider component). This line is shown by default except in cases where this item is the delegate of a ListView.
This documentation is under development and is subject to change.
The current swiping state ("SwipingLeft", "SwipingRight", "")
The title of the actionItem. Default value: action.text
This documentation is under development and is subject to change.
Defines if the item is waiting for the user interaction during the swipe to delete
Signal Documentation
This documentation is under development and is subject to change.
This handler is called when the item is removed from the list
Method Documentation
This documentation is under development and is subject to change.
Cancel item romoval