Use a Component for initializing VideoSettingsDialog in order to decrease startup...
[harmattan/cameraplus] / qml / CameraPage.qml
index 0b16370..43da9c4 100644 (file)
@@ -24,12 +24,10 @@ import QtQuick 1.1
 import com.nokia.meego 1.1
 import QtCamera 1.0
 import CameraPlus 1.0
-import QtMobility.systeminfo 1.2
 
 Page {
         id: page
 
-        property bool needsPipeline: true
         property int policyMode: CameraResources.None
 
         property Camera cam: null
@@ -59,7 +57,7 @@ Page {
                         cam.renderingEnabled = true;
                 }
                 else if (status == PageStatus.Active) {
-                        focusReticle.setRegionOfInterest();
+                        focusReticle.resetReticle();
 
                         if (!enableViewfinder) {
                                 cam.renderingEnabled = false;
@@ -95,37 +93,4 @@ Page {
         function checkDiskSpace() {
                 return fileSystem.hasFreeSpace(fileNaming.path);
         }
-
-        function checkBattery() {
-                // We are fine if we are connected to the charger:
-                if (batteryMonitor.chargingState == BatteryInfo.Charging) {
-                        return true;
-                }
-
-                // If we have enough battery then we are fine:
-                if (batteryMonitor.batteryStatus > BatteryInfo.BatteryCritical) {
-                        return true;
-                }
-
-                return false;
-        }
-
-        BatteryInfo {
-                // TODO: replace this
-                id: batteryMonitor
-                monitorChargingStateChanges: cam.running
-                monitorBatteryStatusChanges: cam.running
-
-                onChargingStateChanged: {
-                        if (!checkBattery()) {
-                                parent.batteryLow();
-                        }
-                }
-
-                onBatteryStatusChanged:  {
-                        if (!checkBattery()) {
-                                parent.batteryLow();
-                        }
-                }
-        }
 }