Qt Components Hildon  0.20
QML components for Maemo5 with Hildon styling.
 All Classes Functions Properties Groups Pages
screenshot.qml
import QtQuick 1.0
import org.hildon.components 1.0
import org.hildon.utils 1.0
Window {
id: window
title: qsTr("ScreenShot Example")
visible: true
Column {
id: column
anchors {
left: parent.left
right: parent.right
top: parent.top
}
width: parent.width
text: qsTr("Delay")
}
id: spinbox
width: parent.width
minimum: 1
maximum: 20
value: 1
suffix: " " + qsTr("secs")
}
id: pathButton
width: parent.width
text: qsTr("Output folder")
valueText: fileDialog.folder
onClicked: fileDialog.open()
}
id: screenshotButton
width: parent.width
text: qsTr("Take screenshot")
onClicked: timer.start()
}
}
id: fileDialog
}
Timer {
id: timer
interval: spinbox.value * 1000
onTriggered: screenshot.grab()
}
id: screenshot
fileName: fileDialog.folder + "/screenshot.png"
}
}