VirtualBox

Changeset 46621 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Jun 18, 2013 12:13:20 PM (12 years ago)
Author:
vboxsync
Message:

FE/Qt: Machine settings: Display page: Video Capture tab: Allow to edit *screens* option while video-recording is active at runtime.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.cpp

    r46592 r46621  
    262262            if (m_cache.base().m_fVideoCaptureEnabled)
    263263            {
    264                 /* All we can do is to *disable* it: */
     264                /* We can still save the *screens* option: */
     265                m_machine.SetVideoCaptureScreens(displayData.m_screens);
     266                /* Finally we should *disable* Video Capture if necessary: */
    265267                if (!displayData.m_fVideoCaptureEnabled)
    266268                    m_machine.SetVideoCaptureEnabled(displayData.m_fVideoCaptureEnabled);
     
    535537     * 1. Machine is in 'offline' or 'saved' state and check-box is checked,
    536538     * 2. Machine is in 'online' state, check-box is checked, and video recording is *disabled* currently. */
    537     m_pContainerVideoCaptureOptions->setEnabled(((isMachineOffline() || isMachineSaved()) && m_pCheckboxVideoCapture->isChecked()) ||
    538                                                 (isMachineOnline()  && !m_cache.base().m_fVideoCaptureEnabled && m_pCheckboxVideoCapture->isChecked()));
     539    bool fIsVideoCaptureOptionsEnabled = ((isMachineOffline() || isMachineSaved()) && m_pCheckboxVideoCapture->isChecked()) ||
     540                                         (isMachineOnline() && !m_cache.base().m_fVideoCaptureEnabled && m_pCheckboxVideoCapture->isChecked());
     541
     542    /* Video Capture Screens option should be enabled only if:
     543     * Machine is in *any* valid state and check-box is checked. */
     544    bool fIsVideoCaptureScreenOptionEnabled = isMachineInValidMode() && m_pCheckboxVideoCapture->isChecked();
     545
     546    m_pLabelVideoCapturePath->setEnabled(fIsVideoCaptureOptionsEnabled);
     547    m_pEditorVideoCapturePath->setEnabled(fIsVideoCaptureOptionsEnabled);
     548
     549    m_pLabelVideoCaptureSize->setEnabled(fIsVideoCaptureOptionsEnabled);
     550    m_pComboVideoCaptureSize->setEnabled(fIsVideoCaptureOptionsEnabled);
     551    m_pEditorVideoCaptureWidth->setEnabled(fIsVideoCaptureOptionsEnabled);
     552    m_pEditorVideoCaptureHeight->setEnabled(fIsVideoCaptureOptionsEnabled);
     553
     554    m_pLabelVideoCaptureFrameRate->setEnabled(fIsVideoCaptureOptionsEnabled);
     555    m_pContainerSliderVideoCaptureFrameRate->setEnabled(fIsVideoCaptureOptionsEnabled);
     556    m_pEditorVideoCaptureFrameRate->setEnabled(fIsVideoCaptureOptionsEnabled);
     557    m_pLabelVideoCaptureFrameRateUnits->setEnabled(fIsVideoCaptureOptionsEnabled);
     558
     559    m_pLabelVideoCaptureRate->setEnabled(fIsVideoCaptureOptionsEnabled);
     560    m_pContainerSliderVideoCaptureQuality->setEnabled(fIsVideoCaptureOptionsEnabled);
     561    m_pEditorVideoCaptureBitRate->setEnabled(fIsVideoCaptureOptionsEnabled);
     562    m_pLabelVideoCaptureBitRateUnits->setEnabled(fIsVideoCaptureOptionsEnabled);
     563
     564    m_pLabelVideoCaptureScreens->setEnabled(fIsVideoCaptureScreenOptionEnabled);
     565    m_pScrollerVideoCaptureScreens->setEnabled(fIsVideoCaptureScreenOptionEnabled);
    539566}
    540567
     
    749776
    750777    /* Prepare quality combo-box: */
    751     m_pSliderLayoutVideoCaptureQuality->setColumnStretch(1, 4);
    752     m_pSliderLayoutVideoCaptureQuality->setColumnStretch(3, 5);
     778    m_pContainerLayoutSliderVideoCaptureQuality->setColumnStretch(1, 4);
     779    m_pContainerLayoutSliderVideoCaptureQuality->setColumnStretch(3, 5);
    753780    m_pSliderVideoCaptureQuality->setMinimum(1);
    754781    m_pSliderVideoCaptureQuality->setMaximum(10);
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.ui

    r46536 r46621  
    477477             </item>
    478478             <item row="2" column="1" rowspan="2">
    479               <layout class="QGridLayout" name="m_pSliderLayoutVideoCaptureFrameRate">
    480                <property name="spacing">
    481                 <number>0</number>
    482                </property>
    483                <item row="0" column="0" colspan="3">
    484                 <widget class="QIAdvancedSlider" name="m_pSliderVideoCaptureFrameRate">
    485                  <property name="whatsThis">
    486                   <string>This setting determines the maximum number of &lt;b>frames per second&lt;/b>. Frames with a higher frequency will be skipped. Reducing this value increses the number of skipped frames but reduces the file size.</string>
    487                  </property>
    488                  <property name="orientation">
    489                   <enum>Qt::Horizontal</enum>
    490                  </property>
    491                 </widget>
    492                </item>
    493                <item row="1" column="0">
    494                 <widget class="QLabel" name="m_pLabelVideoCaptureFrameRateMin"/>
    495                </item>
    496                <item row="1" column="1">
    497                 <spacer name="m_pStretchVideoCaptureFrameRate">
    498                  <property name="orientation">
    499                   <enum>Qt::Horizontal</enum>
    500                  </property>
    501                  <property name="sizeHint" stdset="0">
    502                   <size>
    503                    <width>0</width>
    504                    <height>0</height>
    505                   </size>
    506                  </property>
    507                 </spacer>
    508                </item>
    509                <item row="1" column="2">
    510                 <widget class="QLabel" name="m_pLabelVideoCaptureFrameRateMax"/>
    511                </item>
    512               </layout>
     479              <widget class="QWidget" name="m_pContainerSliderVideoCaptureFrameRate">
     480               <layout class="QGridLayout" name="m_pContainerLayoutSliderVideoCaptureFrameRate">
     481                <property name="spacing">
     482                 <number>0</number>
     483                </property>
     484                <item row="0" column="0" colspan="3">
     485                 <widget class="QIAdvancedSlider" name="m_pSliderVideoCaptureFrameRate">
     486                  <property name="whatsThis">
     487                   <string>This setting determines the maximum number of &lt;b>frames per second&lt;/b>. Frames with a higher frequency will be skipped. Reducing this value increses the number of skipped frames but reduces the file size.</string>
     488                  </property>
     489                  <property name="orientation">
     490                   <enum>Qt::Horizontal</enum>
     491                  </property>
     492                 </widget>
     493                </item>
     494                <item row="1" column="0">
     495                 <widget class="QLabel" name="m_pLabelVideoCaptureFrameRateMin"/>
     496                </item>
     497                <item row="1" column="1">
     498                 <spacer name="m_pStretchVideoCaptureFrameRate">
     499                  <property name="orientation">
     500                   <enum>Qt::Horizontal</enum>
     501                  </property>
     502                  <property name="sizeHint" stdset="0">
     503                   <size>
     504                    <width>0</width>
     505                    <height>0</height>
     506                   </size>
     507                  </property>
     508                 </spacer>
     509                </item>
     510                <item row="1" column="2">
     511                 <widget class="QLabel" name="m_pLabelVideoCaptureFrameRateMax"/>
     512                </item>
     513               </layout>
     514              </widget>
    513515             </item>
    514516             <item row="2" column="2">
     
    536538             </item>
    537539             <item row="4" column="1" rowspan="2">
    538               <layout class="QGridLayout" name="m_pSliderLayoutVideoCaptureQuality">
    539                <property name="spacing">
    540                 <number>0</number>
    541                </property>
    542                <item row="0" column="0" colspan="5">
    543                 <widget class="QIAdvancedSlider" name="m_pSliderVideoCaptureQuality">
    544                  <property name="whatsThis">
    545                   <string>This setting determines the &lt;b>quality&lt;/b>. Increasing this value makes the video look better for the cost of an increased file size.</string>
    546                  </property>
    547                  <property name="orientation">
    548                   <enum>Qt::Horizontal</enum>
    549                  </property>
    550                 </widget>
    551                </item>
    552                <item row="1" column="0">
    553                 <widget class="QLabel" name="m_pLabelVideoCaptureQualityMin"/>
    554                </item>
    555                <item row="1" column="1">
    556                 <spacer name="m_pStretchVideoCaptureQualityLeft">
    557                  <property name="orientation">
    558                   <enum>Qt::Horizontal</enum>
    559                  </property>
    560                  <property name="sizeHint" stdset="0">
    561                   <size>
    562                    <width>0</width>
    563                    <height>0</height>
    564                   </size>
    565                  </property>
    566                 </spacer>
    567                </item>
    568                <item row="1" column="2">
    569                 <widget class="QLabel" name="m_pLabelVideoCaptureQualityMed"/>
    570                </item>
    571                <item row="1" column="3">
    572                 <spacer name="m_pStretchVideoCaptureQualityRight">
    573                  <property name="orientation">
    574                   <enum>Qt::Horizontal</enum>
    575                  </property>
    576                  <property name="sizeHint" stdset="0">
    577                   <size>
    578                    <width>0</width>
    579                    <height>0</height>
    580                   </size>
    581                  </property>
    582                 </spacer>
    583                </item>
    584                <item row="1" column="4">
    585                 <widget class="QLabel" name="m_pLabelVideoCaptureQualityMax"/>
    586                </item>
    587               </layout>
     540              <widget class="QWidget" name="m_pContainerSliderVideoCaptureQuality">
     541               <layout class="QGridLayout" name="m_pContainerLayoutSliderVideoCaptureQuality">
     542                <property name="spacing">
     543                 <number>0</number>
     544                </property>
     545                <item row="0" column="0" colspan="5">
     546                 <widget class="QIAdvancedSlider" name="m_pSliderVideoCaptureQuality">
     547                  <property name="whatsThis">
     548                   <string>This setting determines the &lt;b>quality&lt;/b>. Increasing this value makes the video look better for the cost of an increased file size.</string>
     549                  </property>
     550                  <property name="orientation">
     551                   <enum>Qt::Horizontal</enum>
     552                  </property>
     553                 </widget>
     554                </item>
     555                <item row="1" column="0">
     556                 <widget class="QLabel" name="m_pLabelVideoCaptureQualityMin"/>
     557                </item>
     558                <item row="1" column="1">
     559                 <spacer name="m_pStretchVideoCaptureQualityLeft">
     560                  <property name="orientation">
     561                   <enum>Qt::Horizontal</enum>
     562                  </property>
     563                  <property name="sizeHint" stdset="0">
     564                   <size>
     565                    <width>0</width>
     566                    <height>0</height>
     567                   </size>
     568                  </property>
     569                 </spacer>
     570                </item>
     571                <item row="1" column="2">
     572                 <widget class="QLabel" name="m_pLabelVideoCaptureQualityMed"/>
     573                </item>
     574                <item row="1" column="3">
     575                 <spacer name="m_pStretchVideoCaptureQualityRight">
     576                  <property name="orientation">
     577                   <enum>Qt::Horizontal</enum>
     578                  </property>
     579                  <property name="sizeHint" stdset="0">
     580                   <size>
     581                    <width>0</width>
     582                    <height>0</height>
     583                   </size>
     584                  </property>
     585                 </spacer>
     586                </item>
     587                <item row="1" column="4">
     588                 <widget class="QLabel" name="m_pLabelVideoCaptureQualityMax"/>
     589                </item>
     590               </layout>
     591              </widget>
    588592             </item>
    589593             <item row="4" column="2">
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette