camerauis/cameraxui/cxui/src/cxuisettingsinfo.cpp
changeset 28 3075d9b614e6
parent 19 d9aefe59d544
child 29 699651f2666f
child 43 0e652f8f1fbd
equal deleted inserted replaced
19:d9aefe59d544 28:3075d9b614e6
    69         mHeading = other.mHeading;
    69         mHeading = other.mHeading;
    70         mSettingId = other.mSettingId;
    70         mSettingId = other.mSettingId;
    71         mHeadingIcon = other.mHeadingIcon;
    71         mHeadingIcon = other.mHeadingIcon;
    72         mSettingStrings = other.mSettingStrings;
    72         mSettingStrings = other.mSettingStrings;
    73         mRange = other.mRange;
    73         mRange = other.mRange;
    74         mStep = other.mStep;
    74         mMinorStep = other.mMinorStep;
       
    75         mMajorStep = other.mMajorStep;
    75         }
    76         }
    76     CX_DEBUG_EXIT_FUNCTION();
    77     CX_DEBUG_EXIT_FUNCTION();
    77     return *this;
    78     return *this;
    78 }
    79 }
    79 
    80 
   207 
   208 
   208     int index = 0;
   209     int index = 0;
   209 
   210 
   210     // get the localized possible strings for each image quality setting
   211     // get the localized possible strings for each image quality setting
   211     QString vga = hbTrId("txt_cam_dblist_vga");
   212     QString vga = hbTrId("txt_cam_dblist_vga");
   212     QString normal = QString("%L1 Mpix");
   213     QString normal = hbTrId("txt_cam_dblist_ln_mpix");
   213     QString imagesLeft = QString("%L1 images left");
   214     QString imagesLeft = hbTrId("txt_cam_dblist_hd_720p_val_ln_images_left");
   214     QString widescreen = QString("%L1 Mpix widescreen");
   215     QString widescreen = hbTrId("txt_cam_dblist_ln_mpix_widescreen");
   215 
   216 
   216     foreach(CxeImageDetails quality, list) {
   217     foreach(CxeImageDetails quality, list) {
   217         // mapping the right value for each quality
   218         // mapping the right value for each quality
   218         QString index2String;
       
   219         index2String.setNum(index);
       
   220 
   219 
   221         QString settingString;
   220         QString settingString;
   222         QString qualityIcon = "";
   221         QString qualityIcon = "";
   223 
   222 
   224         if (quality.mWidth == KResVGA.width() && quality.mHeight == KResVGA.height()) {
   223         if (quality.mWidth == KResVGA.width() && quality.mHeight == KResVGA.height()) {
   243         } else if (quality.mMpxCount == "3") {
   242         } else if (quality.mMpxCount == "3") {
   244             qualityIcon = "qtg_mono_3mp";
   243             qualityIcon = "qtg_mono_3mp";
   245         } else if (quality.mMpxCount == "1.2") {
   244         } else if (quality.mMpxCount == "1.2") {
   246             qualityIcon = "qtg_mono_1_3mp";
   245             qualityIcon = "qtg_mono_1_3mp";
   247         } else if (quality.mMpxCount == "0.3") {
   246         } else if (quality.mMpxCount == "0.3") {
   248             qualityIcon = "qtg_mono_qcif"; //correct icon missing
   247             qualityIcon = "qtg_mono_0_3mp";
   249         }
   248         }
   250 
   249 
   251         SettingItem setting;
   250         SettingItem setting;
   252         setting.mItem = settingString;
   251         setting.mItem = settingString;
   253         setting.mValue = qVariantFromValue(index2String);
   252         setting.mValue = index;
   254         setting.mIcon = qualityIcon;
   253         setting.mIcon = qualityIcon;
   255         settings.mSettingPairList.append(setting);
   254         settings.mSettingPairList.append(setting);
   256 
   255 
   257         index++;
   256         index++;
   258     }
   257     }
   275                 mEngine->videoCaptureControl().supportedVideoQualities();
   274                 mEngine->videoCaptureControl().supportedVideoQualities();
   276 
   275 
   277     int index = 0;
   276     int index = 0;
   278 
   277 
   279     // get the localized possible strings for each video quality setting
   278     // get the localized possible strings for each video quality setting
   280     QString timeleft = QString("%L1 recording time left");
   279     QString timeleft = hbTrId("txt_cam_dblist_hd_720p_val_ln_recording_time_left");
   281     QString hdString = hbTrId("txt_cam_dblist_hd_720p_169_widescreen");
   280     QString hdString = hbTrId("txt_cam_dblist_hd_720p_169_widescreen");
   282     QString vga = hbTrId("txt_cam_dblist_vga_43");
   281     QString vga = hbTrId("txt_cam_dblist_vga_43");
   283     QString wideVga = hbTrId("txt_cam_dblist_vga_169_widescreen"); //VGA 16:9 widescreen
   282     QString wideVga = hbTrId("txt_cam_dblist_vga_169_widescreen"); //VGA 16:9 widescreen
   284     QString sharing = hbTrId("txt_cam_dblist_qcif_sharing");
   283     QString sharing = hbTrId("txt_cam_dblist_qcif_sharing");
   285 
   284 
   286     foreach(CxeVideoDetails quality, list) {
   285     foreach(CxeVideoDetails quality, list) {
   287         // mapping the right value for each quality
   286         // mapping the right value for each quality
   288         QString index2String;
       
   289         index2String.setNum(index);
       
   290 
   287 
   291         QString settingString = "";
   288         QString settingString = "";
   292         QString time = "";
   289         QString time = "";
   293         QString qualityIcon = "";
   290         QString qualityIcon = "";
   294 
   291 
   305             settingString.append(sharing);
   302             settingString.append(sharing);
   306             qualityIcon = "qtg_mono_qcif";
   303             qualityIcon = "qtg_mono_qcif";
   307         } else if (quality.mWidth == KResWideVGA.width() &&
   304         } else if (quality.mWidth == KResWideVGA.width() &&
   308                   quality.mHeight == KResWideVGA.height()) {
   305                   quality.mHeight == KResWideVGA.height()) {
   309             settingString.append(wideVga);
   306             settingString.append(wideVga);
   310             qualityIcon = "qtg_mono_12mp"; //correct icon missing
   307             qualityIcon = "qtg_mono_vga_wide";
   311         }
   308         }
   312 
   309 
   313         settingString.append(",");
   310         settingString.append(",");
   314         time.sprintf("%02d:%02d", quality.mRemainingTime / 60, quality.mRemainingTime % 60);
   311         time.sprintf("%02d:%02d", quality.mRemainingTime / 60, quality.mRemainingTime % 60);
   315         settingString.append(timeleft.arg(time));
   312         settingString.append(timeleft.arg(time));
   317 
   314 
   318 
   315 
   319         CX_DEBUG(( "video quality setting string: %s", settingString.toAscii().constData()));
   316         CX_DEBUG(( "video quality setting string: %s", settingString.toAscii().constData()));
   320         SettingItem setting;
   317         SettingItem setting;
   321         setting.mItem = settingString;
   318         setting.mItem = settingString;
   322         setting.mValue = qVariantFromValue(index2String);
   319         setting.mValue = index;
   323         setting.mIcon = qualityIcon;
   320         setting.mIcon = qualityIcon;
   324         settings.mSettingPairList.append(setting);
   321         settings.mSettingPairList.append(setting);
   325 
   322 
   326         index++;
   323         index++;
   327     }
   324     }