Changeset 73560 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Aug 8, 2018 12:27:18 PM (6 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIIndicatorsPool.cpp
r72342 r73560 796 796 }; 797 797 798 /** Video-capture modes. */ 799 enum UIIndicatorStateVideoCaptureMode 800 { 801 UIIndicatorStateVideoCaptureMode_None = RT_BIT(0), 802 UIIndicatorStateVideoCaptureMode_Video = RT_BIT(1), 803 UIIndicatorStateVideoCaptureMode_Audio = RT_BIT(2) 804 }; 805 798 806 public: 799 807 … … 803 811 , m_pAnimation(0) 804 812 , m_dRotationAngle(0) 813 , m_eCaptureMode(UIIndicatorStateVideoCaptureMode_None) 805 814 { 806 815 /* Assign state-icons: */ … … 880 889 setState(UIIndicatorStateVideoCapture_Paused); 881 890 891 updateCaptureMode(); 892 882 893 /* Prepare tool-tip: */ 883 894 QString strFullData; … … 893 904 case UIIndicatorStateVideoCapture_Paused: 894 905 { 906 QString strToolTip; 907 if ( m_eCaptureMode & UIIndicatorStateVideoCaptureMode_Audio && 908 m_eCaptureMode & UIIndicatorStateVideoCaptureMode_Video) 909 strToolTip = "Video/audio capture file"; 910 else if (m_eCaptureMode & UIIndicatorStateVideoCaptureMode_Audio) 911 strToolTip = "Audio capture file"; 912 else if (m_eCaptureMode & UIIndicatorStateVideoCaptureMode_Video) 913 strToolTip = "Video capture file"; 914 895 915 strFullData += s_strTableRow2 896 .arg(QApplication::translate("UIIndicatorsPool", "Video capture file", "Video capture tooltip"))916 .arg(QApplication::translate("UIIndicatorsPool", strToolTip.toLatin1().constData(), "Video capture tooltip")) 897 917 .arg(machine.GetVideoCaptureFile()); 898 918 break; … … 915 935 void setRotationAngle(double dRotationAngle) { m_dRotationAngle = dRotationAngle; update(); } 916 936 937 /* Parses CMachine::videoCaptureOptions and updates m_eCaptureMode accordingly. */ 938 void updateCaptureMode() 939 { 940 m_eCaptureMode = UIIndicatorStateVideoCaptureMode_None; 941 942 /* Get machine: */ 943 if (!m_pSession) 944 return; 945 const CMachine machine = m_pSession->machine(); 946 if (machine.isNull()) 947 return; 948 QStringList strOptionsPairList = machine.GetVideoCaptureOptions().split(",", QString::SkipEmptyParts); 949 950 for (int i = 0; i < strOptionsPairList.size(); ++i) 951 { 952 if (strOptionsPairList.at(i).contains("vc_enabled", Qt::CaseInsensitive) && 953 strOptionsPairList.at(i).contains("true", Qt::CaseInsensitive)) 954 m_eCaptureMode = (UIIndicatorStateVideoCaptureMode)((int)m_eCaptureMode | (int)UIIndicatorStateVideoCaptureMode_Video); 955 956 if (strOptionsPairList.at(i).contains("ac_enabled", Qt::CaseInsensitive) && 957 strOptionsPairList.at(i).contains("true", Qt::CaseInsensitive)) 958 m_eCaptureMode = (UIIndicatorStateVideoCaptureMode)((int)m_eCaptureMode | (int)UIIndicatorStateVideoCaptureMode_Audio); 959 } 960 } 961 917 962 /** Holds the rotation animation instance. */ 918 963 UIAnimationLoop *m_pAnimation; 919 964 /** Holds current rotation angle. */ 920 965 double m_dRotationAngle; 966 967 UIIndicatorStateVideoCaptureMode m_eCaptureMode; 921 968 }; 922 969 … … 1504 1551 1505 1552 #include "UIIndicatorsPool.moc" 1506 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.cpp
r73201 r73560 1592 1592 fSuccess = m_machine.isOk(); 1593 1593 } 1594 /* Save video capture options: */ 1595 if (fSuccess && newDisplayData.m_strVideoCaptureOptions != oldDisplayData.m_strVideoCaptureOptions) 1596 { 1597 m_machine.SetVideoCaptureOptions(newDisplayData.m_strVideoCaptureOptions); 1598 fSuccess = m_machine.isOk(); 1599 } 1594 1600 /* Save whether video capture is enabled: */ 1595 1601 if (fSuccess && newDisplayData.m_fVideoCaptureEnabled != oldDisplayData.m_fVideoCaptureEnabled) … … 1679 1685 bool fVideoCapture = enmCaptureMode == UIDataSettingsMachineDisplay::CaptureMode_VideoOnly || 1680 1686 enmCaptureMode == UIDataSettingsMachineDisplay::CaptureMode_VideoAudio; 1687 bool fAudioCapture = enmCaptureMode == UIDataSettingsMachineDisplay::CaptureMode_AudioOnly || 1688 enmCaptureMode == UIDataSettingsMachineDisplay::CaptureMode_VideoAudio; 1681 1689 1682 1690 m_pLabelVideoCaptureSize->setEnabled(fIsVideoCaptureOptionsEnabled && fVideoCapture); … … 1694 1702 m_pScrollerVideoCaptureScreens->setEnabled(fIsVideoCaptureScreenOptionEnabled && fVideoCapture); 1695 1703 1704 m_pAudioCaptureQualityLabel->setEnabled(fIsVideoCaptureOptionsEnabled && fAudioCapture); 1705 m_pContainerSliderAudioCaptureQuality->setEnabled(fIsVideoCaptureOptionsEnabled && fAudioCapture); 1706 1696 1707 m_pLabelVideoCaptureScreens->setEnabled(fIsVideoCaptureScreenOptionEnabled && fVideoCapture); 1697 1708 m_pLabelVideoCaptureSizeHint->setEnabled(fIsVideoCaptureScreenOptionEnabled && fVideoCapture);
Note:
See TracChangeset
for help on using the changeset viewer.