populate post capture model when page is current and clear it when we leave
[harmattan/cameraplus] / lib / qtcamautofocus.cpp
index c91c1fc..7e07b55 100644 (file)
@@ -1,7 +1,7 @@
 /*!
  * This file is part of CameraPlus.
  *
- * Copyright (C) 2012 Mohammed Sameer <msameer@foolab.org>
+ * 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
@@ -46,3 +46,11 @@ bool QtCamAutoFocus::startAutoFocus() {
 bool QtCamAutoFocus::stopAutoFocus() {
   return d_ptr->setEnabled(false);
 }
+
+bool QtCamAutoFocus::canFocus(const QtCamScene::SceneMode& mode) {
+  if (mode == QtCamScene::Landscape || mode == QtCamScene::Sport) {
+    return false;
+  }
+
+  return true;
+}