Kill com.nokia.meego importing in the ui.
authorMohammed Sameer <msameer@foolab.org>
Mon, 22 Jul 2013 21:45:40 +0000 (00:45 +0300)
committerMohammed Sameer <msameer@foolab.org>
Mon, 22 Jul 2013 21:45:40 +0000 (00:45 +0300)
We have a set of components underneath qml/harmattan implementing harmattan specific
functionality. The rest should be more or less generic.

49 files changed:
qml/CameraSettings.qml
qml/CameraToolBar.qml
qml/CaptureButton.qml
qml/CheckButton.qml
qml/FlashButton.qml
qml/ImageColorFilterButton.qml
qml/ImageEvCompButton.qml
qml/ImageIsoButton.qml
qml/ImageOverlay.qml
qml/ImageResolutionSettings.qml
qml/ImageSceneButton.qml
qml/ImageSettings.qml
qml/ImageWhiteBalanceButton.qml
qml/PostCaptureItem.qml
qml/PostCaptureView.qml
qml/PreviewImage.qml
qml/RecordingDurationLabel.qml
qml/SectionHeader.qml
qml/Standby.qml
qml/TextSwitch.qml
qml/VideoColorFilterButton.qml
qml/VideoEvCompButton.qml
qml/VideoMuteButton.qml
qml/VideoOverlay.qml
qml/VideoPlayerPage.qml
qml/VideoResolutionSettings.qml
qml/VideoSceneButton.qml
qml/VideoSettings.qml
qml/VideoTorchButton.qml
qml/VideoWhiteBalanceButton.qml
qml/ZoomCaptureButton.qml
qml/ZoomCaptureCancel.qml
qml/ZoomSlider.qml
qml/harmattan/CameraButton.qml [new file with mode: 0644]
qml/harmattan/CameraButtonRow.qml [new file with mode: 0644]
qml/harmattan/CameraButtonStyle.qml [new file with mode: 0644]
qml/harmattan/CameraInfoBanner.qml [new file with mode: 0644]
qml/harmattan/CameraLabel.qml [new file with mode: 0644]
qml/harmattan/CameraMenu.qml [new file with mode: 0644]
qml/harmattan/CameraMenuAction.qml [new file with mode: 0644]
qml/harmattan/CameraQueryDialog.qml [new file with mode: 0644]
qml/harmattan/CameraSlider.qml [new file with mode: 0644]
qml/harmattan/CameraSwitch.qml [new file with mode: 0644]
qml/harmattan/CameraTextField.qml [new file with mode: 0644]
qml/harmattan/CameraToolIcon.qml [new file with mode: 0644]
qml/harmattan/CameraWindow.qml [new file with mode: 0644]
qml/harmattan/harmattan.qrc [new file with mode: 0644]
qml/main.qml
src/src.pro

index 9a67ba1..062044c 100644 (file)
  */
 
 @IMPORT_QT_QUICK@
