Meego Wiki
Views

VideoPicker API Snapshot

From MeeGo wiki
Jump to: navigation, search

Contents

Description

The VideoPicker provides a modal dialog in which the user can choose an album or video. The 'Ok' button is disabled until a selection was made. On 'Ok'-clicked, depending on the selection mode, the fitting signal is emitted which provides the selected item's data. Multi selection of items is possible by setting set multiSelection to true.

API Properties

bool albumSelectionMode
If true, selects albums instead of videos. DEPRECATED

Signals

videoSelected
Propagates data of the selected video. Triggered on accepted if albumSelectionMode is false and multiSelection is false
Parameters:
  • string itemid, ID of the selected video.
  • string uri, path to the selected video.
  • string itemtitle, title of the selected video.
  • string thumbUri, path to the thumbnail.
multipleVideosSelected
Propagates data of the selected videos. Triggered on accepted if albumSelectionMode is false and multiSelection is true
Parameters:
  • string itemids, ID of the selected videos.
  • string uris, path to the selected videos.
  • string itemtitles, title of the selected videos.
  • string thumbUris, path to the thumbnails.
albumSelected
Propagates data of the selected album. Triggered on accpeted if albumSelectionMode is true and multiSelection is false. DEPRECATED
Parameters:
  • string albumid, ID of the selected photo album.
  • string title, title of the selected photo album.
multipleAlbumsSelected
Propagates data of the selected albums. Triggered on accpeted if albumSelectionMode is true and multiSelection is true. DEPRECATED
Parameters:
  • string albumids, ID of the selected photo albums.
  • string titles, title of the selected photo albums.
accepted
Emitted on 'OK' clicked.
rejected
Emitted on 'Cancel' clicked.

Functions

show
Fades the picker in, inherited from ModalFog.
hide
Fades the picker out, inherited from ModalFog.

Example

AppPage{
    VideoPicker {
        id: pickerExample

        onVideoSelected: {
            // itemid, itemtitle and uri are available, picker dialog hidden
        }

        onRejected: {
            // cancel was clicked, picker dialog hidden and no photo selected
        }
    }

    Component.onCompleted: {
        pickerExample.show();
    }
}
Personal tools