Changeset 76058 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Dec 7, 2018 1:52:59 PM (6 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackend.h
r76044 r76058 261 261 template<> SHARED_LIBRARY_STUFF UIMediumFormat fromInternalString<UIMediumFormat>(const QString &strUIMediumFormat); 262 262 template<> SHARED_LIBRARY_STUFF QString toString(const UISettingsDefs::RecordingMode &enmRecordingMode); 263 template<> SHARED_LIBRARY_STUFF QString toInternalString(const UISettingsDefs::RecordingMode &enmRecordingMode); 264 template<> SHARED_LIBRARY_STUFF UISettingsDefs::RecordingMode fromInternalString<UISettingsDefs::RecordingMode>(const QString &enmRecordingMode); 263 template<> SHARED_LIBRARY_STUFF UISettingsDefs::RecordingMode fromString<UISettingsDefs::RecordingMode>(const QString &enmRecordingMode); 265 264 266 265 -
trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendGlobal.cpp
r76044 r76058 2522 2522 } 2523 2523 2524 /* QString <= UISettingsDefs::RecordingMode: */2525 template<> QString toInternalString(const UISettingsDefs::RecordingMode &enmRecordingMode)2526 {2527 QString strResult;2528 switch (enmRecordingMode)2529 {2530 case UISettingsDefs::RecordingMode_VideoAudio: strResult = "Video/Audio"; break;2531 case UISettingsDefs::RecordingMode_VideoOnly: strResult = "VideoOnly"; break;2532 case UISettingsDefs::RecordingMode_AudioOnly: strResult = "AudioOnly"; break;2533 default:2534 {2535 AssertMsgFailed(("No text for recording mode=%d", enmRecordingMode));2536 break;2537 }2538 }2539 return strResult;2540 }2541 2542 2524 /* UISettingsDefs::RecordingMode <= QString: */ 2543 template<> UISettingsDefs::RecordingMode from InternalString<UISettingsDefs::RecordingMode>(const QString &strRecordingMode)2525 template<> UISettingsDefs::RecordingMode fromString<UISettingsDefs::RecordingMode>(const QString &strRecordingMode) 2544 2526 { 2545 2527 /* Here we have some fancy stuff allowing us … … 2547 2529 QStringList keys; QList<UISettingsDefs::RecordingMode> values; 2548 2530 keys << "Video/Audio"; values << UISettingsDefs::RecordingMode_VideoAudio; 2549 keys << "Video Only"; values << UISettingsDefs::RecordingMode_VideoOnly;2550 keys << "Audio Only"; values << UISettingsDefs::RecordingMode_AudioOnly;2551 /* V DI formatfor unknown words: */2531 keys << "Video Only"; values << UISettingsDefs::RecordingMode_VideoOnly; 2532 keys << "Audio Only"; values << UISettingsDefs::RecordingMode_AudioOnly; 2533 /* Video/Audio for unknown words: */ 2552 2534 if (!keys.contains(strRecordingMode, Qt::CaseInsensitive)) 2553 2535 return UISettingsDefs::RecordingMode_VideoAudio; -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.cpp
r76044 r76058 511 511 512 512 /* Update recording options */ 513 UISettingsDefs::RecordingMode enmRecordingMode = 514 gpConverter->fromString<UISettingsDefs::RecordingMode>(m_pComboBoxCaptureMode->currentText()); 513 515 QStringList optionValues; 514 optionValues.push_back((m_pComboBoxCaptureMode->currentIndex() == static_cast<int>(UISettingsDefs::RecordingMode_VideoAudio) || 515 m_pComboBoxCaptureMode->currentIndex() == static_cast<int>(UISettingsDefs::RecordingMode_VideoOnly)) ? "true" : "false"); 516 optionValues.push_back((m_pComboBoxCaptureMode->currentIndex() == static_cast<int>(UISettingsDefs::RecordingMode_VideoAudio) || 517 m_pComboBoxCaptureMode->currentIndex() == static_cast<int>(UISettingsDefs::RecordingMode_AudioOnly)) ? "true" : "false"); 516 /* Option value for video recording: */ 517 optionValues.push_back((enmRecordingMode == UISettingsDefs::RecordingMode_VideoAudio) || 518 (enmRecordingMode == UISettingsDefs::RecordingMode_VideoOnly) ? "true" : "false"); 519 /* Option value for audio recording: */ 520 optionValues.push_back((enmRecordingMode == UISettingsDefs::RecordingMode_VideoAudio) || 521 (enmRecordingMode == UISettingsDefs::RecordingMode_AudioOnly) ? "true" : "false"); 522 518 523 if (m_pSliderAudioCaptureQuality->value() == 1) 519 524 optionValues.push_back("low"); … … 1727 1732 (isMachineOnline() && !m_pCache->base().m_fRecordingEnabled && m_pCheckboxVideoCapture->isChecked()); 1728 1733 1729 constUISettingsDefs::RecordingMode enmRecordingMode =1730 static_cast<UISettingsDefs::RecordingMode>(m_pComboBoxCaptureMode->currentIndex());1734 UISettingsDefs::RecordingMode enmRecordingMode = 1735 gpConverter->fromString<UISettingsDefs::RecordingMode>(m_pComboBoxCaptureMode->currentText()); 1731 1736 1732 1737 /* Video Capture Screens option should be enabled only if:
Note:
See TracChangeset
for help on using the changeset viewer.