-import com.nokia.meego 1.1
 
 Column {
     id: col
     spacing: 10
     width: parent.width
 
-    Label {
+    CameraLabel {
         font.pixelSize: 36
         text: qsTr("Camera settings")
         width: parent.width
@@ -49,7 +48,7 @@ Column {
         width: parent.width
     }
 
-    TextField {
+    CameraTextField {
         placeholderText: qsTr("Name or copyright")
         width: parent.width
         text: settings.creatorName
index c0e5366..f75a789 100644 (file)
@@ -21,7 +21,6 @@
  */
 
 @IMPORT_QT_QUICK@
-import com.nokia.meego 1.1
 import "CameraToolBar.js" as Layout
 
 Rectangle {
@@ -44,7 +43,7 @@ Rectangle {
         PropertyAnimation { duration: 100 }
     }
 
-    ToolIcon {
+    CameraToolIcon {
         property bool __isMenu: true
         visible: !parent.hideBack
         id: menu
index 6dc99a3..9f0dde5 100644 (file)
  */
 
 @IMPORT_QT_QUICK@
-import com.nokia.meego 1.1
 
 Item {
     id: button
 
     property url iconSource
-    property Style platformStyle: ButtonStyle {}
+    property CameraButtonStyle platformStyle: CameraButtonStyle {}
 
     property alias pressed: mouse.pressed
     property alias mouseX: mouse.mouseX
@@ -61,4 +60,4 @@ Item {
         source: button.iconSource
         visible: source != ""
     }
-}
\ No newline at end of file
+}
index 8aa8eb0..f00fff8 100644 (file)
@@ -21,9 +21,8 @@
  */
 
 @IMPORT_QT_QUICK@
-import com.nokia.meego 1.1
 
-ToolIcon {
+CameraToolIcon {
     id: button
     property string normalIcon: ""
     property string checkedIcon: ""
index bf6cc51..b6ae252 100644 (file)
  */
 
 @IMPORT_QT_QUICK@
-import com.nokia.meego 1.1
 import QtCamera 1.0
 import "data.js" as Data
 
-ToolIcon {
+CameraToolIcon {
     id: button
 
     iconSource: "image://theme/" + Data.flashIcon(settings.imageFlashMode)
 
     property list<Item> items: [
-        Label {
+        CameraLabel {
             height: parent ? parent.height : 0
             text: qsTr("Flash")
             verticalAlignment: Text.AlignVCenter
index c28a54e..2b9eb5a 100644 (file)
  */
 
 @IMPORT_QT_QUICK@
-import com.nokia.meego 1.1
 import QtCamera 1.0
 import "data.js" as Data
 
-ToolIcon {
+CameraToolIcon {
     id: button
     iconSource: "image://theme/" + Data.cfIcon(settings.imageColorFilter)
 
     property list<Item> items: [
-        Label {
+        CameraLabel {
             height: parent ? parent.height : 0
             text: qsTr("Filter")
             verticalAlignment: Text.AlignVCenter
index 0a12cf7..02b0f0d 100644 (file)
  */
 
 @IMPORT_QT_QUICK@
-import com.nokia.meego 1.1
 import QtCamera 1.0
 
-ToolIcon {
+CameraToolIcon {
     id: button
 
     iconSource: settings.imageEvComp == 0 ? "image://theme/icon-m-camera-manual-exposure" : ""
 
-    Label {
+    CameraLabel {
         anchors.fill: parent
         verticalAlignment: Text.AlignVCenter
         visible: settings.imageEvComp != 0
@@ -37,12 +36,12 @@ ToolIcon {
     }
 
     property list<Item> items: [
-        Label {
+        CameraLabel {
             height: parent ? parent.height : 0
             text: qsTr("EV")
             verticalAlignment: Text.AlignVCenter
         },
-        Slider {
+        CameraSlider {
             id: slider
             width: 500
             orientation: Qt.Horizontal
index 7cccff7..a4d5f2f 100644 (file)
  */
 
 @IMPORT_QT_QUICK@
-import com.nokia.meego 1.1
 import QtCamera 1.0
 import "data.js" as Data
 
-ToolIcon {
+CameraToolIcon {
     id: button
 
     iconSource: "image://theme/" + Data.isoIcon(settings.imageIso)
 
     property list<Item> items: [
-        Label {
+        CameraLabel {
             height: parent ? parent.height : 0
             text: qsTr("ISO")
             verticalAlignment: Text.AlignVCenter
         },
-        Button {
+        CameraButton {
             property int value: 0
             onClicked: settings.imageIso = value
             text: qsTr("Auto")
@@ -44,7 +43,7 @@ ToolIcon {
             checked: settings.imageIso == value
             anchors.verticalCenter: parent ? parent.verticalCenter : undefined
         },
-        Button {
+        CameraButton {
             property int value: 100
             onClicked: settings.imageIso = value
             text: value
@@ -52,7 +51,7 @@ ToolIcon {
             checked: settings.imageIso == value
             anchors.verticalCenter: parent ? parent.verticalCenter : undefined
         },
-        Button {
+        CameraButton {
             property int value: 200
             onClicked: settings.imageIso = value
             text: value
@@ -60,7 +59,7 @@ ToolIcon {
             checked: settings.imageIso == value
             anchors.verticalCenter: parent ? parent.verticalCenter : undefined
         },
-        Button {
+        CameraButton {
             property int value: 400
             onClicked: settings.imageIso = value
             text: value
@@ -68,7 +67,7 @@ ToolIcon {
             checked: settings.imageIso == value
             anchors.verticalCenter: parent ? parent.verticalCenter : undefined
         },
-        Button {
+        CameraButton {
             property int value: 800
             onClicked: settings.imageIso = value
             text: value
index 9875ab4..7589e53 100644 (file)
@@ -21,7 +21,6 @@
  */
 
 @IMPORT_QT_QUICK@
-import com.nokia.meego 1.1
 import QtCamera 1.0
 import CameraPlus 1.0
 import "data.js" as Data
index 3c78458..17ad2cf 100644 (file)
@@ -21,7 +21,6 @@
  */
 
 @IMPORT_QT_QUICK@
-import com.nokia.meego 1.1
 
 Column {
     spacing: 10
@@ -30,7 +29,7 @@ Column {
         text: qsTr("Aspect ratio")
     }
 
-    ButtonRow {
+    CameraButtonRow {
         id: aspectRatioRow
         width: parent.width
         enabled: cam.idle
@@ -38,7 +37,7 @@ Column {
 
         Repeater {
             model: imageSettings.aspectRatios
-            delegate: Button {
+            delegate: CameraButton {
                 text: qsTr(modelData)
                 checked: settings.imageAspectRatio == modelData
                 onClicked: settings.imageAspectRatio = modelData
@@ -50,7 +49,7 @@ Column {
         text: qsTr("Resolution")
     }
 
-    ButtonRow {
+    CameraButtonRow {
         id: resolutionsRow
         width: parent.width
         enabled: cam.idle
@@ -67,7 +66,7 @@ Column {
             model: imageSettings.resolutions.aspectRatio == settings.imageAspectRatio ?
                 imageSettings.resolutions : undefined
 
-            delegate: Button {
+            delegate: CameraButton {
                 font.capitalization: Font.Capitalize
                 text: qsTr("%1 %2 Mpx").arg(resolutionName).arg(megaPixels)
                 checked: settings.imageResolution == resolutionName
index 226be62..5750f58 100644 (file)
  */
 
 @IMPORT_QT_QUICK@
-import com.nokia.meego 1.1
 import QtCamera 1.0
 import "data.js" as Data
 
-ToolIcon {
+CameraToolIcon {
     id: button
 
     iconSource: "image://theme/" + Data.ismIcon(settings.imageSceneMode)
 
     property list<Item> items: [
-        Label {
+        CameraLabel {
             height: parent ? parent.height : 0
             text: qsTr("Scene")
             verticalAlignment: Text.AlignVCenter
index 220f226..a5b07fb 100644 (file)
@@ -21,7 +21,6 @@
  */
 
 @IMPORT_QT_QUICK@
-import com.nokia.meego 1.1
 import QtCamera 1.0
 
 Flickable {
@@ -34,7 +33,7 @@ Flickable {
         width: parent.width
         spacing: 10
 
-        Label {
+        CameraLabel {
             font.pixelSize: 36
             text: qsTr("Image settings")
         }
index 55290e9..2cbf7c5 100644 (file)
  */
 
 @IMPORT_QT_QUICK@
-import com.nokia.meego 1.1
 import QtCamera 1.0
 import "data.js" as Data
 
-ToolIcon {
+CameraToolIcon {
     id: button
 
     iconSource: "image://theme/" + Data.wbIcon(settings.imageWhiteBalance)
 
     property list<Item> items: [
-        Label {
+        CameraLabel {
             height: parent ? parent.height : 0
             text: qsTr("WB")
             verticalAlignment: Text.AlignVCenter
index f9c4a85..b2911fe 100644 (file)
@@ -21,7 +21,6 @@
  */
 
 @IMPORT_QT_QUICK@
-import com.nokia.meego 1.1
 import CameraPlus 1.0
 
 Item {
@@ -57,6 +56,7 @@ Item {
         onFinished: loader.source = ""
     }
 
+// TODO: rotation
     QuillItem {
         id: image
         width: parent.width - 10
@@ -65,7 +65,7 @@ Item {
         Component.onCompleted: initialize(itemData.url, itemData.mimetype)
         visible: loader.source == ""
 
-        Label {
+        CameraLabel {
             anchors.fill: parent
             visible: image.error
             text: qsTr("Failed to load preview")
@@ -81,7 +81,7 @@ Item {
             onClicked: postCaptureItem.clicked()
         }
 
-        ToolIcon {
+        CameraToolIcon {
             // TODO: this is overlapping with error.
             id: playIcon
             anchors.centerIn: parent
index a1c0e06..ea5b700 100644 (file)
@@ -22,7 +22,6 @@
 
 @IMPORT_QT_QUICK@
 import CameraPlus 1.0
-import com.nokia.meego 1.1
 import QtCamera 1.0
 
 Item {
@@ -108,10 +107,8 @@ Item {
         anchors.leftMargin: 20
         opacity: 0.8
 
-        property bool show: deleteDialog.status == DialogStatus.Open ||
-            deleteDialog.status == DialogStatus.Opening ||
-            hideTimer.running || menu.status == DialogStatus.Open ||
-            menu.status == DialogStatus.Opening ||
+        property bool show: deleteDialog.isOpen || deleteDialog.isOpening ||
+            hideTimer.running || menu.isOpen || menu.isOpening ||
             (view.currentItem && view.currentItem.error) && !view.currentItem.playing
 
         Behavior on anchors.bottomMargin {
@@ -119,28 +116,28 @@ Item {
         }
 
         items: [
-            ToolIcon {
+            CameraToolIcon {
                 iconId: !available ? "icon-m-toolbar-favorite-mark-dimmed-white" : view.currentItem.itemData.favorite ? "icon-m-toolbar-favorite-mark-white" : "icon-m-toolbar-favorite-unmark-white"
                 onClicked: {
                     addOrRemoveFavorite()
                     restartTimer()
                 }
             },
-            ToolIcon {
+            CameraToolIcon {
                 iconId: available ? "icon-m-toolbar-share-white" : "icon-m-toolbar-share-dimmed-white"
                 onClicked: {
                     shareCurrentItem()
                     restartTimer()
                 }
             },
-            ToolIcon {
+            CameraToolIcon {
                 iconId: available ? "icon-m-toolbar-delete-white" : "icon-m-toolbar-delete-dimmed-white"
                 onClicked: {
                     deleteCurrentItem()
                     restartTimer()
                 }
             },
-            ToolIcon {
+            CameraToolIcon {
                 iconId: "icon-m-toolbar-view-menu-white"
                 onClicked: {
                     menu.open()
@@ -150,7 +147,7 @@ Item {
         ]
     }
 
-    QueryDialog {
+    CameraQueryDialog {
         id: deleteDialog
         titleText: qsTr("Delete item?");
         acceptButtonText: qsTr("Yes");
@@ -171,22 +168,22 @@ Item {
         }
     }
 
-    Menu {
+    CameraMenu {
         id: menu
         onStatusChanged: restartTimer()
 
-        MenuLayout {
-            MenuItem {
+        actions: [
+            CameraMenuAction {
                 text: qsTr("Captures in gallery")
                 onClicked: launchGallery()
-            }
-
-            MenuItem {
+            },
+            CameraMenuAction {
+                // TODO: this is not working...
                 text: qsTr("View in gallery")
                 enabled: available
                 onClicked: showInGallery()
             }
-        }
+        ]
     }
 
     Rectangle {
@@ -212,7 +209,7 @@ Item {
             x: 20
             height: parent.height
 
-            Label {
+            CameraLabel {
                 text: view.currentItem ? view.currentItem.itemData.title : ""
                 width: parent.width / 2
                 height: parent.height
@@ -221,7 +218,7 @@ Item {
                 horizontalAlignment: Text.AlignLeft
             }
 
-            Label {
+            CameraLabel {
                 text: view.currentItem ? view.currentItem.itemData.created : ""
                 width: parent.width / 2
                 height: parent.height
index 52a32f3..4850bd2 100644 (file)
@@ -21,7 +21,6 @@
  */
 
 @IMPORT_QT_QUICK@
-import com.nokia.meego 1.1
 import QtCamera 1.0
 
 Image {
index 8ab644c..4bd5cb7 100644 (file)
@@ -21,7 +21,6 @@
  */
 
 @IMPORT_QT_QUICK@
-import com.nokia.meego 1.1
 
 Rectangle {
     property int duration
@@ -48,7 +47,7 @@ Rectangle {
         sourceSize.height: 20
     }
 
-    Label {
+    CameraLabel {
         function formatDuration(dur) {
             var secs = parseInt(recordingDuration.duration)
             var minutes = Math.floor(secs / 60)
index 51f6ee3..0fc9e47 100644 (file)
@@ -21,7 +21,6 @@
  */
 
 @IMPORT_QT_QUICK@
-import com.nokia.meego 1.1
 
 Row {
     id: root
@@ -34,7 +33,7 @@ Row {
 
     property alias text: label.text
 
-    Label {
+    CameraLabel {
         id: label
         verticalAlignment: Text.AlignVCenter
     }
index 471a099..845b489 100644 (file)
@@ -21,7 +21,6 @@
  */
 
 @IMPORT_QT_QUICK@
-import com.nokia.meego 1.0
 
 Rectangle {
     id: standby
@@ -51,7 +50,7 @@ Rectangle {
         anchors.centerIn: parent
     }
 
-    Label {
+    CameraLabel {
         anchors.top: icon.bottom
         anchors.right: parent.right
         anchors.left: parent.left
index 74e042b..c19665d 100644 (file)
@@ -21,7 +21,6 @@
  */
 
 @IMPORT_QT_QUICK@
-import com.nokia.meego 1.1
 
 Item {
     property alias text: label.text
@@ -29,18 +28,13 @@ Item {
     width: parent.width
     height: switchComponent.height
 
-    Text {
-        property Style platformStyle: LabelStyle {}
-
+    CameraLabel {
         id: label
         anchors.left: parent.left
-        font.family: platformStyle.fontFamily
-        font.pixelSize: platformStyle.fontPixelSize
-        color: platformStyle.textColor
         wrapMode: Text.Wrap
     }
 
-    Switch {
+    CameraSwitch {
         id: switchComponent
         anchors.right: parent.right
     }
index cf864d6..46a5bb4 100644 (file)
  */
 
 @IMPORT_QT_QUICK@
-import com.nokia.meego 1.1
 import QtCamera 1.0
 import "data.js" as Data
 
-ToolIcon {
+CameraToolIcon {
     id: button
 
     iconSource: "image://theme/" + Data.cfIcon(settings.videoColorFilter)
 
     property list<Item> items: [
-        Label {
+        CameraLabel {
             height: parent ? parent.height : 0
             text: qsTr("Filter")
             verticalAlignment: Text.AlignVCenter
index b012c17..6721b4d 100644 (file)
  */
 
 @IMPORT_QT_QUICK@
-import com.nokia.meego 1.1
 import QtCamera 1.0
 
-ToolIcon {
+CameraToolIcon {
     id: button
 
     iconSource: settings.videoEvComp == 0 ? "image://theme/icon-m-camera-manual-exposure" : ""
 
-    Label {
+    CameraLabel {
         anchors.fill: parent
         verticalAlignment: Text.AlignVCenter
         visible: settings.videoEvComp != 0
@@ -37,12 +36,12 @@ ToolIcon {
     }
 
     property list<Item> items: [
-        Label {
+        CameraLabel {
             height: parent ? parent.height : 0
             text: qsTr("EV")
             verticalAlignment: Text.AlignVCenter
         },
-        Slider {
+        CameraSlider {
             id: slider
             width: 500
             orientation: Qt.Horizontal
index ada6812..a5728ce 100644 (file)
@@ -21,9 +21,8 @@
  */
 
 @IMPORT_QT_QUICK@
-import com.nokia.meego 1.1
 
-ToolIcon {
+CameraToolIcon {
     iconSource: settings.videoMuted ? "image://theme/icon-m-toolbar-volume-off-white-selected" :
         "image://theme/icon-m-toolbar-volume-white-selected"
     onClicked: settings.videoMuted = !settings.videoMuted
index 735833d..07e55f8 100644 (file)
@@ -21,7 +21,6 @@
  */
 
 @IMPORT_QT_QUICK@
-import com.nokia.meego 1.1
 import QtCamera 1.0
 import CameraPlus 1.0
 import "data.js" as Data
index dbe7274..2b700c0 100644 (file)
@@ -21,7 +21,6 @@
  */
 
 @IMPORT_QT_QUICK@
-import com.nokia.meego 1.1
 import CameraPlus 1.0
 import QtCamera 1.0
 import QtCameraExtras 1.0
@@ -105,19 +104,17 @@ Item {
         }
 
         items: [
-            ToolIcon {
+            CameraToolIcon {
                 iconId: "icon-m-toolbar-mediacontrol-stop-white"
                 onClicked: video.stop()
             },
-            Slider {
+            CameraSlider {
                 id: slider
                 height: toolBar.height
                 anchors.verticalCenter: parent.verticalCenter
 
-                platformStyle: SliderStyle {
-                    handleBackground: ""
-                    handleBackgroundPressed: ""
-                }
+                handleBackground: ""
+                handleBackgroundPressed: ""
 
                 minimumValue: 0
                 maximumValue: video.duration
@@ -132,7 +129,7 @@ Item {
                     hideTimer.restart()
                 }
             },
-            ToolIcon {
+            CameraToolIcon {
                 id: control
                 iconId: !video.paused ? "icon-m-toolbar-mediacontrol-pause-white"
                     : "icon-m-toolbar-mediacontrol-play-white"
index 718ee7d..9be1a10 100644 (file)
@@ -21,7 +21,6 @@
  */
 
 @IMPORT_QT_QUICK@
-import com.nokia.meego 1.1
 
 Column {
     spacing: 10
@@ -30,7 +29,7 @@ Column {
         text: qsTr("Resolution")
     }
 
-    ButtonRow {
+    CameraButtonRow {
         width: parent.width
         enabled: cam.idle
         exclusive: false
@@ -40,7 +39,7 @@ Column {
 
             model: videoSettings.resolutions
 
-            delegate: Button {
+            delegate: CameraButton {
                 font.capitalization: Font.Capitalize
                 text: qsTr("%1 %2").arg(resolutionName).arg(resolution)
                 checked: settings.videoResolution == resolutionName
index 96e6fd1..4d59a24 100644 (file)
  */
 
 @IMPORT_QT_QUICK@
-import com.nokia.meego 1.1
 import QtCamera 1.0
 import "data.js" as Data
 
-ToolIcon {
+CameraToolIcon {
     id: button
 
     iconSource: "image://theme/" + Data.vsmIcon(settings.videoSceneMode)
 
     property list<Item> items: [
-        Label {
+        CameraLabel {
             height: parent ? parent.height : 0
             text: qsTr("Scene")
             verticalAlignment: Text.AlignVCenter
index e0f90fd..7df57e0 100644 (file)
@@ -21,7 +21,6 @@
  */
 
 @IMPORT_QT_QUICK@
-import com.nokia.meego 1.1
 import QtCamera 1.0
 
 Flickable {
@@ -34,7 +33,7 @@ Flickable {
         width: parent.width
         spacing: 10
 
-        Label {
+        CameraLabel {
             font.pixelSize: 36
             text: qsTr("Video settings")
         }
index e813ac6..05d8290 100644 (file)
  */
 
 @IMPORT_QT_QUICK@
-import com.nokia.meego 1.1
 import QtCamera 1.0
 
-ToolIcon {
+CameraToolIcon {
     id: button
     property Camera camera: null
 
index 353619b..d5e73d3 100644 (file)
  */
 
 @IMPORT_QT_QUICK@
-import com.nokia.meego 1.1
 import QtCamera 1.0
 import "data.js" as Data
 
-ToolIcon {
+CameraToolIcon {
     id: button
 
     iconSource: "image://theme/" + Data.wbIcon(settings.videoWhiteBalance)
 
     property list<Item> items: [
-        Label {
+        CameraLabel {
             height: parent ? parent.height : 0
             text: qsTr("WB")
             verticalAlignment: Text.AlignVCenter
index ed10da3..54ef205 100644 (file)
@@ -21,7 +21,6 @@
  */
 
 @IMPORT_QT_QUICK@
-import com.nokia.meego 1.1
 import CameraPlus 1.0
 
 Item {
index b85966a..25fc786 100644 (file)
@@ -21,7 +21,6 @@
  */
 
 @IMPORT_QT_QUICK@
-import com.nokia.meego 1.1
 import CameraPlus 1.0
 
 MouseArea {
@@ -54,7 +53,7 @@ MouseArea {
             PropertyAnimation { duration: 100; }
         }
 
-        Label {
+        CameraLabel {
             id: label
             anchors.verticalCenter: parent.verticalCenter
             width: parent.width
index 13609f0..92fd688 100644 (file)
  */
 
 @IMPORT_QT_QUICK@
-import com.nokia.meego 1.1
 import QtCamera 1.0
 
-Slider {
+CameraSlider {
     id: slider
     property Camera camera: null
 
-    platformStyle: SliderStyle {
-        handleBackground: ""
-        handleBackgroundPressed: ""
-    }
+    handleBackground: ""
+    handleBackgroundPressed: ""
 
     Binding {
         target: camera ? camera.zoom : null
diff --git a/qml/harmattan/CameraButton.qml b/qml/harmattan/CameraButton.qml
new file mode 100644 (file)
index 0000000..10d140f
--- /dev/null
@@ -0,0 +1,28 @@
+// -*- qml -*-
+
+/*!
+ * This file is part of CameraPlus.
+ *
+ * Copyright (C) 2012-2013 Mohammed Sameer <msameer@foolab.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+import QtQuick 1.1
+import com.nokia.meego 1.1
+
+Button {
+
+}
diff --git a/qml/harmattan/CameraButtonRow.qml b/qml/harmattan/CameraButtonRow.qml
new file mode 100644 (file)
index 0000000..dd48ca6
--- /dev/null
@@ -0,0 +1,28 @@
+// -*- qml -*-
+
+/*!
+ * This file is part of CameraPlus.
+ *
+ * Copyright (C) 2012-2013 Mohammed Sameer <msameer@foolab.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+import QtQuick 1.1
+import com.nokia.meego 1.1
+
+ButtonRow {
+
+}
diff --git a/qml/harmattan/CameraButtonStyle.qml b/qml/harmattan/CameraButtonStyle.qml
new file mode 100644 (file)
index 0000000..ce0d9e7
--- /dev/null
@@ -0,0 +1,27 @@
+// -*- qml -*-
+
+/*!
+ * This file is part of CameraPlus.
+ *
+ * Copyright (C) 2012-2013 Mohammed Sameer <msameer@foolab.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+import QtQuick 1.1
+import com.nokia.meego 1.1
+
+ButtonStyle {
+}
diff --git a/qml/harmattan/CameraInfoBanner.qml b/qml/harmattan/CameraInfoBanner.qml
new file mode 100644 (file)
index 0000000..bb16045
--- /dev/null
@@ -0,0 +1,27 @@
+// -*- qml -*-
+
+/*!
+ * This file is part of CameraPlus.
+ *
+ * Copyright (C) 2012-2013 Mohammed Sameer <msameer@foolab.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+import QtQuick 1.1
+import com.nokia.extras 1.1
+
+InfoBanner {
+}
diff --git a/qml/harmattan/CameraLabel.qml b/qml/harmattan/CameraLabel.qml
new file mode 100644 (file)
index 0000000..452ea74
--- /dev/null
@@ -0,0 +1,28 @@
+// -*- qml -*-
+
+/*!
+ * This file is part of CameraPlus.
+ *
+ * Copyright (C) 2012-2013 Mohammed Sameer <msameer@foolab.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+import QtQuick 1.1
+import com.nokia.meego 1.1
+
+Label {
+
+}
diff --git a/qml/harmattan/CameraMenu.qml b/qml/harmattan/CameraMenu.qml
new file mode 100644 (file)
index 0000000..ec8afd0
--- /dev/null
@@ -0,0 +1,44 @@
+// -*- qml -*-
+
+/*!
+ * This file is part of CameraPlus.
+ *
+ * Copyright (C) 2012-2013 Mohammed Sameer <msameer@foolab.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+import QtQuick 1.1
+import com.nokia.meego 1.1
+
+Menu {
+    id: menu
+
+    property bool isOpen: status == DialogStatus.Open
+    property bool isOpening: status == DialogStatus.Opening
+
+    property list<CameraMenuAction> actions
+
+    MenuLayout {
+        Repeater {
+            model: menu.actions
+            delegate: MenuItem {
+                text: modelData.text
+                enabled: modelData.enabled
+                onClicked: modelData.clicked()
+            }
+        }
+    }
+}
diff --git a/qml/harmattan/CameraMenuAction.qml b/qml/harmattan/CameraMenuAction.qml
new file mode 100644 (file)
index 0000000..a7d32ad
--- /dev/null
@@ -0,0 +1,30 @@
+// -*- qml -*-
+
+/*!
+ * This file is part of CameraPlus.
+ *
+ * Copyright (C) 2012-2013 Mohammed Sameer <msameer@foolab.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+import QtQuick 1.1
+import com.nokia.meego 1.1
+
+QtObject {
+    property string text
+    property bool enabled: true
+    signal clicked
+}
diff --git a/qml/harmattan/CameraQueryDialog.qml b/qml/harmattan/CameraQueryDialog.qml
new file mode 100644 (file)
index 0000000..b15eece
--- /dev/null
@@ -0,0 +1,29 @@
+// -*- qml -*-
+
+/*!
+ * This file is part of CameraPlus.
+ *
+ * Copyright (C) 2012-2013 Mohammed Sameer <msameer@foolab.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+import QtQuick 1.1
+import com.nokia.meego 1.1
+
+QueryDialog {
+    property bool isOpen: status == DialogStatus.Open
+    property bool isOpening: status == DialogStatus.Opening
+}
diff --git a/qml/harmattan/CameraSlider.qml b/qml/harmattan/CameraSlider.qml
new file mode 100644 (file)
index 0000000..9b66b11
--- /dev/null
@@ -0,0 +1,35 @@
+// -*- qml -*-
+
+/*!
+ * This file is part of CameraPlus.
+ *
+ * Copyright (C) 2012-2013 Mohammed Sameer <msameer@foolab.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+import QtQuick 1.1
+import com.nokia.meego 1.1
+
+Slider {
+    property alias handleBackground: sliderStyle.handleBackground
+    property alias handleBackgroundPressed: sliderStyle.handleBackgroundPressed
+
+    SliderStyle {
+        id: sliderStyle
+    }
+
+    platformStyle: sliderStyle
+}
diff --git a/qml/harmattan/CameraSwitch.qml b/qml/harmattan/CameraSwitch.qml
new file mode 100644 (file)
index 0000000..b11ab09
--- /dev/null
@@ -0,0 +1,28 @@
+// -*- qml -*-
+
+/*!
+ * This file is part of CameraPlus.
+ *
+ * Copyright (C) 2012-2013 Mohammed Sameer <msameer@foolab.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+import QtQuick 1.1
+import com.nokia.meego 1.1
+
+Switch {
+
+}
diff --git a/qml/harmattan/CameraTextField.qml b/qml/harmattan/CameraTextField.qml
new file mode 100644 (file)
index 0000000..e8e6caf
--- /dev/null
@@ -0,0 +1,28 @@
+// -*- qml -*-
+
+/*!
+ * This file is part of CameraPlus.
+ *
+ * Copyright (C) 2012-2013 Mohammed Sameer <msameer@foolab.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+import QtQuick 1.1
+import com.nokia.meego 1.1
+
+TextField {
+
+}
diff --git a/qml/harmattan/CameraToolIcon.qml b/qml/harmattan/CameraToolIcon.qml
new file mode 100644 (file)
index 0000000..1385924
--- /dev/null
@@ -0,0 +1,28 @@
+// -*- qml -*-
+
+/*!
+ * This file is part of CameraPlus.
+ *
+ * Copyright (C) 2012-2013 Mohammed Sameer <msameer@foolab.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+import QtQuick 1.1
+import com.nokia.meego 1.1
+
+ToolIcon {
+
+}
diff --git a/qml/harmattan/CameraWindow.qml b/qml/harmattan/CameraWindow.qml
new file mode 100644 (file)
index 0000000..b1e513d
--- /dev/null
@@ -0,0 +1,31 @@
+// -*- qml -*-
+
+/*!
+ * This file is part of CameraPlus.
+ *
+ * Copyright (C) 2012-2013 Mohammed Sameer <msameer@foolab.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+import QtQuick 1.1
+import com.nokia.meego 1.1
+
+Window {
+    Component.onCompleted: {
+        screen.setAllowedOrientations(Screen.Landscape)
+        theme.inverted = true
+    }
+}
diff --git a/qml/harmattan/harmattan.qrc b/qml/harmattan/harmattan.qrc
new file mode 100644 (file)
index 0000000..ad84166
--- /dev/null
@@ -0,0 +1,18 @@
+<!DOCTYPE RCC>
+<RCC version="1.0">
+    <qresource prefix="/qml">
+       <file>CameraLabel.qml</file>
+       <file>CameraTextField.qml</file>
+       <file>CameraToolIcon.qml</file>
+       <file>CameraButton.qml</file>
+       <file>CameraSlider.qml</file>
+       <file>CameraSwitch.qml</file>
+       <file>CameraButtonRow.qml</file>
+       <file>CameraQueryDialog.qml</file>
+       <file>CameraWindow.qml</file>
+       <file>CameraInfoBanner.qml</file>
+       <file>CameraButtonStyle.qml</file>
+       <file>CameraMenu.qml</file>
+       <file>CameraMenuAction.qml</file>
+    </qresource>
+</RCC>
index e3dce6c..efae4d4 100644 (file)
  */
 
 @IMPORT_QT_QUICK@
-import com.nokia.meego 1.1
-import com.nokia.extras 1.1
 import QtCamera 1.0
 import CameraPlus 1.0
 import QtMobility.location 1.2
 
 // TODO: flash not ready (battery low or flash not ready message)
 
-Window {
+CameraWindow {
     id: root
     property alias camera: cam
 
@@ -67,8 +65,6 @@ Window {
     }
 
     Component.onCompleted: {
-        screen.setAllowedOrientations(Screen.Landscape)
-        theme.inverted = true
         platformSettings.init()        
         // TODO: hardcoding device id
         root.resetCamera(0, settings.mode)
@@ -101,16 +97,6 @@ Window {
 
     property alias dimmer: camDimmer
 
-    PageStack {
-        id: pageStack
-        anchors.fill: parent
-    }
-
-    MouseArea {
-        anchors.fill: parent
-        enabled: pageStack.busy
-    }
-
     PositionSource {
         // NOTE: The source will not reset the position when we lose the signal.
         // This shouldn't be a big problem as we are course enough.
@@ -169,7 +155,7 @@ Window {
         id: fileSystem
     }
 
-    InfoBanner {
+    CameraInfoBanner {
         id: error
     }
 
index 036e8d8..e082679 100644 (file)
@@ -31,5 +31,11 @@ contains(CONFIG, qmljsdebug) {
     include(../qmljsdebugger/qmljsdebugger-src.pri)
 }
 
+contains(MEEGO_EDITION, "harmattan") {
+    message("Building for harmattan")
+    DEFINES += HARMATTAN
+    RESOURCES += ../qml/harmattan/harmattan.qrc
+}
+
 target.path = /usr/bin/
 INSTALLS += target