Meego Wiki
Views

MediaGridView API Snapshot

From MeeGo wiki
(Difference between revisions)
Jump to: navigation, search
(created MediaGridView API Snapshot page)
(removed private properties)
 
Line 13: Line 13:
;''int'' type  
;''int'' type  
:The internal type. See the private properties for details.
:The internal type. See the private properties for details.
-
 
-
=Private properties=
 
-
;''int'' musictype
 
-
:Provide an enum for musictype
 
-
;''int videotype
 
-
:Provide an enum for videotype
 
-
;''int'' phototype
 
-
:Provide an enum for phototype
 
-
;''int'' photoalbumtype
 
-
:Provide an enum for photoalbumtype
 
   
   
=Signals=
=Signals=

Latest revision as of 12:31, 28 April 2011

Contents

Description

Displays a given set of images representing videos, folders or image files in a grid view.

API properties

int spacing
The border margin of the items.
string defaultThumbnail
The default image for the items.
int frameBorderWidth
Margin of the selection overlay.
bool selectionMode
On true the selected item is highlighted, on false only a pressed state is provided.
int type
The internal type. See the private properties for details.

Signals

clicked
Emitted when an item was clicked.
Parameter:
  • int mouseX, x position of the click event.
  • int mouseY, y position of the click event.
  • int payload, the clicked item.
longPressAndHold
Emitted when an item was long pressed.
Parameters:
  • int mouseX, x position of the click event.
  • int mouseY, y position of the click event.
  • variant payload, the clicked item.
doubleClicked
Emitted when an item was double clicked. Note that a 'clicked' for the first click is emitted as well.
Parameters:
  • int mouseX, x position of the click event.
  • int mouseY, y position of the click event.
  • variant payload, the clicked item.
released
Emitted when the left mouse button was released.
Parameter:
  • int mouseX, x position of the click event.
  • int mouseY, y position of the click event.
  • variant payload, the clicked item.
positionChanged
Emitted when the mouse moves above the item.
Parameter:
  • int mouseX, x position of the click event.
  • int mouseY, y position of the click event.
  • int payload, the hovered item.

Functions

formatMinutes
Provides functionality to calculate hours and minutes. Only for qml internal use.
Parameter:
  • int time, time/duration in seconds, for internal use only

Example

MediaGridView {
    id: gridView

    model: someModel

    anchors.top: parent.top
    anchors.bottom: parent.bottom

    type: 2

    width: 400

    onClicked: {
        // selected item and click position
    }
}
Personal tools