4 * This file is part of CameraPlus.
6 * Copyright (C) 2012-2013 Mohammed Sameer <msameer@foolab.org>
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
27 property string standbyIcon: "image://theme/icon-l-camera-standby"
29 property string gpsIndicatorIcon: "image://theme/icon-m-camera-location"
30 property string faceDetectionIndicatorIcon: "image://theme/icon-m-camera-face-detection-screen"
32 property string recordingDurationIcon: "image://theme/icon-m-camera-ongoing-recording"
33 property string cameraTorchOnIconId: "icon-m-camera-torch-on"
34 property string cameraTorchOffIconId: "icon-m-camera-torch-off"
35 property string soundMuteOnIconId: "icon-m-toolbar-volume-off-white-selected"
36 property string soundMuteOffIconId: "icon-m-toolbar-volume-white-selected"
37 property string videoStopIconId: "icon-m-toolbar-mediacontrol-stop-white"
38 property string videoPauseIconId: "icon-m-toolbar-mediacontrol-pause-white"
39 property string videoPlayIconId: "icon-m-toolbar-mediacontrol-play-white"
40 property string cameraManualExposureIconId: "icon-m-camera-manual-exposure"
41 property string cameraVideoIconId: "icon-m-camera-video"
42 property string cameraImageIconId: "icon-m-viewfinder-camera"
43 property string captureButtonImageIconId: "icon-m-camera-shutter"
44 property string captureButtonVideoIconId: "icon-m-camera-video-record"
45 property string captureButtonRecordingIconId: "icon-m-camera-video-record"
46 property string cameraToolBarMenuIcon: "icon-m-toolbar-back-white"
47 property string deleteIconId: "icon-m-toolbar-delete-white"
48 property string shareIconId: "icon-m-toolbar-share-white"
49 property string favoriteMarkIconId: "icon-m-toolbar-favorite-mark-white"
50 property string favoriteUnmarkIconId: "icon-m-toolbar-favorite-unmark-white"
51 property string galleryIconId: "icon-m-camera-roll"
53 property string flashAutoIconId: "icon-m-camera-flash-auto"
54 property string flashOnIconId: "icon-m-camera-flash-always"
55 property string flashOffIconId: "icon-m-camera-flash-off"
56 property string flashRedEyeIconId: "icon-m-camera-flash-red-eye"
58 property string whiteBalanceAutoIconId: "icon-m-camera-whitebalance-auto"
59 property string whiteBalanceSunsetIconId: "icon-m-camera-whitebalance-sunny"
60 property string whiteBalanceCloudyIconId: "icon-m-camera-whitebalance-cloudy"
61 property string whiteBalanceFlourescentIconId: "icon-m-camera-whitebalance-fluorescent"
62 property string whiteBalanceTungstenIconId: "icon-m-camera-whitebalance-tungsten"
64 property string colorFilterNormalIconId: "icon-m-camera-no-filter"
65 property string colorFilterGrayScaleIconId: "icon-m-camera-filter-black-white"
66 property string colorFilterSepiaIconId: "icon-m-camera-filter-sepia"
67 property string colorFilterVividIconId: "icon-m-camera-filter-vivid"
68 property string colorFilterNegativeIconId: "icon-m-camera-filter-negative"
69 property string colorFilterSolarizeIconId: "icon-m-camera-filter-solarize"
71 property string imageSceneModeAutoIconId: "icon-m-camera-scene-auto"
72 property string imageSceneModeCloseupIconId: "icon-m-camera-scene-macro"
73 property string imageSceneModeLandscapeIconId: "icon-m-camera-scene-landscape"
74 property string imageSceneModePortraitIconId: "icon-m-camera-scene-portrait"
75 property string imageSceneModeNightIconId: "icon-m-camera-night"
76 property string imageSceneModeSportIconId: "icon-m-camera-scene-sports"
78 property string videoSceneModeAutoIconId: "icon-m-camera-scene-auto"
79 property string videoSceneModeNightIconId: "icon-m-camera-video-night"
81 property string isoAudoIconId: "icon-m-camera-iso-auto"
82 property string iso100IconId: "icon-m-camera-iso-100"
83 property string iso200IconId: "icon-m-camera-iso-200"
84 property string iso400IconId: "icon-m-camera-iso-400"
85 property string iso800IconId: "icon-m-camera-iso-800"
87 function videoIcon(ratio, res, device) {
89 return "icon-m-camera-video-high-resolution"
90 } else if (res == "medium") {
91 return "icon-m-camera-video-fine-resolution"
92 } else if (res == "low") {
93 return "icon-m-camera-video-low-resolution"
99 property variant __imageData: [
100 ["3:2", "low", "icon-m-camera-resolution-3m"],
101 ["3:2", "medium", "icon-m-camera-resolution-6m"],
102 ["3:2", "high", "icon-m-camera-resolution-7m"],
103 ["4:3", "low", "icon-m-camera-resolution-3m"],
104 ["4:3", "medium", "icon-m-camera-resolution-6m"],
105 ["4:3", "high", "icon-m-camera-resolution-8m"],
106 ["16:9", "low", "icon-m-camera-resolution-3m"],
107 ["16:9", "medium", "icon-m-camera-resolution-6m"],
108 ["16:9", "high", "icon-m-camera-resolution-7m"]
111 function imageIcon(ratio, res, device) {
113 var len = __imageData.length
114 for (x = 0; x < len; x++) {
115 if (__imageData[x][0] == ratio && __imageData[x][1] == res) {
116 return __imageData[x][2]
123 function whiteBalanceIcon(val) {
125 case WhiteBalance.Auto:
126 return whiteBalanceAutoIconId
127 case WhiteBalance.Sunset:
128 return whiteBalanceSunsetIconId
129 case WhiteBalance.Cloudy:
130 return whiteBalanceCloudyIconId
131 case WhiteBalance.Flourescent:
132 return whiteBalanceFlourescentIconId
133 case WhiteBalance.Tungsten:
134 return whiteBalanceTungstenIconId
140 function colorFilterIcon(val) {
142 case ColorTone.Normal:
143 return colorFilterNormalIconId
144 case ColorTone.GrayScale:
145 return colorFilterGrayScaleIconId
146 case ColorTone.Sepia:
147 return colorFilterSepiaIconId
148 case ColorTone.Vivid:
149 return colorFilterVividIconId
150 case ColorTone.Negative:
151 return colorFilterNegativeIconId
152 case ColorTone.Solarize:
153 return colorFilterSolarizeIconId
159 function imageSceneModeIcon(val) {
162 return imageSceneModeAutoIconId
164 return imageSceneModeCloseupIconId
165 case Scene.Landscape:
166 return imageSceneModeLandscapeIconId
168 return imageSceneModePortraitIconId
170 return imageSceneModeNightIconId
172 return imageSceneModeSportIconId
178 function videoSceneModeIcon(val) {
181 return videoSceneModeAutoIconId
183 return videoSceneModeNightIconId
189 function flashIcon(val) {
192 return flashAutoIconId
196 return flashOffIconId
198 return flashRedEyeIconId
204 function isoIcon(val) {
221 function flashIndicatorIcon(val) {
222 return flashIcon(val) + "-screen"
225 function whiteBalanceIndicatorIcon(val) {
226 if (val == WhiteBalance.Auto) {
229 return whiteBalanceIcon(val) + "-screen"
233 function colorFilterIndicatorIcon(val) {
234 if (val == ColorTone.Normal) {
237 return colorFilterIcon(val) + "-screen"
241 function imageSceneModeIndicatorIcon(val) {
242 if (val == Scene.Auto) {
245 return imageSceneModeIcon(val) + "-screen"
249 function videoSceneModeIndicatorIcon(val) {
250 if (val == Scene.Auto) {
253 return videoSceneModeIcon(val) + "-screen"