Commit 2bcbdf3b authored by Andrew Flegg's avatar Andrew Flegg

Add moire effect and lock to landscape on all platforms

parent 02b2448a
......@@ -28,18 +28,17 @@ int main(int argc, char *argv[])
* ActiveMonitor object that has an "active" property to the QML
* context. Inside QML, use "activeMonitor.active" as boolean.
**/
// TODO With Qt Quick Components, we can http://library.developer.nokia.com/topic/MeeGo_1.2_Harmattan_API/html/guide/html/Developer_Library_Application_development_framework_Application_lifecycle_a92f.html
ActiveMonitor *monitor = new ActiveMonitor(&viewer);
QObject::connect(&viewer, SIGNAL(activeChanged(bool)),
monitor, SLOT(activeChanged(bool)));
viewer.rootContext()->setContextProperty("activeMonitor", monitor);
viewer.engine()->rootContext()->setContextProperty("portraitDevice", portrait);
viewer.engine()->rootContext()->setContextProperty("portraitDevice", false); //portrait);
viewer.setMainQmlFile("qml/attitude/qtc-root.qml");
if (viewer.status() != QDeclarativeView::Ready || viewer.errors().length() != 0)
viewer.setMainQmlFile("qml/attitude/Main.qml");
viewer.setOrientation(QmlApplicationViewer::ScreenOrientationLockLandscape);
// viewer.setOrientation(QmlApplicationViewer::ScreenOrientationLockLandscape);
if (fullscreen) {
viewer.showFullScreen();
......
File added
......@@ -82,14 +82,14 @@ Item {
x: (world.width / 2) - parent.barWidth
y: (world.height / 2) - (parent.barHeight / 2)
width: parent.barWidth
height: 1
height: 2
color: "#ffffff"
}
Rectangle {
id: heightBarMain
x: world.width / 2
y: heightBarTop.y
width: 1
width: 2
height: parent.barHeight
color: "#ffffff"
}
......@@ -98,7 +98,7 @@ Item {
x: heightBarMain.x
y: heightBarMain.y + parent.barHeight
width: parent.barWidth
height: 1
height: 2
color: "#ffffff"
}
Repeater {
......@@ -112,13 +112,17 @@ Item {
x: heightBarMain.x - parent.barWidth / _divisor
y: heightBarMain.y + parent.barHeight * (index + 1)/10
width: parent.barWidth / (_divisor / 2)
height: 1
height: 2
color: "#ffffff"
}
}
}
}
Image {
source: "moire.png"
}
/**
* The angle meter in the top-right.
......
import QtQuick 1.0
import com.meego 1.0
PageStackWindow {
//PageStackWindow {
Main {
id: window
anchors.fill: parent
showStatusBar: true
showToolBar: false
/* showStatusBar: true
# showToolBar: false
initialPage: Page {
orientationLock: PageOrientation.LockLandscape
# initialPage: Page {
# orientationLock: PageOrientation.LockLandscape
Main {}
}
*/
Component.onCompleted: {
if (platformWindow)
activeMonitor.external = true
console.log("Set activeMonitor external modification = " + activeMonitor.external)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment