Skip to content

Instantly share code, notes, and snippets.

@elpuri
Created August 13, 2011 12:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elpuri/1143776 to your computer and use it in GitHub Desktop.
Save elpuri/1143776 to your computer and use it in GitHub Desktop.
Minimal camera roll for Harmattan/MeeGo
import QtQuick 1.1
import com.meego 1.0
import QtMobility.gallery 1.1
Item {
id: root
width: screen.width
height: screen.height
GridView {
width: parent.height
height: parent.width
anchors.centerIn: parent
rotation: 270
maximumFlickVelocity: 3000
model: model
cellHeight: 160
cellWidth: 160
delegate: Image {
height: 160
width: 160
asynchronous: true
smooth: true
source: "file:///home/user/.thumbnails/grid/" + Qt.md5(url) + ".jpeg"
}
}
DocumentGalleryModel {
id: model
rootType: DocumentGallery.Image
properties: ["url"]
filter: GalleryWildcardFilter {
property: "fileName";
value: "*.jpg";
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment