summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Nichols <andy.nichols@theqtcompany.com>2014-12-01 12:50:53 +0100
committerAndy Nichols <andy.nichols@theqtcompany.com>2014-12-02 10:33:37 +0200
commitdaf7b6840eca677f12e98eb4e0d12e895fe9be81 (patch)
treec6bc0b89f157450347dcf974f5b696c81ae46f4a
parent8f0ca3c90ffe11831b99499583e3ef1b2757118d (diff)
Update Screenshot util to work with new launcher
Change-Id: I9d4216454efb05c1276ed943f480f9283cc24b08 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@theqtcompany.com>
-rw-r--r--screenshot/Main.qml30
1 files changed, 23 insertions, 7 deletions
diff --git a/screenshot/Main.qml b/screenshot/Main.qml
index b07f93a..2c5b971 100644
--- a/screenshot/Main.qml
+++ b/screenshot/Main.qml
@@ -18,17 +18,33 @@
import QtQuick 2.0
import Qt.labs.screenshot 1.0
+import QtQuick.Window 2.0
+import com.qtcompany.B2QtLauncher 1.0
-Item
+
+Window
{
- id: root;
+ id: root
+ visible: true
width: 1280
height: 720
- Connections {
- target: applicationsModel
- onReady: listView.listIndex = 0;
+ LauncherApplicationsModel {
+ id: applicationsModel
+ onReady: {
+ engine.markApplicationsModelReady();
+ }
+ Component.onCompleted: {
+ //Set the directory to parse for apps
+ initialize(applicationSettings.appsRoot);
+ }
+ }
+
+ LauncherEngine {
+ id: engine
+ bootAnimationEnabled: applicationSettings.isBootAnimationEnabled
+ fpsEnabled: applicationSettings.isShowFPSEnabled
}
ListView {
@@ -75,7 +91,7 @@ Item
script: {
var isPortrait = root.width < root.height;
- var size = Qt.size(400, 225);
+ var size = Qt.size(800, 450);
var smallSize = Qt.size(128, 72);
var loc = applicationsModel.locationAt(listView.listIndex) + "/"
var name = "preview_l"
@@ -88,7 +104,7 @@ Item
}
screenshot.grab(loc + name + ext, size); // medium resolution
- screenshot.grab(loc + name + "_lr" + ext, smallSize); // low resolution
+ //screenshot.grab(loc + name + "_lr" + ext, smallSize); // low resolution
}
}
PauseAnimation { duration: 100 }