diff options
Diffstat (limited to 'examples/declarative/window')
-rw-r--r-- | examples/declarative/window/Window.qml | 2 | ||||
-rw-r--r-- | examples/declarative/window/screen/screenInfo.qml (renamed from examples/declarative/window/screen/ruler.qml) | 47 | ||||
-rw-r--r-- | examples/declarative/window/standalone.qml | 2 | ||||
-rw-r--r-- | examples/declarative/window/window.cpp | 2 |
4 files changed, 10 insertions, 43 deletions
diff --git a/examples/declarative/window/Window.qml b/examples/declarative/window/Window.qml index a779256f6f..e11958f5ed 100644 --- a/examples/declarative/window/Window.qml +++ b/examples/declarative/window/Window.qml @@ -2,7 +2,7 @@ ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the examples of the Qt Toolkit. ** diff --git a/examples/declarative/window/screen/ruler.qml b/examples/declarative/window/screen/screenInfo.qml index 905d729b05..9a9727693f 100644 --- a/examples/declarative/window/screen/ruler.qml +++ b/examples/declarative/window/screen/screenInfo.qml @@ -2,7 +2,7 @@ ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the examples of the Qt Toolkit. ** @@ -43,13 +43,11 @@ import QtQuick.Window 2.0 as Window Item { id: root - width: 800 - height: dpi + dpcm - property real dpcm: Window.Screen.physicalDotsPerInch / 2.54 - property real dpi: Window.Screen.physicalDotsPerInch + width: 400 + height: 200 Item { id: main - state: "orientation " + Window.Screen.currentOrientation + state: "orientation " + Window.Screen.orientation property bool landscapeWindow: Window.Screen.primaryOrientation == Qt.LandscapeOrientation property real baseWidth: landscapeWindow ? root.height : root.width @@ -61,42 +59,11 @@ Item { height: main.baseHeight anchors.centerIn: parent - Repeater { - model: Math.ceil(main.width/ dpcm) + 1 - delegate: Rectangle{ - border.width: 1 - color: "goldenrod" - width: dpcm - height: dpcm - x: dpcm * (index - 1) - Text { - anchors.right: parent.right - anchors.bottom: parent.bottom - anchors.margins: 2 - font.pointSize: 6 - text: index + " cm" - } - } + Text { + text: "Screen is " + Window.Screen.width + "x" + Window.Screen.height + " and primarily orientation " + Window.Screen.primaryOrientation + anchors.centerIn:parent } - Repeater { - model: Math.ceil(main.width / dpi) + 1 - delegate: Rectangle{ - border.width: 1 - color: "goldenrod" - width: dpi - height: dpi - x: dpi * (index - 1) - y: dpcm - Text { - anchors.right: parent.right - anchors.bottom: parent.bottom - anchors.margins: 2 - font.pointSize: 8 - text: index + " in" - } - } - } states: [ State { diff --git a/examples/declarative/window/standalone.qml b/examples/declarative/window/standalone.qml index e2db6efdc9..ee52ff27be 100644 --- a/examples/declarative/window/standalone.qml +++ b/examples/declarative/window/standalone.qml @@ -2,7 +2,7 @@ ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the examples of the Qt Toolkit. ** diff --git a/examples/declarative/window/window.cpp b/examples/declarative/window/window.cpp index ea502d556c..c31057b674 100644 --- a/examples/declarative/window/window.cpp +++ b/examples/declarative/window/window.cpp @@ -2,7 +2,7 @@ ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) +** Contact: http://www.qt-project.org/ ** ** This file is part of the examples of the Qt Toolkit. ** |