VirtualBox

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


Ignore:
Timestamp:
Feb 13, 2015 3:07:42 PM (10 years ago)
Author:
vboxsync
Message:

FE/Qt: 7599: Machine settings: Separate Interface page, stuff from Display page MachineWindow tab moved there.

Location:
trunk/src/VBox/Frontends/VirtualBox
Files:
13 edited
11 copied

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk

    r53321 r54199  
    369369        src/settings/machine/UIMachineSettingsDisplay.h \
    370370        src/settings/machine/UIMachineSettingsGeneral.h \
    371         src/settings/machine/UIMachineSettingsNetwork.h \
     371    src/settings/machine/UIMachineSettingsInterface.h \
     372    src/settings/machine/UIMachineSettingsNetwork.h \
    372373        src/settings/machine/UIMachineSettingsParallel.h \
    373374        src/settings/machine/UIMachineSettingsPortForwardingDlg.h \
     
    647648        src/settings/machine/UIMachineSettingsDisplay.cpp \
    648649        src/settings/machine/UIMachineSettingsGeneral.cpp \
    649         src/settings/machine/UIMachineSettingsNetwork.cpp \
     650    src/settings/machine/UIMachineSettingsInterface.cpp \
     651    src/settings/machine/UIMachineSettingsNetwork.cpp \
    650652        src/settings/machine/UIMachineSettingsParallel.cpp \
    651653        src/settings/machine/UIMachineSettingsPortForwardingDlg.cpp \
  • trunk/src/VBox/Frontends/VirtualBox/VBoxUI.pro

    r51310 r54199  
    4848    src/settings/machine/UIMachineSettingsSF.ui \
    4949    src/settings/machine/UIMachineSettingsSFDetails.ui \
     50    src/settings/machine/UIMachineSettingsInterface.ui \
    5051    src/widgets/UIApplianceEditorWidget.ui \
    5152    src/selector/VBoxSnapshotsWgt.ui
  • trunk/src/VBox/Frontends/VirtualBox/VirtualBox1.qrc

    r54115 r54199  
    178178        <file alias="ide_expand_16px.png">images/ide_expand_16px.png</file>
    179179        <file alias="import_16px.png">images/import_16px.png</file>
     180        <file alias="interface_16px.png">images/interface_16px.png</file>
     181        <file alias="interface_24px.png">images/interface_24px.png</file>
     182        <file alias="interface_32px.png">images/interface_32px.png</file>
     183        <file alias="interface_warning_16px.png">images/interface_warning_16px.png</file>
    180184        <file alias="keyboard_16px.png">images/keyboard_16px.png</file>
    181185        <file alias="keyboard_24px.png">images/keyboard_24px.png</file>
     
    275279        <file alias="os_turbolinux.png">images/os_turbolinux.png</file>
    276280        <file alias="os_turbolinux_64.png">images/os_turbolinux_64.png</file>
    277         <file alias="os_type_16px.png">images/os_type_16px.png</file>
    278         <file alias="os_ubuntu.png">images/os_ubuntu.png</file>
    279281    </qresource>
    280282</RCC>
  • trunk/src/VBox/Frontends/VirtualBox/VirtualBox1_hidpi.qrc

    r54115 r54199  
    178178        <file alias="ide_expand_16px_hidpi.png">images/hidpi/ide_expand_16px_hidpi.png</file>
    179179        <file alias="import_16px_hidpi.png">images/hidpi/import_16px_hidpi.png</file>
     180        <file alias="interface_16px_hidpi.png">images/hidpi/interface_16px_hidpi.png</file>
     181        <file alias="interface_24px_hidpi.png">images/hidpi/interface_24px_hidpi.png</file>
     182        <file alias="interface_32px_hidpi.png">images/hidpi/interface_32px_hidpi.png</file>
     183        <file alias="interface_warning_16px_hidpi.png">images/hidpi/interface_warning_16px_hidpi.png</file>
    180184        <file alias="keyboard_16px_hidpi.png">images/hidpi/keyboard_16px_hidpi.png</file>
    181185        <file alias="keyboard_24px_hidpi.png">images/hidpi/keyboard_24px_hidpi.png</file>
     
    254258        <file alias="os_opensuse_64_hidpi.png">images/hidpi/os_opensuse_64_hidpi.png</file>
    255259        <file alias="os_opensuse_hidpi.png">images/hidpi/os_opensuse_hidpi.png</file>
    256         <file alias="os_oracle_64_hidpi.png">images/hidpi/os_oracle_64_hidpi.png</file>
    257         <file alias="os_oracle_hidpi.png">images/hidpi/os_oracle_hidpi.png</file>
    258260    </qresource>
    259261</RCC>
  • trunk/src/VBox/Frontends/VirtualBox/VirtualBox2.qrc

    r54115 r54199  
    11<RCC>
    22    <qresource prefix="/">
     3        <file alias="os_type_16px.png">images/os_type_16px.png</file>
     4        <file alias="os_ubuntu.png">images/os_ubuntu.png</file>
    35        <file alias="os_ubuntu_64.png">images/os_ubuntu_64.png</file>
    46        <file alias="os_win10.png">images/os_win10.png</file>
  • trunk/src/VBox/Frontends/VirtualBox/VirtualBox2_hidpi.qrc

    r54115 r54199  
    11<RCC>
    22    <qresource prefix="/">
     3        <file alias="os_oracle_64_hidpi.png">images/hidpi/os_oracle_64_hidpi.png</file>
     4        <file alias="os_oracle_hidpi.png">images/hidpi/os_oracle_hidpi.png</file>
    35        <file alias="os_oraclesolaris_64_hidpi.png">images/hidpi/os_oraclesolaris_64_hidpi.png</file>
    46        <file alias="os_oraclesolaris_hidpi.png">images/hidpi/os_oraclesolaris_hidpi.png</file>
  • trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendGlobal.cpp

    r53406 r54199  
    10761076    switch (machineSettingsPageType)
    10771077    {
    1078         case MachineSettingsPageType_General:  strResult = "General"; break;
    1079         case MachineSettingsPageType_System:   strResult = "System"; break;
    1080         case MachineSettingsPageType_Display:  strResult = "Display"; break;
    1081         case MachineSettingsPageType_Storage:  strResult = "Storage"; break;
    1082         case MachineSettingsPageType_Audio:    strResult = "Audio"; break;
    1083         case MachineSettingsPageType_Network:  strResult = "Network"; break;
    1084         case MachineSettingsPageType_Ports:    strResult = "Ports"; break;
    1085         case MachineSettingsPageType_Serial:   strResult = "Serial"; break;
    1086         case MachineSettingsPageType_Parallel: strResult = "Parallel"; break;
    1087         case MachineSettingsPageType_USB:      strResult = "USB"; break;
    1088         case MachineSettingsPageType_SF:       strResult = "SharedFolders"; break;
     1078        case MachineSettingsPageType_General:   strResult = "General"; break;
     1079        case MachineSettingsPageType_System:    strResult = "System"; break;
     1080        case MachineSettingsPageType_Display:   strResult = "Display"; break;
     1081        case MachineSettingsPageType_Storage:   strResult = "Storage"; break;
     1082        case MachineSettingsPageType_Audio:     strResult = "Audio"; break;
     1083        case MachineSettingsPageType_Network:   strResult = "Network"; break;
     1084        case MachineSettingsPageType_Ports:     strResult = "Ports"; break;
     1085        case MachineSettingsPageType_Serial:    strResult = "Serial"; break;
     1086        case MachineSettingsPageType_Parallel:  strResult = "Parallel"; break;
     1087        case MachineSettingsPageType_USB:       strResult = "USB"; break;
     1088        case MachineSettingsPageType_SF:        strResult = "SharedFolders"; break;
     1089        case MachineSettingsPageType_Interface: strResult = "Interface"; break;
    10891090        default:
    10901091        {
     
    11131114    keys << "USB";           values << MachineSettingsPageType_USB;
    11141115    keys << "SharedFolders"; values << MachineSettingsPageType_SF;
     1116    keys << "Interface";     values << MachineSettingsPageType_Interface;
    11151117    /* Invalid type for unknown words: */
    11161118    if (!keys.contains(strMachineSettingsPageType, Qt::CaseInsensitive))
     
    11251127    switch (type)
    11261128    {
    1127         case MachineSettingsPageType_General:  return UIIconPool::pixmap(":/machine_warning_16px.png");
    1128         case MachineSettingsPageType_System:   return UIIconPool::pixmap(":/chipset_warning_16px.png");
    1129         case MachineSettingsPageType_Display:  return UIIconPool::pixmap(":/vrdp_warning_16px.png");
    1130         case MachineSettingsPageType_Storage:  return UIIconPool::pixmap(":/hd_warning_16px.png");
    1131         case MachineSettingsPageType_Audio:    return UIIconPool::pixmap(":/sound_warning_16px.png");
    1132         case MachineSettingsPageType_Network:  return UIIconPool::pixmap(":/nw_warning_16px.png");
    1133         case MachineSettingsPageType_Ports:    return UIIconPool::pixmap(":/serial_port_warning_16px.png");
    1134         case MachineSettingsPageType_Serial:   return UIIconPool::pixmap(":/serial_port_warning_16px.png");
    1135         case MachineSettingsPageType_Parallel: return UIIconPool::pixmap(":/parallel_port_warning_16px.png");
    1136         case MachineSettingsPageType_USB:      return UIIconPool::pixmap(":/usb_warning_16px.png");
    1137         case MachineSettingsPageType_SF:       return UIIconPool::pixmap(":/sf_warning_16px.png");
     1129        case MachineSettingsPageType_General:   return UIIconPool::pixmap(":/machine_warning_16px.png");
     1130        case MachineSettingsPageType_System:    return UIIconPool::pixmap(":/chipset_warning_16px.png");
     1131        case MachineSettingsPageType_Display:   return UIIconPool::pixmap(":/vrdp_warning_16px.png");
     1132        case MachineSettingsPageType_Storage:   return UIIconPool::pixmap(":/hd_warning_16px.png");
     1133        case MachineSettingsPageType_Audio:     return UIIconPool::pixmap(":/sound_warning_16px.png");
     1134        case MachineSettingsPageType_Network:   return UIIconPool::pixmap(":/nw_warning_16px.png");
     1135        case MachineSettingsPageType_Ports:     return UIIconPool::pixmap(":/serial_port_warning_16px.png");
     1136        case MachineSettingsPageType_Serial:    return UIIconPool::pixmap(":/serial_port_warning_16px.png");
     1137        case MachineSettingsPageType_Parallel:  return UIIconPool::pixmap(":/parallel_port_warning_16px.png");
     1138        case MachineSettingsPageType_USB:       return UIIconPool::pixmap(":/usb_warning_16px.png");
     1139        case MachineSettingsPageType_SF:        return UIIconPool::pixmap(":/sf_warning_16px.png");
     1140        case MachineSettingsPageType_Interface: return UIIconPool::pixmap(":/interface_warning_16px.png");
    11381141        default: AssertMsgFailed(("No pixmap for %d", type)); break;
    11391142    }
  • trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.h

    r53447 r54199  
    480480    MachineSettingsPageType_USB,
    481481    MachineSettingsPageType_SF,
     482    MachineSettingsPageType_Interface,
    482483    MachineSettingsPageType_Max
    483484};
  • trunk/src/VBox/Frontends/VirtualBox/src/precomp.h

    r53815 r54199  
    525525#include "UIMachineSettingsDisplay.h"
    526526#include "UIMachineSettingsGeneral.h"
     527#include "UIMachineSettingsInterface.h"
    527528#include "UIMachineSettingsNetwork.h"
    528529#include "UIMachineSettingsParallel.h"
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialogSpecific.cpp

    r52730 r54199  
    6060# include "UIMachineSettingsUSB.h"
    6161# include "UIMachineSettingsSF.h"
     62# include "UIMachineSettingsInterface.h"
    6263
    6364/* COM includes: */
     
    702703                    break;
    703704                }
     705                /* Interface page: */
     706                case MachineSettingsPageType_Interface:
     707                {
     708                    pSettingsPage = new UIMachineSettingsInterface(m_machine.GetId());
     709                    addItem(":/interface_32px.png", ":/interface_24px.png", ":/interface_16px.png",
     710                            iPageIndex, "#interface", pSettingsPage);
     711                    break;
     712                }
    704713                default:
    705714                    break;
     
    924933    m_pSelector->setItemText(MachineSettingsPageType_SF, tr("Shared Folders"));
    925934
     935    /* Interface page: */
     936    m_pSelector->setItemText(MachineSettingsPageType_Interface, tr("Interface"));
     937
    926938    /* Polish the selector: */
    927939    m_pSelector->polish();
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.cpp

    r53465 r54199  
    2626# include "QIWidgetValidator.h"
    2727# include "UIMachineSettingsDisplay.h"
    28 # include "UIExtraDataManager.h"
    2928# include "UIMessageCenter.h"
    30 # include "UIActionPool.h"
    3129# include "UIConverter.h"
    3230# include "VBoxGlobal.h"
     
    5149    , m_fWddmModeSupported(false)
    5250#endif /* VBOX_WITH_CRHGSMI */
    53     , m_pActionPool(0)
    5451{
    5552    /* Prepare: */
    5653    prepare();
    57 }
    58 
    59 UIMachineSettingsDisplay::~UIMachineSettingsDisplay()
    60 {
    61     /* Cleanup: */
    62     cleanup();
    6354}
    6455
     
    141132    displayData.m_screens = m_machine.GetVideoCaptureScreens();
    142133
    143     /* Cache Machine Window data: */
    144     displayData.m_dScaleFactor = gEDataManager->scaleFactor(m_machine.GetId());
    145 #ifdef Q_WS_MAC
    146     displayData.m_fUseUnscaledHiDPIOutput = gEDataManager->useUnscaledHiDPIOutput(m_machine.GetId());
    147 #endif /* Q_WS_MAC */
    148     displayData.m_fShowMiniToolBar = gEDataManager->miniToolbarEnabled(m_machine.GetId());
    149     displayData.m_fMiniToolBarAtTop = gEDataManager->miniToolbarAlignment(m_machine.GetId()) == Qt::AlignTop;
    150 
    151134    /* Initialize other variables: */
    152135    m_iInitialVRAM = RT_MIN(displayData.m_iCurrentVRAM, m_iMaxVRAM);
     
    196179    m_pScrollerVideoCaptureScreens->setValue(displayData.m_screens);
    197180
    198     /* Prepare Machine Window data: */
    199     const QString strMachineID = m_machine.GetId();
    200     m_pMenuBarEditor->setMachineID(strMachineID);
    201     m_pStatusBarEditor->setMachineID(strMachineID);
    202     m_pMenuBarEditor->setActionPool(m_pActionPool);
    203     m_pEditorGuestScreenScale->setValue(displayData.m_dScaleFactor * 100);
    204 #ifdef Q_WS_MAC
    205     m_pCheckBoxUnscaledHiDPIOutput->setChecked(displayData.m_fUseUnscaledHiDPIOutput);
    206 #endif /* Q_WS_MAC */
    207     m_pCheckBoxShowMiniToolBar->setChecked(displayData.m_fShowMiniToolBar);
    208     m_pComboToolBarAlignment->setChecked(displayData.m_fMiniToolBarAtTop);
    209 
    210181    /* Polish page finally: */
    211182    polishPage();
     
    219190void UIMachineSettingsDisplay::putToCache()
    220191{
    221     /* Prepare audio data: */
     192    /* Prepare display data: */
    222193    UIDataSettingsMachineDisplay displayData = m_cache.base();
    223194
     
    249220    displayData.m_iVideoCaptureBitRate = m_pEditorVideoCaptureBitRate->value();
    250221    displayData.m_screens = m_pScrollerVideoCaptureScreens->value();
    251 
    252     /* Gather Machine Window data from page: */
    253     displayData.m_dScaleFactor = (double)m_pEditorGuestScreenScale->value() / 100;
    254 #ifdef Q_WS_MAC
    255     displayData.m_fUseUnscaledHiDPIOutput = m_pCheckBoxUnscaledHiDPIOutput->isChecked();
    256 #endif /* Q_WS_MAC */
    257     displayData.m_fShowMiniToolBar = m_pCheckBoxShowMiniToolBar->isChecked();
    258     displayData.m_fMiniToolBarAtTop = m_pComboToolBarAlignment->isChecked();
    259222
    260223    /* Cache display data: */
     
    339302            m_machine.SetVideoCaptureScreens(displayData.m_screens);
    340303        }
    341 
    342         /* Store Machine Window data: */
    343         if (isMachineInValidMode())
    344         {
    345             gEDataManager->setScaleFactor(displayData.m_dScaleFactor, m_machine.GetId());
    346 #ifdef Q_WS_MAC
    347             gEDataManager->setUseUnscaledHiDPIOutput(displayData.m_fUseUnscaledHiDPIOutput, m_machine.GetId());
    348 #endif /* Q_WS_MAC */
    349             gEDataManager->setMiniToolbarEnabled(displayData.m_fShowMiniToolBar, m_machine.GetId());
    350             gEDataManager->setMiniToolbarAlignment(displayData.m_fMiniToolBarAtTop ? Qt::AlignTop : Qt::AlignBottom, m_machine.GetId());
    351         }
    352304    }
    353305
     
    481433void UIMachineSettingsDisplay::setOrderAfter(QWidget *pWidget)
    482434{
    483     /* Video tab-order */
     435    /* Video tab-order: */
    484436    setTabOrder(pWidget, m_pTabWidget->focusProxy());
    485437    setTabOrder(m_pTabWidget->focusProxy(), m_pSliderVideoMemorySize);
     
    511463    setTabOrder(m_pEditorVideoCaptureFrameRate, m_pSliderVideoCaptureQuality);
    512464    setTabOrder(m_pSliderVideoCaptureQuality, m_pEditorVideoCaptureBitRate);
    513 
    514     /* Machine Window tab-order: */
    515     setTabOrder(m_pEditorVideoCaptureBitRate, m_pSliderGuestScreenScale);
    516     setTabOrder(m_pSliderGuestScreenScale, m_pEditorGuestScreenScale);
    517     setTabOrder(m_pEditorGuestScreenScale, m_pCheckBoxUnscaledHiDPIOutput);
    518     setTabOrder(m_pCheckBoxUnscaledHiDPIOutput, m_pCheckBoxShowMiniToolBar);
    519     setTabOrder(m_pCheckBoxShowMiniToolBar, m_pComboToolBarAlignment);
    520465}
    521466
    522467void UIMachineSettingsDisplay::retranslateUi()
    523468{
    524     /* Translate uic generated strings */
     469    /* Translate uic generated strings: */
    525470    Ui::UIMachineSettingsDisplay::retranslateUi(this);
    526471
     
    571516    m_pContainerVideoCapture->setEnabled(isMachineInValidMode());
    572517    sltHandleVideoCaptureCheckboxToggle();
    573 
    574     /* Machine-window tab: */
    575     m_pMenuBarEditor->setEnabled(isMachineInValidMode());
    576     m_pLabelGuestScreenScale->setEnabled(isMachineInValidMode());
    577     m_pSliderGuestScreenScale->setEnabled(isMachineInValidMode());
    578     m_pLabelGuestScreenScaleMin->setEnabled(isMachineInValidMode());
    579     m_pLabelGuestScreenScaleMax->setEnabled(isMachineInValidMode());
    580     m_pEditorGuestScreenScale->setEnabled(isMachineInValidMode());
    581 #ifdef Q_WS_MAC
    582     m_pLabelHiDPI->setEnabled(isMachineInValidMode());
    583     m_pCheckBoxUnscaledHiDPIOutput->setEnabled(isMachineInValidMode());
    584 #else /* !Q_WS_MAC */
    585     m_pLabelHiDPI->hide();
    586     m_pCheckBoxUnscaledHiDPIOutput->hide();
    587 #endif /* !Q_WS_MAC */
    588     m_pLabelMiniToolBar->setEnabled(isMachineInValidMode());
    589     m_pCheckBoxShowMiniToolBar->setEnabled(isMachineInValidMode());
    590     m_pComboToolBarAlignment->setEnabled(isMachineInValidMode() && m_pCheckBoxShowMiniToolBar->isChecked());
    591     m_pStatusBarEditor->setEnabled(isMachineInValidMode());
    592518}
    593519
     
    758684}
    759685
    760 void UIMachineSettingsDisplay::sltHandleGuestScreenScaleSliderChange()
    761 {
    762     /* Apply proposed scale-factor: */
    763     m_pEditorGuestScreenScale->blockSignals(true);
    764     m_pEditorGuestScreenScale->setValue(m_pSliderGuestScreenScale->value());
    765     m_pEditorGuestScreenScale->blockSignals(false);
    766 }
    767 
    768 void UIMachineSettingsDisplay::sltHandleGuestScreenScaleEditorChange()
    769 {
    770     /* Apply proposed scale-factor: */
    771     m_pSliderGuestScreenScale->blockSignals(true);
    772     m_pSliderGuestScreenScale->setValue(m_pEditorGuestScreenScale->value());
    773     m_pSliderGuestScreenScale->blockSignals(false);
    774 }
    775 
    776686void UIMachineSettingsDisplay::prepare()
    777687{
     
    783693    prepareRemoteDisplayTab();
    784694    prepareVideoCaptureTab();
    785     prepareMachineWindowTab();
    786695
    787696    /* Prepare validation: */
     
    932841}
    933842
    934 void UIMachineSettingsDisplay::prepareMachineWindowTab()
    935 {
    936     /* Create personal action-pool: */
    937     m_pActionPool = UIActionPool::create(UIActionPoolType_Runtime);
    938 
    939     /* Prepare scale-factor slider: */
    940     m_pSliderGuestScreenScale->setMinimum(100);
    941     m_pSliderGuestScreenScale->setMaximum(200);
    942     m_pSliderGuestScreenScale->setPageStep(10);
    943     m_pSliderGuestScreenScale->setSingleStep(1);
    944     m_pSliderGuestScreenScale->setTickInterval(10);
    945     m_pSliderGuestScreenScale->setSnappingEnabled(true);
    946     connect(m_pSliderGuestScreenScale, SIGNAL(valueChanged(int)), this, SLOT(sltHandleGuestScreenScaleSliderChange()));
    947 
    948     /* Prepare scale-factor editor: */
    949     m_pEditorGuestScreenScale->setMinimum(100);
    950     m_pEditorGuestScreenScale->setMaximum(200);
    951     vboxGlobal().setMinimumWidthAccordingSymbolCount(m_pEditorGuestScreenScale, 5);
    952     connect(m_pEditorGuestScreenScale, SIGNAL(valueChanged(int)), this, SLOT(sltHandleGuestScreenScaleEditorChange()));
    953 }
    954 
    955843void UIMachineSettingsDisplay::prepareValidation()
    956844{
     
    963851    connect(m_pEditorRemoteDisplayPort, SIGNAL(textChanged(const QString&)), this, SLOT(revalidate()));
    964852    connect(m_pEditorRemoteDisplayTimeout, SIGNAL(textChanged(const QString&)), this, SLOT(revalidate()));
    965 }
    966 
    967 void UIMachineSettingsDisplay::cleanupMachineWindowTab()
    968 {
    969     /* Destroy personal action-pool: */
    970     UIActionPool::destroy(m_pActionPool);
    971 }
    972 
    973 void UIMachineSettingsDisplay::cleanup()
    974 {
    975     /* Cleanup tabs: */
    976     cleanupMachineWindowTab();
    977853}
    978854
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.h

    r53465 r54199  
    5252        , m_iVideoCaptureFrameRate(0)
    5353        , m_iVideoCaptureBitRate(0)
    54         , m_dScaleFactor(1)
    55 #ifdef Q_WS_MAC
    56         , m_fUseUnscaledHiDPIOutput(false)
    57 #endif /* Q_WS_MAC */
    58         , m_fShowMiniToolBar(false)
    59         , m_fMiniToolBarAtTop(false)
    6054    {}
    6155
     
    8175               (m_iVideoCaptureFrameRate == other.m_iVideoCaptureFrameRate) &&
    8276               (m_iVideoCaptureBitRate == other.m_iVideoCaptureBitRate) &&
    83                (m_screens == other.m_screens) &&
    84                (m_dScaleFactor == other.m_dScaleFactor) &&
    85 #ifdef Q_WS_MAC
    86                (m_fUseUnscaledHiDPIOutput == other.m_fUseUnscaledHiDPIOutput) &&
    87 #endif /* Q_WS_MAC */
    88                (m_fShowMiniToolBar == other.m_fShowMiniToolBar) &&
    89                (m_fMiniToolBarAtTop == other.m_fMiniToolBarAtTop);
     77               (m_screens == other.m_screens);
    9078    }
    9179
     
    119107    int m_iVideoCaptureBitRate;
    120108    QVector<BOOL> m_screens;
    121 
    122     /* Variables: Machine Window stuff: */
    123     double m_dScaleFactor;
    124 #ifdef Q_WS_MAC
    125     bool m_fUseUnscaledHiDPIOutput;
    126 #endif /* Q_WS_MAC */
    127     bool m_fShowMiniToolBar;
    128     bool m_fMiniToolBarAtTop;
    129109};
    130110typedef UISettingsCache<UIDataSettingsMachineDisplay> UICacheSettingsMachineDisplay;
     
    140120    /** Constructor. */
    141121    UIMachineSettingsDisplay();
    142     /** Destructor. */
    143     ~UIMachineSettingsDisplay();
    144122
    145123    /* API: Correlation stuff: */
     
    198176    void sltHandleVideoCaptureBitRateEditorChange();
    199177
    200     /* Handlers: Guest-screen scale-factor stuff: */
    201     void sltHandleGuestScreenScaleSliderChange();
    202     void sltHandleGuestScreenScaleEditorChange();
    203 
    204178private:
    205179
     
    212186    /** Prepare routine: Video Capture tab. */
    213187    void prepareVideoCaptureTab();
    214     /** Prepare routine: Machine Window tab. */
    215     void prepareMachineWindowTab();
    216188    /** Prepare routine: Validation. */
    217189    void prepareValidation();
    218 
    219     /** Cleanup routine: Machine Window tab. */
    220     void cleanupMachineWindowTab();
    221     /** Cleanup routine. */
    222     void cleanup();
    223190
    224191    /* Helpers: Video stuff: */
     
    257224    /* Cache: */
    258225    UICacheSettingsMachineDisplay m_cache;
    259 
    260     /** Holds the action-pool instance. */
    261     UIActionPool *m_pActionPool;
    262226};
    263227
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.ui

    r53496 r54199  
    645645      </layout>
    646646     </widget>
    647      <widget class="QWidget" name="m_pTabMachineWindow">
    648       <attribute name="title">
    649        <string>Machine &amp;Window</string>
    650       </attribute>
    651       <layout class="QGridLayout" name="m_pLayoutTabMachineWindow">
    652        <item row="0" column="0" colspan="3">
    653         <widget class="UIMenuBarEditorWidget" name="m_pMenuBarEditor">
    654          <property name="whatsThis">
    655           <string>Allows to modify VM menu-bar contents.</string>
    656          </property>
    657         </widget>
    658        </item>
    659        <item row="1" column="0">
    660         <widget class="QLabel" name="m_pLabelGuestScreenScale">
    661          <property name="text">
    662           <string>Screen Scale Factor:</string>
    663          </property>
    664          <property name="alignment">
    665           <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
    666          </property>
    667         </widget>
    668        </item>
    669        <item row="1" column="1" rowspan="2">
    670         <layout class="QGridLayout" name="m_pLayoutGuestScreenScaleSlider">
    671          <property name="spacing">
    672           <number>0</number>
    673          </property>
    674          <item row="0" column="0" colspan="3">
    675           <widget class="QIAdvancedSlider" name="m_pSliderGuestScreenScale">
    676            <property name="whatsThis">
    677             <string>This setting determines the guest screen scale factor.</string>
    678            </property>
    679            <property name="orientation">
    680             <enum>Qt::Horizontal</enum>
    681            </property>
    682           </widget>
    683          </item>
    684          <item row="1" column="0">
    685           <widget class="QLabel" name="m_pLabelGuestScreenScaleMin">
    686            <property name="text">
    687             <string>100%</string>
    688            </property>
    689           </widget>
    690          </item>
    691          <item row="1" column="1">
    692           <spacer name="m_pSpacerGuestScreenScale">
    693            <property name="orientation">
    694             <enum>Qt::Horizontal</enum>
    695            </property>
    696            <property name="sizeHint" stdset="0">
    697             <size>
    698              <width>0</width>
    699              <height>0</height>
    700             </size>
    701            </property>
    702           </spacer>
    703          </item>
    704          <item row="1" column="2">
    705           <widget class="QLabel" name="m_pLabelGuestScreenScaleMax">
    706            <property name="text">
    707             <string>200%</string>
    708            </property>
    709           </widget>
    710          </item>
    711         </layout>
    712        </item>
    713        <item row="1" column="2">
    714         <widget class="QSpinBox" name="m_pEditorGuestScreenScale">
    715          <property name="whatsThis">
    716           <string>This setting determines the guest screen scale factor.</string>
    717          </property>
    718          <property name="suffix">
    719           <string>%</string>
    720          </property>
    721         </widget>
    722        </item>
    723        <item row="3" column="0">
    724         <widget class="QLabel" name="m_pLabelHiDPI">
    725          <property name="text">
    726           <string>HiDPI:</string>
    727          </property>
    728          <property name="alignment">
    729           <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
    730          </property>
    731         </widget>
    732        </item>
    733        <item row="3" column="1" colspan="2">
    734         <widget class="QCheckBox" name="m_pCheckBoxUnscaledHiDPIOutput">
    735          <property name="sizePolicy">
    736           <sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding">
    737            <horstretch>0</horstretch>
    738            <verstretch>0</verstretch>
    739           </sizepolicy>
    740          </property>
    741          <property name="whatsThis">
    742           <string>If checked, guest screen contents will not be scaled up to compensate for high host screen resolutions.</string>
    743          </property>
    744          <property name="text">
    745           <string>Use &amp;Unscaled HiDPI Output</string>
    746          </property>
    747         </widget>
    748        </item>
    749        <item row="4" column="0">
    750         <widget class="QLabel" name="m_pLabelMiniToolBar">
    751          <property name="text">
    752           <string>Mini ToolBar:</string>
    753          </property>
    754          <property name="alignment">
    755           <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
    756          </property>
    757         </widget>
    758        </item>
    759        <item row="4" column="1" colspan="2">
    760         <widget class="QCheckBox" name="m_pCheckBoxShowMiniToolBar">
    761          <property name="sizePolicy">
    762           <sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding">
    763            <horstretch>0</horstretch>
    764            <verstretch>0</verstretch>
    765           </sizepolicy>
    766          </property>
    767          <property name="whatsThis">
    768           <string>If checked, show the Mini ToolBar in Fullscreen and Seamless modes.</string>
    769          </property>
    770          <property name="text">
    771           <string>Show in &amp;Fullscreen/Seamless</string>
    772          </property>
    773          <property name="checked">
    774           <bool>true</bool>
    775          </property>
    776         </widget>
    777        </item>
    778        <item row="5" column="1" colspan="2">
    779         <widget class="QCheckBox" name="m_pComboToolBarAlignment">
    780          <property name="sizePolicy">
    781           <sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding">
    782            <horstretch>0</horstretch>
    783            <verstretch>0</verstretch>
    784           </sizepolicy>
    785          </property>
    786          <property name="whatsThis">
    787           <string>If checked, show the Mini ToolBar at the top of the screen, rather than in its default position at the bottom of the screen.</string>
    788          </property>
    789          <property name="text">
    790           <string>Show at &amp;Top of Screen</string>
    791          </property>
    792          <property name="checked">
    793           <bool>false</bool>
    794          </property>
    795         </widget>
    796        </item>
    797        <item row="6" column="0" colspan="3">
    798         <spacer name="m_pSpacer">
    799          <property name="orientation">
    800           <enum>Qt::Vertical</enum>
    801          </property>
    802          <property name="sizeHint" stdset="0">
    803           <size>
    804            <width>0</width>
    805            <height>0</height>
    806           </size>
    807          </property>
    808         </spacer>
    809        </item>
    810        <item row="7" column="0" colspan="3">
    811         <widget class="UIStatusBarEditorWidget" name="m_pStatusBarEditor">
    812          <property name="whatsThis">
    813           <string>Allows to modify VM status-bar contents.</string>
    814          </property>
    815         </widget>
    816        </item>
    817       </layout>
    818      </widget>
    819647    </widget>
    820648   </item>
     
    843671   <header>UIFilmContainer.h</header>
    844672  </customwidget>
    845   <customwidget>
    846    <class>UIMenuBarEditorWidget</class>
    847    <extends>QWidget</extends>
    848    <header>UIMenuBarEditorWindow.h</header>
    849   </customwidget>
    850   <customwidget>
    851    <class>UIStatusBarEditorWidget</class>
    852    <extends>QWidget</extends>
    853    <header>UIStatusBarEditorWindow.h</header>
    854   </customwidget>
    855673 </customwidgets>
    856674 <resources/>
     
    862680   <slot>setEnabled(bool)</slot>
    863681  </connection>
    864   <connection>
    865    <sender>m_pCheckBoxShowMiniToolBar</sender>
    866    <signal>toggled(bool)</signal>
    867    <receiver>m_pComboToolBarAlignment</receiver>
    868    <slot>setEnabled(bool)</slot>
    869    <hints>
    870     <hint type="sourcelabel">
    871      <x>195</x>
    872      <y>50</y>
    873     </hint>
    874     <hint type="destinationlabel">
    875      <x>196</x>
    876      <y>72</y>
    877     </hint>
    878    </hints>
    879   </connection>
    880682 </connections>
    881683</ui>
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsInterface.cpp

    r54194 r54199  
    11/* $Id$ */
    22/** @file
    3  * VBox Qt GUI - UIMachineSettingsDisplay class implementation.
     3 * VBox Qt GUI - UIMachineSettingsInterface class implementation.
    44 */
    55
    66/*
    7  * Copyright (C) 2008-2014 Oracle Corporation
     7 * Copyright (C) 2008-2015 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    2020#else  /* !VBOX_WITH_PRECOMPILED_HEADERS */
    2121
    22 /* Qt includes: */
    23 # include <QDesktopWidget>
    24 
    2522/* GUI includes: */
    26 # include "QIWidgetValidator.h"
    27 # include "UIMachineSettingsDisplay.h"
     23# include "UIMachineSettingsInterface.h"
    2824# include "UIExtraDataManager.h"
    29 # include "UIMessageCenter.h"
    3025# include "UIActionPool.h"
    31 # include "UIConverter.h"
    3226# include "VBoxGlobal.h"
    3327
    34 /* COM includes: */
    35 # include "CVRDEServer.h"
    36 # include "CExtPackManager.h"
    37 # include "CExtPack.h"
    38 
    3928#endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
    4029
    4130
    42 UIMachineSettingsDisplay::UIMachineSettingsDisplay()
    43     : m_iMinVRAM(0)
    44     , m_iMaxVRAM(0)
    45     , m_iMaxVRAMVisible(0)
    46     , m_iInitialVRAM(0)
    47 #ifdef VBOX_WITH_VIDEOHWACCEL
    48     , m_f2DVideoAccelerationSupported(false)
    49 #endif /* VBOX_WITH_VIDEOHWACCEL */
    50 #ifdef VBOX_WITH_CRHGSMI
    51     , m_fWddmModeSupported(false)
    52 #endif /* VBOX_WITH_CRHGSMI */
     31UIMachineSettingsInterface::UIMachineSettingsInterface(const QString strMachineID)
     32    : m_strMachineID(strMachineID)
    5333    , m_pActionPool(0)
    5434{
     
    5737}
    5838
    59 UIMachineSettingsDisplay::~UIMachineSettingsDisplay()
     39UIMachineSettingsInterface::~UIMachineSettingsInterface()
    6040{
    6141    /* Cleanup: */
     
    6343}
    6444
    65 void UIMachineSettingsDisplay::setGuestOSType(CGuestOSType guestOSType)
    66 {
    67     /* Check if guest os type changed: */
    68     if (m_guestOSType == guestOSType)
    69         return;
    70 
    71     /* Remember new guest os type: */
    72     m_guestOSType = guestOSType;
    73 
    74 #ifdef VBOX_WITH_VIDEOHWACCEL
    75     /* Check if 2D video acceleration supported by the guest OS type: */
    76     QString strguestOSTypeFamily = m_guestOSType.GetFamilyId();
    77     m_f2DVideoAccelerationSupported = strguestOSTypeFamily == "Windows";
    78 #endif /* VBOX_WITH_VIDEOHWACCEL */
    79 #ifdef VBOX_WITH_CRHGSMI
    80     /* Check if WDDM mode supported by the guest OS type: */
    81     QString strguestOSTypeId = m_guestOSType.GetId();
    82     m_fWddmModeSupported = VBoxGlobal::isWddmCompatibleOsType(strguestOSTypeId);
    83 #endif /* VBOX_WITH_CRHGSMI */
    84 
    85     /* Recheck video RAM requirement: */
    86     checkVRAMRequirements();
     45/* Load data to cache from corresponding external object(s),
     46 * this task COULD be performed in other than GUI thread: */
     47void UIMachineSettingsInterface::loadToCacheFrom(QVariant &data)
     48{
     49    /* Fetch data to machine: */
     50    UISettingsPageMachine::fetchData(data);
     51
     52    /* Clear cache initially: */
     53    m_cache.clear();
     54
     55    /* Prepare interface data: */
     56    UIDataSettingsMachineInterface interfaceData;
     57
     58    /* Cache interface data: */
     59    interfaceData.m_dScaleFactor = gEDataManager->scaleFactor(m_machine.GetId());
     60#ifdef Q_WS_MAC
     61    interfaceData.m_fUseUnscaledHiDPIOutput = gEDataManager->useUnscaledHiDPIOutput(m_machine.GetId());
     62#endif /* Q_WS_MAC */
     63    interfaceData.m_fShowMiniToolBar = gEDataManager->miniToolbarEnabled(m_machine.GetId());
     64    interfaceData.m_fMiniToolBarAtTop = gEDataManager->miniToolbarAlignment(m_machine.GetId()) == Qt::AlignTop;
     65
     66    /* Cache interface data: */
     67    m_cache.cacheInitialData(interfaceData);
     68
     69    /* Upload machine to data: */
     70    UISettingsPageMachine::uploadData(data);
     71}
     72
     73/* Load data to corresponding widgets from cache,
     74 * this task SHOULD be performed in GUI thread only: */
     75void UIMachineSettingsInterface::getFromCache()
     76{
     77    /* Get interface data from cache: */
     78    const UIDataSettingsMachineInterface &interfaceData = m_cache.base();
     79
     80    /* Prepare interface data: */
     81    m_pEditorGuestScreenScale->setValue(interfaceData.m_dScaleFactor * 100);
     82#ifdef Q_WS_MAC
     83    m_pCheckBoxUnscaledHiDPIOutput->setChecked(interfaceData.m_fUseUnscaledHiDPIOutput);
     84#endif /* Q_WS_MAC */
     85    m_pCheckBoxShowMiniToolBar->setChecked(interfaceData.m_fShowMiniToolBar);
     86    m_pComboToolBarAlignment->setChecked(interfaceData.m_fMiniToolBarAtTop);
     87
     88    /* Polish page finally: */
     89    polishPage();
    8790
    8891    /* Revalidate: */
     
    9093}
    9194
    92 #ifdef VBOX_WITH_VIDEOHWACCEL
    93 bool UIMachineSettingsDisplay::isAcceleration2DVideoSelected() const
    94 {
    95     return m_pCheckbox2DVideo->isChecked();
    96 }
    97 #endif /* VBOX_WITH_VIDEOHWACCEL */
    98 
    99 /* Load data to cache from corresponding external object(s),
     95/* Save data from corresponding widgets to cache,
     96 * this task SHOULD be performed in GUI thread only: */
     97void UIMachineSettingsInterface::putToCache()
     98{
     99    /* Prepare interface data: */
     100    UIDataSettingsMachineInterface interfaceData = m_cache.base();
     101
     102    /* Gather interface data from page: */
     103    interfaceData.m_dScaleFactor = (double)m_pEditorGuestScreenScale->value() / 100;
     104#ifdef Q_WS_MAC
     105    interfaceData.m_fUseUnscaledHiDPIOutput = m_pCheckBoxUnscaledHiDPIOutput->isChecked();
     106#endif /* Q_WS_MAC */
     107    interfaceData.m_fShowMiniToolBar = m_pCheckBoxShowMiniToolBar->isChecked();
     108    interfaceData.m_fMiniToolBarAtTop = m_pComboToolBarAlignment->isChecked();
     109
     110    /* Cache interface data: */
     111    m_cache.cacheCurrentData(interfaceData);
     112}
     113
     114/* Save data from cache to corresponding external object(s),
    100115 * this task COULD be performed in other than GUI thread: */
    101 void UIMachineSettingsDisplay::loadToCacheFrom(QVariant &data)
     116void UIMachineSettingsInterface::saveFromCacheTo(QVariant &data)
    102117{
    103118    /* Fetch data to machine: */
    104119    UISettingsPageMachine::fetchData(data);
    105120
    106     /* Clear cache initially: */
    107     m_cache.clear();
    108 
    109     /* Prepare display data: */
    110     UIDataSettingsMachineDisplay displayData;
    111 
    112     /* Cache Video data: */
    113     displayData.m_iCurrentVRAM = m_machine.GetVRAMSize();
    114     displayData.m_cGuestScreenCount = m_machine.GetMonitorCount();
    115     displayData.m_f3dAccelerationEnabled = m_machine.GetAccelerate3DEnabled();
    116 #ifdef VBOX_WITH_VIDEOHWACCEL
    117     displayData.m_f2dAccelerationEnabled = m_machine.GetAccelerate2DVideoEnabled();
    118 #endif /* VBOX_WITH_VIDEOHWACCEL */
    119 
    120     /* Check if Remote Display server is valid: */
    121     CVRDEServer remoteDisplayServer = m_machine.GetVRDEServer();
    122     displayData.m_fRemoteDisplayServerSupported = !remoteDisplayServer.isNull();
    123     if (!remoteDisplayServer.isNull())
     121    /* Make sure machine is in valid mode & interface data was changed: */
     122    if (isMachineInValidMode() && m_cache.wasChanged())
    124123    {
    125         /* Cache Remote Display data: */
    126         displayData.m_fRemoteDisplayServerEnabled = remoteDisplayServer.GetEnabled();
    127         displayData.m_strRemoteDisplayPort = remoteDisplayServer.GetVRDEProperty("TCP/Ports");
    128         displayData.m_remoteDisplayAuthType = remoteDisplayServer.GetAuthType();
    129         displayData.m_uRemoteDisplayTimeout = remoteDisplayServer.GetAuthTimeout();
    130         displayData.m_fRemoteDisplayMultiConnAllowed = remoteDisplayServer.GetAllowMultiConnection();
     124        /* Get interface data from cache: */
     125        const UIDataSettingsMachineInterface &interfaceData = m_cache.data();
     126
     127        /* Store interface data: */
     128        if (isMachineInValidMode())
     129        {
     130            gEDataManager->setScaleFactor(interfaceData.m_dScaleFactor, m_machine.GetId());
     131#ifdef Q_WS_MAC
     132            gEDataManager->setUseUnscaledHiDPIOutput(interfaceData.m_fUseUnscaledHiDPIOutput, m_machine.GetId());
     133#endif /* Q_WS_MAC */
     134            gEDataManager->setMiniToolbarEnabled(interfaceData.m_fShowMiniToolBar, m_machine.GetId());
     135            gEDataManager->setMiniToolbarAlignment(interfaceData.m_fMiniToolBarAtTop ? Qt::AlignTop : Qt::AlignBottom, m_machine.GetId());
     136        }
    131137    }
    132 
    133     /* Cache Video Capture data: */
    134     displayData.m_fVideoCaptureEnabled = m_machine.GetVideoCaptureEnabled();
    135     displayData.m_strVideoCaptureFolder = QFileInfo(m_machine.GetSettingsFilePath()).absolutePath();
    136     displayData.m_strVideoCaptureFilePath = m_machine.GetVideoCaptureFile();
    137     displayData.m_iVideoCaptureFrameWidth = m_machine.GetVideoCaptureWidth();
    138     displayData.m_iVideoCaptureFrameHeight = m_machine.GetVideoCaptureHeight();
    139     displayData.m_iVideoCaptureFrameRate = m_machine.GetVideoCaptureFPS();
    140     displayData.m_iVideoCaptureBitRate = m_machine.GetVideoCaptureRate();
    141     displayData.m_screens = m_machine.GetVideoCaptureScreens();
    142 
    143     /* Cache Machine Window data: */
    144     displayData.m_dScaleFactor = gEDataManager->scaleFactor(m_machine.GetId());
    145 #ifdef Q_WS_MAC
    146     displayData.m_fUseUnscaledHiDPIOutput = gEDataManager->useUnscaledHiDPIOutput(m_machine.GetId());
    147 #endif /* Q_WS_MAC */
    148     displayData.m_fShowMiniToolBar = gEDataManager->miniToolbarEnabled(m_machine.GetId());
    149     displayData.m_fMiniToolBarAtTop = gEDataManager->miniToolbarAlignment(m_machine.GetId()) == Qt::AlignTop;
    150 
    151     /* Initialize other variables: */
    152     m_iInitialVRAM = RT_MIN(displayData.m_iCurrentVRAM, m_iMaxVRAM);
    153 
    154     /* Cache display data: */
    155     m_cache.cacheInitialData(displayData);
    156138
    157139    /* Upload machine to data: */
     
    159141}
    160142
    161 /* Load data to corresponding widgets from cache,
    162  * this task SHOULD be performed in GUI thread only: */
    163 void UIMachineSettingsDisplay::getFromCache()
    164 {
    165     /* Get display data from cache: */
    166     const UIDataSettingsMachineDisplay &displayData = m_cache.base();
    167 
    168     /* Load Video data to page: */
    169     m_pEditorVideoScreenCount->setValue(displayData.m_cGuestScreenCount);
    170     m_pCheckbox3D->setChecked(displayData.m_f3dAccelerationEnabled);
    171 #ifdef VBOX_WITH_VIDEOHWACCEL
    172     m_pCheckbox2DVideo->setChecked(displayData.m_f2dAccelerationEnabled);
    173 #endif /* VBOX_WITH_VIDEOHWACCEL */
    174     /* Should be the last one from this tab: */
    175     m_pEditorVideoMemorySize->setValue(displayData.m_iCurrentVRAM);
    176 
    177     /* If Remote Display server is supported: */
    178     if (displayData.m_fRemoteDisplayServerSupported)
    179     {
    180         /* Load Remote Display data to page: */
    181         m_pCheckboxRemoteDisplay->setChecked(displayData.m_fRemoteDisplayServerEnabled);
    182         m_pEditorRemoteDisplayPort->setText(displayData.m_strRemoteDisplayPort);
    183         m_pComboRemoteDisplayAuthMethod->setCurrentIndex(m_pComboRemoteDisplayAuthMethod->findText(gpConverter->toString(displayData.m_remoteDisplayAuthType)));
    184         m_pEditorRemoteDisplayTimeout->setText(QString::number(displayData.m_uRemoteDisplayTimeout));
    185         m_pCheckboxMultipleConn->setChecked(displayData.m_fRemoteDisplayMultiConnAllowed);
    186     }
    187 
    188     /* Load Video Capture data to page: */
    189     m_pCheckboxVideoCapture->setChecked(displayData.m_fVideoCaptureEnabled);
    190     m_pEditorVideoCapturePath->setHomeDir(displayData.m_strVideoCaptureFolder);
    191     m_pEditorVideoCapturePath->setPath(displayData.m_strVideoCaptureFilePath);
    192     m_pEditorVideoCaptureWidth->setValue(displayData.m_iVideoCaptureFrameWidth);
    193     m_pEditorVideoCaptureHeight->setValue(displayData.m_iVideoCaptureFrameHeight);
    194     m_pEditorVideoCaptureFrameRate->setValue(displayData.m_iVideoCaptureFrameRate);
    195     m_pEditorVideoCaptureBitRate->setValue(displayData.m_iVideoCaptureBitRate);
    196     m_pScrollerVideoCaptureScreens->setValue(displayData.m_screens);
    197 
    198     /* Prepare Machine Window data: */
    199     const QString strMachineID = m_machine.GetId();
    200     m_pMenuBarEditor->setMachineID(strMachineID);
    201     m_pStatusBarEditor->setMachineID(strMachineID);
    202     m_pMenuBarEditor->setActionPool(m_pActionPool);
    203     m_pEditorGuestScreenScale->setValue(displayData.m_dScaleFactor * 100);
    204 #ifdef Q_WS_MAC
    205     m_pCheckBoxUnscaledHiDPIOutput->setChecked(displayData.m_fUseUnscaledHiDPIOutput);
    206 #endif /* Q_WS_MAC */
    207     m_pCheckBoxShowMiniToolBar->setChecked(displayData.m_fShowMiniToolBar);
    208     m_pComboToolBarAlignment->setChecked(displayData.m_fMiniToolBarAtTop);
    209 
    210     /* Polish page finally: */
    211     polishPage();
    212 
    213     /* Revalidate: */
    214     revalidate();
    215 }
    216 
    217 /* Save data from corresponding widgets to cache,
    218  * this task SHOULD be performed in GUI thread only: */
    219 void UIMachineSettingsDisplay::putToCache()
    220 {
    221     /* Prepare audio data: */
    222     UIDataSettingsMachineDisplay displayData = m_cache.base();
    223 
    224     /* Gather Video data from page: */
    225     displayData.m_iCurrentVRAM = m_pEditorVideoMemorySize->value();
    226     displayData.m_cGuestScreenCount = m_pEditorVideoScreenCount->value();
    227     displayData.m_f3dAccelerationEnabled = m_pCheckbox3D->isChecked();
    228 #ifdef VBOX_WITH_VIDEOHWACCEL
    229     displayData.m_f2dAccelerationEnabled = m_pCheckbox2DVideo->isChecked();
    230 #endif /* VBOX_WITH_VIDEOHWACCEL */
    231 
    232     /* If Remote Display server is supported: */
    233     if (displayData.m_fRemoteDisplayServerSupported)
    234     {
    235         /* Gather Remote Display data from page: */
    236         displayData.m_fRemoteDisplayServerEnabled = m_pCheckboxRemoteDisplay->isChecked();
    237         displayData.m_strRemoteDisplayPort = m_pEditorRemoteDisplayPort->text();
    238         displayData.m_remoteDisplayAuthType = gpConverter->fromString<KAuthType>(m_pComboRemoteDisplayAuthMethod->currentText());
    239         displayData.m_uRemoteDisplayTimeout = m_pEditorRemoteDisplayTimeout->text().toULong();
    240         displayData.m_fRemoteDisplayMultiConnAllowed = m_pCheckboxMultipleConn->isChecked();
    241     }
    242 
    243     /* Gather Video Capture data from page: */
    244     displayData.m_fVideoCaptureEnabled = m_pCheckboxVideoCapture->isChecked();
    245     displayData.m_strVideoCaptureFilePath = m_pEditorVideoCapturePath->path();
    246     displayData.m_iVideoCaptureFrameWidth = m_pEditorVideoCaptureWidth->value();
    247     displayData.m_iVideoCaptureFrameHeight = m_pEditorVideoCaptureHeight->value();
    248     displayData.m_iVideoCaptureFrameRate = m_pEditorVideoCaptureFrameRate->value();
    249     displayData.m_iVideoCaptureBitRate = m_pEditorVideoCaptureBitRate->value();
    250     displayData.m_screens = m_pScrollerVideoCaptureScreens->value();
    251 
    252     /* Gather Machine Window data from page: */
    253     displayData.m_dScaleFactor = (double)m_pEditorGuestScreenScale->value() / 100;
    254 #ifdef Q_WS_MAC
    255     displayData.m_fUseUnscaledHiDPIOutput = m_pCheckBoxUnscaledHiDPIOutput->isChecked();
    256 #endif /* Q_WS_MAC */
    257     displayData.m_fShowMiniToolBar = m_pCheckBoxShowMiniToolBar->isChecked();
    258     displayData.m_fMiniToolBarAtTop = m_pComboToolBarAlignment->isChecked();
    259 
    260     /* Cache display data: */
    261     m_cache.cacheCurrentData(displayData);
    262 }
    263 
    264 /* Save data from cache to corresponding external object(s),
    265  * this task COULD be performed in other than GUI thread: */
    266 void UIMachineSettingsDisplay::saveFromCacheTo(QVariant &data)
    267 {
    268     /* Fetch data to machine: */
    269     UISettingsPageMachine::fetchData(data);
    270 
    271     /* Make sure machine is in valid mode & display data was changed: */
    272     if (isMachineInValidMode() && m_cache.wasChanged())
    273     {
    274         /* Get display data from cache: */
    275         const UIDataSettingsMachineDisplay &displayData = m_cache.data();
    276 
    277         /* Make sure machine is 'offline': */
    278         if (isMachineOffline())
    279         {
    280             /* Store Video data: */
    281             m_machine.SetVRAMSize(displayData.m_iCurrentVRAM);
    282             m_machine.SetMonitorCount(displayData.m_cGuestScreenCount);
    283             m_machine.SetAccelerate3DEnabled(displayData.m_f3dAccelerationEnabled);
    284 #ifdef VBOX_WITH_VIDEOHWACCEL
    285             m_machine.SetAccelerate2DVideoEnabled(displayData.m_f2dAccelerationEnabled);
    286 #endif /* VBOX_WITH_VIDEOHWACCEL */
    287         }
    288 
    289         /* Check if Remote Display server still valid: */
    290         CVRDEServer remoteDisplayServer = m_machine.GetVRDEServer();
    291         if (!remoteDisplayServer.isNull())
    292         {
    293             /* Store Remote Display data: */
    294             remoteDisplayServer.SetEnabled(displayData.m_fRemoteDisplayServerEnabled);
    295             remoteDisplayServer.SetVRDEProperty("TCP/Ports", displayData.m_strRemoteDisplayPort);
    296             remoteDisplayServer.SetAuthType(displayData.m_remoteDisplayAuthType);
    297             remoteDisplayServer.SetAuthTimeout(displayData.m_uRemoteDisplayTimeout);
    298             /* Make sure machine is 'offline' or 'saved': */
    299             if (isMachineOffline() || isMachineSaved())
    300                 remoteDisplayServer.SetAllowMultiConnection(displayData.m_fRemoteDisplayMultiConnAllowed);
    301         }
    302 
    303         /* Store Video Capture data: */
    304         if (isMachineOnline())
    305         {
    306             /* If Video Capture is *enabled* now: */
    307             if (m_cache.base().m_fVideoCaptureEnabled)
    308             {
    309                 /* We can still save the *screens* option: */
    310                 m_machine.SetVideoCaptureScreens(displayData.m_screens);
    311                 /* Finally we should *disable* Video Capture if necessary: */
    312                 if (!displayData.m_fVideoCaptureEnabled)
    313                     m_machine.SetVideoCaptureEnabled(displayData.m_fVideoCaptureEnabled);
    314             }
    315             /* If Video Capture is *disabled* now: */
    316             else
    317             {
    318                 /* We should save all the options *before* Video Capture activation: */
    319                 m_machine.SetVideoCaptureFile(displayData.m_strVideoCaptureFilePath);
    320                 m_machine.SetVideoCaptureWidth(displayData.m_iVideoCaptureFrameWidth);
    321                 m_machine.SetVideoCaptureHeight(displayData.m_iVideoCaptureFrameHeight);
    322                 m_machine.SetVideoCaptureFPS(displayData.m_iVideoCaptureFrameRate);
    323                 m_machine.SetVideoCaptureRate(displayData.m_iVideoCaptureBitRate);
    324                 m_machine.SetVideoCaptureScreens(displayData.m_screens);
    325                 /* Finally we should *enable* Video Capture if necessary: */
    326                 if (displayData.m_fVideoCaptureEnabled)
    327                     m_machine.SetVideoCaptureEnabled(displayData.m_fVideoCaptureEnabled);
    328             }
    329         }
    330         else
    331         {
    332             /* For 'offline' and 'saved' states the order is irrelevant: */
    333             m_machine.SetVideoCaptureEnabled(displayData.m_fVideoCaptureEnabled);
    334             m_machine.SetVideoCaptureFile(displayData.m_strVideoCaptureFilePath);
    335             m_machine.SetVideoCaptureWidth(displayData.m_iVideoCaptureFrameWidth);
    336             m_machine.SetVideoCaptureHeight(displayData.m_iVideoCaptureFrameHeight);
    337             m_machine.SetVideoCaptureFPS(displayData.m_iVideoCaptureFrameRate);
    338             m_machine.SetVideoCaptureRate(displayData.m_iVideoCaptureBitRate);
    339             m_machine.SetVideoCaptureScreens(displayData.m_screens);
    340         }
    341 
    342         /* Store Machine Window data: */
    343         if (isMachineInValidMode())
    344         {
    345             gEDataManager->setScaleFactor(displayData.m_dScaleFactor, m_machine.GetId());
    346 #ifdef Q_WS_MAC
    347             gEDataManager->setUseUnscaledHiDPIOutput(displayData.m_fUseUnscaledHiDPIOutput, m_machine.GetId());
    348 #endif /* Q_WS_MAC */
    349             gEDataManager->setMiniToolbarEnabled(displayData.m_fShowMiniToolBar, m_machine.GetId());
    350             gEDataManager->setMiniToolbarAlignment(displayData.m_fMiniToolBarAtTop ? Qt::AlignTop : Qt::AlignBottom, m_machine.GetId());
    351         }
    352     }
    353 
    354     /* Upload machine to data: */
    355     UISettingsPageMachine::uploadData(data);
    356 }
    357 
    358 bool UIMachineSettingsDisplay::validate(QList<UIValidationMessage> &messages)
    359 {
    360     /* Check if video RAM requirement changed first: */
    361     checkVRAMRequirements();
    362 
    363     /* Pass by default: */
    364     bool fPass = true;
    365 
    366     /* Video tab: */
    367     {
    368         /* Prepare message: */
    369         UIValidationMessage message;
    370         message.first = VBoxGlobal::removeAccelMark(m_pTabWidget->tabText(0));
    371 
    372         /* 3D acceleration test: */
    373         if (m_pCheckbox3D->isChecked() && !vboxGlobal().is3DAvailable())
    374         {
    375             message.second << tr("The virtual machine is set up to use hardware graphics acceleration. "
    376                                  "However the host system does not currently provide this, "
    377                                  "so you will not be able to start the machine.");
    378         }
    379 
    380         /* Video RAM amount test: */
    381         if (shouldWeWarnAboutLowVideoMemory() && !m_guestOSType.isNull())
    382         {
    383             quint64 uNeedBytes = VBoxGlobal::requiredVideoMemory(m_guestOSType.GetId(), m_pEditorVideoScreenCount->value());
    384 
    385             /* Basic video RAM amount test: */
    386             if ((quint64)m_pEditorVideoMemorySize->value() * _1M < uNeedBytes)
    387             {
    388                 message.second << tr("The virtual machine is currently assigned less than <b>%1</b> of video memory "
    389                                      "which is the minimum amount required to switch to fullscreen or seamless mode.")
    390                                      .arg(vboxGlobal().formatSize(uNeedBytes, 0, FormatSize_RoundUp));
    391             }
    392 #ifdef VBOX_WITH_VIDEOHWACCEL
    393             /* 2D acceleration video RAM amount test: */
    394             else if (m_pCheckbox2DVideo->isChecked() && m_f2DVideoAccelerationSupported)
    395             {
    396                 uNeedBytes += VBoxGlobal::required2DOffscreenVideoMemory();
    397                 if ((quint64)m_pEditorVideoMemorySize->value() * _1M < uNeedBytes)
    398                 {
    399                     message.second << tr("The virtual machine is currently assigned less than <b>%1</b> of video memory "
    400                                          "which is the minimum amount required for High Definition Video to be played efficiently.")
    401                                          .arg(vboxGlobal().formatSize(uNeedBytes, 0, FormatSize_RoundUp));
    402                 }
    403             }
    404 #endif /* VBOX_WITH_VIDEOHWACCEL */
    405 #if 0
    406 # ifdef VBOX_WITH_CRHGSMI
    407             /* 3D acceleration video RAM amount test: */
    408             else if (m_pCheckbox3D->isChecked() && m_fWddmModeSupported)
    409             {
    410                 int cGuestScreenCount = m_pEditorVideoScreenCount->value();
    411                 uNeedBytes += VBoxGlobal::required3DWddmOffscreenVideoMemory(m_guestOSType.GetId(), cGuestScreenCount);
    412                 uNeedBytes = qMax(uNeedBytes, 128 * _1M);
    413                 uNeedBytes = qMin(uNeedBytes, 256 * _1M);
    414                 if ((quint64)m_pEditorVideoMemorySize->value() * _1M < uNeedBytes)
    415                 {
    416                     message.second << tr("The virtual machine is set up to use hardware graphics acceleration "
    417                                          "and the operating system hint is set to Windows Vista or later. "
    418                                          "For best performance you should set the machine's video memory to at least b>%1</b>.")
    419                                          .arg(vboxGlobal().formatSize(uNeedBytes, 0, FormatSize_RoundUp));
    420                 }
    421             }
    422 # endif /* VBOX_WITH_CRHGSMI */
    423 #endif /* 0 */
    424         }
    425 
    426 #ifdef VBOX_WITH_VIDEOHWACCEL
    427         /* 2D video acceleration is available for Windows guests only: */
    428         if (m_pCheckbox2DVideo->isChecked() && !m_f2DVideoAccelerationSupported)
    429         {
    430             message.second << tr("The virtual machine is set up to use Video Stream Acceleration. "
    431                                  "As this feature only works with Windows guest systems it will be disabled.");
    432         }
    433 #endif /* VBOX_WITH_VIDEOHWACCEL */
    434 
    435         /* Serialize message: */
    436         if (!message.second.isEmpty())
    437             messages << message;
    438     }
    439 
    440     /* Remote Display tab: */
    441     {
    442         /* Prepare message: */
    443         UIValidationMessage message;
    444         message.first = VBoxGlobal::removeAccelMark(m_pTabWidget->tabText(1));
    445 
    446 #ifdef VBOX_WITH_EXTPACK
    447         CExtPack extPack = vboxGlobal().virtualBox().GetExtensionPackManager().Find(GUI_ExtPackName);
    448         if (m_pCheckboxRemoteDisplay->isChecked() && (extPack.isNull() || !extPack.GetUsable()))
    449         {
    450             message.second << tr("Remote Display is currently enabled for this virtual machine. "
    451                                  "However, this requires the <b>%1</b> to be installed. "
    452                                  "Please install the Extension Pack from the VirtualBox download site as "
    453                                  "otherwise your VM will be started with Remote Display disabled.")
    454                                  .arg(GUI_ExtPackName);
    455         }
    456 #endif /* VBOX_WITH_EXTPACK */
    457 
    458         /* Check VRDE server port: */
    459         if (m_pEditorRemoteDisplayPort->text().trimmed().isEmpty())
    460         {
    461             message.second << tr("The VRDE server port value is not currently specified.");
    462             fPass = false;
    463         }
    464 
    465         /* Check VRDE server timeout: */
    466         if (m_pEditorRemoteDisplayTimeout->text().trimmed().isEmpty())
    467         {
    468             message.second << tr("The VRDE authentication timeout value is not currently specified.");
    469             fPass = false;
    470         }
    471 
    472         /* Serialize message: */
    473         if (!message.second.isEmpty())
    474             messages << message;
    475     }
    476 
    477     /* Return result: */
    478     return fPass;
    479 }
    480 
    481 void UIMachineSettingsDisplay::setOrderAfter(QWidget *pWidget)
    482 {
    483     /* Video tab-order */
    484     setTabOrder(pWidget, m_pTabWidget->focusProxy());
    485     setTabOrder(m_pTabWidget->focusProxy(), m_pSliderVideoMemorySize);
    486     setTabOrder(m_pSliderVideoMemorySize, m_pEditorVideoMemorySize);
    487     setTabOrder(m_pEditorVideoMemorySize, m_pSliderVideoScreenCount);
    488     setTabOrder(m_pSliderVideoScreenCount, m_pEditorVideoScreenCount);
    489     setTabOrder(m_pEditorVideoScreenCount, m_pCheckbox3D);
    490 #ifdef VBOX_WITH_VIDEOHWACCEL
    491     setTabOrder(m_pCheckbox3D, m_pCheckbox2DVideo);
    492     setTabOrder(m_pCheckbox2DVideo, m_pCheckboxRemoteDisplay);
    493 #else /* VBOX_WITH_VIDEOHWACCEL */
    494     setTabOrder(m_pCheckbox3D, m_pCheckboxRemoteDisplay);
    495 #endif /* !VBOX_WITH_VIDEOHWACCEL */
    496 
    497     /* Remote Display tab-order: */
    498     setTabOrder(m_pCheckboxRemoteDisplay, m_pEditorRemoteDisplayPort);
    499     setTabOrder(m_pEditorRemoteDisplayPort, m_pComboRemoteDisplayAuthMethod);
    500     setTabOrder(m_pComboRemoteDisplayAuthMethod, m_pEditorRemoteDisplayTimeout);
    501     setTabOrder(m_pEditorRemoteDisplayTimeout, m_pCheckboxMultipleConn);
    502 
    503     /* Video Capture tab-order: */
    504     setTabOrder(m_pCheckboxMultipleConn, m_pCheckboxVideoCapture);
    505     setTabOrder(m_pCheckboxVideoCapture, m_pEditorVideoCapturePath);
    506     setTabOrder(m_pEditorVideoCapturePath, m_pComboVideoCaptureSize);
    507     setTabOrder(m_pComboVideoCaptureSize, m_pEditorVideoCaptureWidth);
    508     setTabOrder(m_pEditorVideoCaptureWidth, m_pEditorVideoCaptureHeight);
    509     setTabOrder(m_pEditorVideoCaptureHeight, m_pSliderVideoCaptureFrameRate);
    510     setTabOrder(m_pSliderVideoCaptureFrameRate, m_pEditorVideoCaptureFrameRate);
    511     setTabOrder(m_pEditorVideoCaptureFrameRate, m_pSliderVideoCaptureQuality);
    512     setTabOrder(m_pSliderVideoCaptureQuality, m_pEditorVideoCaptureBitRate);
    513 
    514     /* Machine Window tab-order: */
    515     setTabOrder(m_pEditorVideoCaptureBitRate, m_pSliderGuestScreenScale);
     143void UIMachineSettingsInterface::setOrderAfter(QWidget *pWidget)
     144{
     145    /* Tab-order: */
     146    setTabOrder(pWidget, m_pSliderGuestScreenScale);
    516147    setTabOrder(m_pSliderGuestScreenScale, m_pEditorGuestScreenScale);
    517148    setTabOrder(m_pEditorGuestScreenScale, m_pCheckBoxUnscaledHiDPIOutput);
     
    520151}
    521152
    522 void UIMachineSettingsDisplay::retranslateUi()
    523 {
    524     /* Translate uic generated strings */
    525     Ui::UIMachineSettingsDisplay::retranslateUi(this);
    526 
    527     /* Video stuff: */
    528     CSystemProperties sys = vboxGlobal().virtualBox().GetSystemProperties();
    529     m_pLabelVideoMemorySizeMin->setText(tr("<qt>%1&nbsp;MB</qt>").arg(m_iMinVRAM));
    530     m_pLabelVideoMemorySizeMax->setText(tr("<qt>%1&nbsp;MB</qt>").arg(m_iMaxVRAMVisible));
    531     m_pLabelVideoScreenCountMin->setText(tr("<qt>%1</qt>").arg(1));
    532     m_pLabelVideoScreenCountMax->setText(tr("<qt>%1</qt>").arg(qMin(sys.GetMaxGuestMonitors(), (ULONG)8)));
    533 
    534     /* Remote Display stuff: */
    535     m_pComboRemoteDisplayAuthMethod->setItemText(0, gpConverter->toString(KAuthType_Null));
    536     m_pComboRemoteDisplayAuthMethod->setItemText(1, gpConverter->toString(KAuthType_External));
    537     m_pComboRemoteDisplayAuthMethod->setItemText(2, gpConverter->toString(KAuthType_Guest));
    538 
    539     /* Video Capture stuff: */
    540     m_pComboVideoCaptureSize->setItemText(0, tr("User Defined"));
    541     m_pLabelVideoCaptureFrameRateMin->setText(tr("%1 fps").arg(m_pSliderVideoCaptureFrameRate->minimum()));
    542     m_pLabelVideoCaptureFrameRateMax->setText(tr("%1 fps").arg(m_pSliderVideoCaptureFrameRate->maximum()));
    543     m_pLabelVideoCaptureFrameRateUnits->setText(tr("fps"));
    544     m_pLabelVideoCaptureQualityMin->setText(tr("low", "quality"));
    545     m_pLabelVideoCaptureQualityMed->setText(tr("medium", "quality"));
    546     m_pLabelVideoCaptureQualityMax->setText(tr("high", "quality"));
    547     m_pLabelVideoCaptureBitRateUnits->setText(tr("kbps"));
    548 
    549     updateVideoCaptureSizeHint();
    550 }
    551 
    552 void UIMachineSettingsDisplay::polishPage()
    553 {
    554     /* Get system data from cache: */
    555     const UIDataSettingsMachineDisplay &displayData = m_cache.base();
    556 
    557     /* Video tab: */
    558     m_pContainerVideo->setEnabled(isMachineOffline());
    559 #ifdef VBOX_WITH_VIDEOHWACCEL
    560     m_pCheckbox2DVideo->setEnabled(VBoxGlobal::isAcceleration2DVideoAvailable());
    561 #endif /* VBOX_WITH_VIDEOHWACCEL */
    562 
    563     /* Remote Display tab: */
    564     m_pTabWidget->setTabEnabled(1, displayData.m_fRemoteDisplayServerSupported);
    565     m_pContainerRemoteDisplay->setEnabled(isMachineInValidMode());
    566     m_pContainerRemoteDisplayOptions->setEnabled(m_pCheckboxRemoteDisplay->isChecked());
    567     m_pLabelRemoteDisplayOptions->setEnabled(isMachineOffline() || isMachineSaved());
    568     m_pCheckboxMultipleConn->setEnabled(isMachineOffline() || isMachineSaved());
    569 
    570     /* Video Capture tab: */
    571     m_pContainerVideoCapture->setEnabled(isMachineInValidMode());
    572     sltHandleVideoCaptureCheckboxToggle();
    573 
    574     /* Machine-window tab: */
     153void UIMachineSettingsInterface::retranslateUi()
     154{
     155    /* Translate uic generated strings: */
     156    Ui::UIMachineSettingsInterface::retranslateUi(this);
     157}
     158
     159void UIMachineSettingsInterface::polishPage()
     160{
     161    /* Polish interface availability: */
    575162    m_pMenuBarEditor->setEnabled(isMachineInValidMode());
    576163    m_pLabelGuestScreenScale->setEnabled(isMachineInValidMode());
     
    592179}
    593180
    594 void UIMachineSettingsDisplay::sltHandleVideoMemorySizeSliderChange()
    595 {
    596     /* Apply proposed memory-size: */
    597     m_pEditorVideoMemorySize->blockSignals(true);
    598     m_pEditorVideoMemorySize->setValue(m_pSliderVideoMemorySize->value());
    599     m_pEditorVideoMemorySize->blockSignals(false);
    600 
    601     /* Revalidate: */
    602     revalidate();
    603 }
    604 
    605 void UIMachineSettingsDisplay::sltHandleVideoMemorySizeEditorChange()
    606 {
    607     /* Apply proposed memory-size: */
    608     m_pSliderVideoMemorySize->blockSignals(true);
    609     m_pSliderVideoMemorySize->setValue(m_pEditorVideoMemorySize->value());
    610     m_pSliderVideoMemorySize->blockSignals(false);
    611 
    612     /* Revalidate: */
    613     revalidate();
    614 }
    615 
    616 void UIMachineSettingsDisplay::sltHandleVideoScreenCountSliderChange()
    617 {
    618     /* Apply proposed screen-count: */
    619     m_pEditorVideoScreenCount->blockSignals(true);
    620     m_pEditorVideoScreenCount->setValue(m_pSliderVideoScreenCount->value());
    621     m_pEditorVideoScreenCount->blockSignals(false);
    622 
    623     /* Update Video RAM requirements: */
    624     checkVRAMRequirements();
    625 
    626     /* Update Video Capture tab screen count: */
    627     updateVideoCaptureScreenCount();
    628 
    629     /* Revalidate: */
    630     revalidate();
    631 }
    632 
    633 void UIMachineSettingsDisplay::sltHandleVideoScreenCountEditorChange()
    634 {
    635     /* Apply proposed screen-count: */
    636     m_pSliderVideoScreenCount->blockSignals(true);
    637     m_pSliderVideoScreenCount->setValue(m_pEditorVideoScreenCount->value());
    638     m_pSliderVideoScreenCount->blockSignals(false);
    639 
    640     /* Update Video RAM requirements: */
    641     checkVRAMRequirements();
    642 
    643     /* Update Video Capture tab screen count: */
    644     updateVideoCaptureScreenCount();
    645 
    646     /* Revalidate: */
    647     revalidate();
    648 }
    649 
    650 void UIMachineSettingsDisplay::sltHandleVideoCaptureCheckboxToggle()
    651 {
    652     /* Video Capture options should be enabled only if:
    653      * 1. Machine is in 'offline' or 'saved' state and check-box is checked,
    654      * 2. Machine is in 'online' state, check-box is checked, and video recording is *disabled* currently. */
    655     bool fIsVideoCaptureOptionsEnabled = ((isMachineOffline() || isMachineSaved()) && m_pCheckboxVideoCapture->isChecked()) ||
    656                                          (isMachineOnline() && !m_cache.base().m_fVideoCaptureEnabled && m_pCheckboxVideoCapture->isChecked());
    657 
    658     /* Video Capture Screens option should be enabled only if:
    659      * Machine is in *any* valid state and check-box is checked. */
    660     bool fIsVideoCaptureScreenOptionEnabled = isMachineInValidMode() && m_pCheckboxVideoCapture->isChecked();
    661 
    662     m_pLabelVideoCapturePath->setEnabled(fIsVideoCaptureOptionsEnabled);
    663     m_pEditorVideoCapturePath->setEnabled(fIsVideoCaptureOptionsEnabled);
    664 
    665     m_pLabelVideoCaptureSize->setEnabled(fIsVideoCaptureOptionsEnabled);
    666     m_pComboVideoCaptureSize->setEnabled(fIsVideoCaptureOptionsEnabled);
    667     m_pEditorVideoCaptureWidth->setEnabled(fIsVideoCaptureOptionsEnabled);
    668     m_pEditorVideoCaptureHeight->setEnabled(fIsVideoCaptureOptionsEnabled);
    669 
    670     m_pLabelVideoCaptureFrameRate->setEnabled(fIsVideoCaptureOptionsEnabled);
    671     m_pContainerSliderVideoCaptureFrameRate->setEnabled(fIsVideoCaptureOptionsEnabled);
    672     m_pEditorVideoCaptureFrameRate->setEnabled(fIsVideoCaptureOptionsEnabled);
    673     m_pLabelVideoCaptureFrameRateUnits->setEnabled(fIsVideoCaptureOptionsEnabled);
    674 
    675     m_pLabelVideoCaptureRate->setEnabled(fIsVideoCaptureOptionsEnabled);
    676     m_pContainerSliderVideoCaptureQuality->setEnabled(fIsVideoCaptureOptionsEnabled);
    677     m_pEditorVideoCaptureBitRate->setEnabled(fIsVideoCaptureOptionsEnabled);
    678     m_pLabelVideoCaptureBitRateUnits->setEnabled(fIsVideoCaptureOptionsEnabled);
    679 
    680     m_pLabelVideoCaptureScreens->setEnabled(fIsVideoCaptureScreenOptionEnabled);
    681     m_pLabelVideoCaptureSizeHint->setEnabled(fIsVideoCaptureScreenOptionEnabled);
    682     m_pScrollerVideoCaptureScreens->setEnabled(fIsVideoCaptureScreenOptionEnabled);
    683 }
    684 
    685 void UIMachineSettingsDisplay::sltHandleVideoCaptureFrameSizeComboboxChange()
    686 {
    687     /* Get the proposed size: */
    688     int iCurrentIndex = m_pComboVideoCaptureSize->currentIndex();
    689     QSize videoCaptureSize = m_pComboVideoCaptureSize->itemData(iCurrentIndex).toSize();
    690 
    691     /* Make sure its valid: */
    692     if (!videoCaptureSize.isValid())
    693         return;
    694 
    695     /* Apply proposed size: */
    696     m_pEditorVideoCaptureWidth->setValue(videoCaptureSize.width());
    697     m_pEditorVideoCaptureHeight->setValue(videoCaptureSize.height());
    698 }
    699 
    700 void UIMachineSettingsDisplay::sltHandleVideoCaptureFrameWidthEditorChange()
    701 {
    702     /* Look for preset: */
    703     lookForCorrespondingSizePreset();
    704     /* Update quality and bit-rate: */
    705     sltHandleVideoCaptureQualitySliderChange();
    706 }
    707 
    708 void UIMachineSettingsDisplay::sltHandleVideoCaptureFrameHeightEditorChange()
    709 {
    710     /* Look for preset: */
    711     lookForCorrespondingSizePreset();
    712     /* Update quality and bit-rate: */
    713     sltHandleVideoCaptureQualitySliderChange();
    714 }
    715 
    716 void UIMachineSettingsDisplay::sltHandleVideoCaptureFrameRateSliderChange()
    717 {
    718     /* Apply proposed frame-rate: */
    719     m_pEditorVideoCaptureFrameRate->blockSignals(true);
    720     m_pEditorVideoCaptureFrameRate->setValue(m_pSliderVideoCaptureFrameRate->value());
    721     m_pEditorVideoCaptureFrameRate->blockSignals(false);
    722     /* Update quality and bit-rate: */
    723     sltHandleVideoCaptureQualitySliderChange();
    724 }
    725 
    726 void UIMachineSettingsDisplay::sltHandleVideoCaptureFrameRateEditorChange()
    727 {
    728     /* Apply proposed frame-rate: */
    729     m_pSliderVideoCaptureFrameRate->blockSignals(true);
    730     m_pSliderVideoCaptureFrameRate->setValue(m_pEditorVideoCaptureFrameRate->value());
    731     m_pSliderVideoCaptureFrameRate->blockSignals(false);
    732     /* Update quality and bit-rate: */
    733     sltHandleVideoCaptureQualitySliderChange();
    734 }
    735 
    736 void UIMachineSettingsDisplay::sltHandleVideoCaptureQualitySliderChange()
    737 {
    738     /* Calculate/apply proposed bit-rate: */
    739     m_pEditorVideoCaptureBitRate->blockSignals(true);
    740     m_pEditorVideoCaptureBitRate->setValue(calculateBitRate(m_pEditorVideoCaptureWidth->value(),
    741                                                             m_pEditorVideoCaptureHeight->value(),
    742                                                             m_pEditorVideoCaptureFrameRate->value(),
    743                                                             m_pSliderVideoCaptureQuality->value()));
    744     m_pEditorVideoCaptureBitRate->blockSignals(false);
    745     updateVideoCaptureSizeHint();
    746 }
    747 
    748 void UIMachineSettingsDisplay::sltHandleVideoCaptureBitRateEditorChange()
    749 {
    750     /* Calculate/apply proposed quality: */
    751     m_pSliderVideoCaptureQuality->blockSignals(true);
    752     m_pSliderVideoCaptureQuality->setValue(calculateQuality(m_pEditorVideoCaptureWidth->value(),
    753                                                             m_pEditorVideoCaptureHeight->value(),
    754                                                             m_pEditorVideoCaptureFrameRate->value(),
    755                                                             m_pEditorVideoCaptureBitRate->value()));
    756     m_pSliderVideoCaptureQuality->blockSignals(false);
    757     updateVideoCaptureSizeHint();
    758 }
    759 
    760 void UIMachineSettingsDisplay::sltHandleGuestScreenScaleSliderChange()
     181void UIMachineSettingsInterface::sltHandleGuestScreenScaleSliderChange()
    761182{
    762183    /* Apply proposed scale-factor: */
     
    766187}
    767188
    768 void UIMachineSettingsDisplay::sltHandleGuestScreenScaleEditorChange()
     189void UIMachineSettingsInterface::sltHandleGuestScreenScaleEditorChange()
    769190{
    770191    /* Apply proposed scale-factor: */
     
    774195}
    775196
    776 void UIMachineSettingsDisplay::prepare()
     197void UIMachineSettingsInterface::prepare()
    777198{
    778199    /* Apply UI decorations: */
    779     Ui::UIMachineSettingsDisplay::setupUi(this);
    780 
    781     /* Prepare tabs: */
    782     prepareVideoTab();
    783     prepareRemoteDisplayTab();
    784     prepareVideoCaptureTab();
    785     prepareMachineWindowTab();
    786 
    787     /* Prepare validation: */
    788     prepareValidation();
    789 
    790     /* Translate finally: */
    791     retranslateUi();
    792 }
    793 
    794 void UIMachineSettingsDisplay::prepareVideoTab()
    795 {
    796     /* Prepare memory-size slider: */
    797     CSystemProperties sys = vboxGlobal().virtualBox().GetSystemProperties();
    798     m_iMinVRAM = sys.GetMinGuestVRAM();
    799     m_iMaxVRAM = sys.GetMaxGuestVRAM();
    800     m_iMaxVRAMVisible = m_iMaxVRAM;
    801     const uint cHostScreens = QApplication::desktop()->screenCount();
    802     m_pSliderVideoMemorySize->setMinimum(m_iMinVRAM);
    803     m_pSliderVideoMemorySize->setMaximum(m_iMaxVRAMVisible);
    804     m_pSliderVideoMemorySize->setPageStep(calcPageStep(m_iMaxVRAMVisible));
    805     m_pSliderVideoMemorySize->setSingleStep(m_pSliderVideoMemorySize->pageStep() / 4);
    806     m_pSliderVideoMemorySize->setTickInterval(m_pSliderVideoMemorySize->pageStep());
    807     m_pSliderVideoMemorySize->setSnappingEnabled(true);
    808     m_pSliderVideoMemorySize->setErrorHint(0, 1);
    809     connect(m_pSliderVideoMemorySize, SIGNAL(valueChanged(int)), this, SLOT(sltHandleVideoMemorySizeSliderChange()));
    810 
    811     /* Prepare memory-size editor: */
    812     vboxGlobal().setMinimumWidthAccordingSymbolCount(m_pEditorVideoMemorySize, 4);
    813     m_pEditorVideoMemorySize->setMinimum(m_iMinVRAM);
    814     m_pEditorVideoMemorySize->setMaximum(m_iMaxVRAMVisible);
    815     connect(m_pEditorVideoMemorySize, SIGNAL(valueChanged(int)), this, SLOT(sltHandleVideoMemorySizeEditorChange()));
    816 
    817     /* Prepare screen-count slider: */
    818     const uint cMinGuestScreens = 1;
    819     const uint cMaxGuestScreens = sys.GetMaxGuestMonitors();
    820     const uint cMaxGuestScreensForSlider = qMin(cMaxGuestScreens, (uint)8);
    821     m_pSliderVideoScreenCount->setMinimum(cMinGuestScreens);
    822     m_pSliderVideoScreenCount->setMaximum(cMaxGuestScreensForSlider);
    823     m_pSliderVideoScreenCount->setPageStep(1);
    824     m_pSliderVideoScreenCount->setSingleStep(1);
    825     m_pSliderVideoScreenCount->setTickInterval(1);
    826     m_pSliderVideoScreenCount->setOptimalHint(cMinGuestScreens, cHostScreens);
    827     m_pSliderVideoScreenCount->setWarningHint(cHostScreens, cMaxGuestScreensForSlider);
    828     connect(m_pSliderVideoScreenCount, SIGNAL(valueChanged(int)), this, SLOT(sltHandleVideoScreenCountSliderChange()));
    829 
    830     /* Prepare screen-count editor: */
    831     vboxGlobal().setMinimumWidthAccordingSymbolCount(m_pEditorVideoScreenCount, 3);
    832     m_pEditorVideoScreenCount->setMinimum(1);
    833     m_pEditorVideoScreenCount->setMaximum(cMaxGuestScreens);
    834     connect(m_pEditorVideoScreenCount, SIGNAL(valueChanged(int)), this, SLOT(sltHandleVideoScreenCountEditorChange()));
    835 
    836 #ifndef VBOX_WITH_VIDEOHWACCEL
    837     /* Hide check-box if not supported: */
    838     m_pCheckbox2DVideo->setVisible(false);
    839 #endif /* VBOX_WITH_VIDEOHWACCEL */
    840 }
    841 
    842 void UIMachineSettingsDisplay::prepareRemoteDisplayTab()
    843 {
    844     /* Setup validators: */
    845     m_pEditorRemoteDisplayPort->setValidator(new QRegExpValidator(QRegExp("(([0-9]{1,5}(\\-[0-9]{1,5}){0,1}),)*([0-9]{1,5}(\\-[0-9]{1,5}){0,1})"), this));
    846     m_pEditorRemoteDisplayTimeout->setValidator(new QIntValidator(this));
    847 
    848     /* Prepare auth-method combo: */
    849     m_pComboRemoteDisplayAuthMethod->insertItem(0, ""); /* KAuthType_Null */
    850     m_pComboRemoteDisplayAuthMethod->insertItem(1, ""); /* KAuthType_External */
    851     m_pComboRemoteDisplayAuthMethod->insertItem(2, ""); /* KAuthType_Guest */
    852 }
    853 
    854 void UIMachineSettingsDisplay::prepareVideoCaptureTab()
    855 {
    856     /* Prepare Video Capture checkbox: */
    857     connect(m_pCheckboxVideoCapture, SIGNAL(toggled(bool)), this, SLOT(sltHandleVideoCaptureCheckboxToggle()));
    858 
    859     /* Prepare filepath selector: */
    860     m_pEditorVideoCapturePath->setEditable(false);
    861     m_pEditorVideoCapturePath->setMode(VBoxFilePathSelectorWidget::Mode_File_Save);
    862 
    863     /* Prepare frame-size combo-box: */
    864     m_pComboVideoCaptureSize->addItem(""); /* User Defined */
    865     m_pComboVideoCaptureSize->addItem("320 x 200 (16:10)",   QSize(320, 200));
    866     m_pComboVideoCaptureSize->addItem("640 x 480 (4:3)",     QSize(640, 480));
    867     m_pComboVideoCaptureSize->addItem("720 x 400 (9:5)",     QSize(720, 400));
    868     m_pComboVideoCaptureSize->addItem("720 x 480 (3:2)",     QSize(720, 480));
    869     m_pComboVideoCaptureSize->addItem("800 x 600 (4:3)",     QSize(800, 600));
    870     m_pComboVideoCaptureSize->addItem("1024 x 768 (4:3)",    QSize(1024, 768));
    871     m_pComboVideoCaptureSize->addItem("1280 x 720 (16:9)",   QSize(1280, 720));
    872     m_pComboVideoCaptureSize->addItem("1280 x 800 (16:10)",  QSize(1280, 800));
    873     m_pComboVideoCaptureSize->addItem("1280 x 960 (4:3)",    QSize(1280, 960));
    874     m_pComboVideoCaptureSize->addItem("1280 x 1024 (5:4)",   QSize(1280, 1024));
    875     m_pComboVideoCaptureSize->addItem("1366 x 768 (16:9)",   QSize(1366, 768));
    876     m_pComboVideoCaptureSize->addItem("1440 x 900 (16:10)",  QSize(1440, 900));
    877     m_pComboVideoCaptureSize->addItem("1440 x 1080 (4:3)",   QSize(1440, 1080));
    878     m_pComboVideoCaptureSize->addItem("1600 x 900 (16:9)",   QSize(1600, 900));
    879     m_pComboVideoCaptureSize->addItem("1680 x 1050 (16:10)", QSize(1680, 1050));
    880     m_pComboVideoCaptureSize->addItem("1600 x 1200 (4:3)",   QSize(1600, 1200));
    881     m_pComboVideoCaptureSize->addItem("1920 x 1080 (16:9)",  QSize(1920, 1080));
    882     m_pComboVideoCaptureSize->addItem("1920 x 1200 (16:10)", QSize(1920, 1200));
    883     m_pComboVideoCaptureSize->addItem("1920 x 1440 (4:3)",   QSize(1920, 1440));
    884     connect(m_pComboVideoCaptureSize, SIGNAL(currentIndexChanged(int)), this, SLOT(sltHandleVideoCaptureFrameSizeComboboxChange()));
    885 
    886     /* Prepare frame-width/height editors: */
    887     vboxGlobal().setMinimumWidthAccordingSymbolCount(m_pEditorVideoCaptureWidth, 5);
    888     vboxGlobal().setMinimumWidthAccordingSymbolCount(m_pEditorVideoCaptureHeight, 5);
    889     m_pEditorVideoCaptureWidth->setMinimum(16);
    890     m_pEditorVideoCaptureWidth->setMaximum(1920);
    891     m_pEditorVideoCaptureHeight->setMinimum(16);
    892     m_pEditorVideoCaptureHeight->setMaximum(1440);
    893     connect(m_pEditorVideoCaptureWidth, SIGNAL(valueChanged(int)), this, SLOT(sltHandleVideoCaptureFrameWidthEditorChange()));
    894     connect(m_pEditorVideoCaptureHeight, SIGNAL(valueChanged(int)), this, SLOT(sltHandleVideoCaptureFrameHeightEditorChange()));
    895 
    896     /* Prepare frame-rate slider: */
    897     m_pSliderVideoCaptureFrameRate->setMinimum(1);
    898     m_pSliderVideoCaptureFrameRate->setMaximum(30);
    899     m_pSliderVideoCaptureFrameRate->setPageStep(1);
    900     m_pSliderVideoCaptureFrameRate->setSingleStep(1);
    901     m_pSliderVideoCaptureFrameRate->setTickInterval(1);
    902     m_pSliderVideoCaptureFrameRate->setSnappingEnabled(true);
    903     m_pSliderVideoCaptureFrameRate->setOptimalHint(1, 25);
    904     m_pSliderVideoCaptureFrameRate->setWarningHint(25, 30);
    905     connect(m_pSliderVideoCaptureFrameRate, SIGNAL(valueChanged(int)), this, SLOT(sltHandleVideoCaptureFrameRateSliderChange()));
    906 
    907     /* Prepare frame-rate editor: */
    908     vboxGlobal().setMinimumWidthAccordingSymbolCount(m_pEditorVideoCaptureFrameRate, 3);
    909     m_pEditorVideoCaptureFrameRate->setMinimum(1);
    910     m_pEditorVideoCaptureFrameRate->setMaximum(30);
    911     connect(m_pEditorVideoCaptureFrameRate, SIGNAL(valueChanged(int)), this, SLOT(sltHandleVideoCaptureFrameRateEditorChange()));
    912 
    913     /* Prepare quality combo-box: */
    914     m_pContainerLayoutSliderVideoCaptureQuality->setColumnStretch(1, 4);
    915     m_pContainerLayoutSliderVideoCaptureQuality->setColumnStretch(3, 5);
    916     m_pSliderVideoCaptureQuality->setMinimum(1);
    917     m_pSliderVideoCaptureQuality->setMaximum(10);
    918     m_pSliderVideoCaptureQuality->setPageStep(1);
    919     m_pSliderVideoCaptureQuality->setSingleStep(1);
    920     m_pSliderVideoCaptureQuality->setTickInterval(1);
    921     m_pSliderVideoCaptureQuality->setSnappingEnabled(true);
    922     m_pSliderVideoCaptureQuality->setOptimalHint(1, 5);
    923     m_pSliderVideoCaptureQuality->setWarningHint(5, 9);
    924     m_pSliderVideoCaptureQuality->setErrorHint(9, 10);
    925     connect(m_pSliderVideoCaptureQuality, SIGNAL(valueChanged(int)), this, SLOT(sltHandleVideoCaptureQualitySliderChange()));
    926 
    927     /* Prepare bit-rate editor: */
    928     vboxGlobal().setMinimumWidthAccordingSymbolCount(m_pEditorVideoCaptureBitRate, 5);
    929     m_pEditorVideoCaptureBitRate->setMinimum(32);
    930     m_pEditorVideoCaptureBitRate->setMaximum(2048);
    931     connect(m_pEditorVideoCaptureBitRate, SIGNAL(valueChanged(int)), this, SLOT(sltHandleVideoCaptureBitRateEditorChange()));
    932 }
    933 
    934 void UIMachineSettingsDisplay::prepareMachineWindowTab()
    935 {
     200    Ui::UIMachineSettingsInterface::setupUi(this);
     201
    936202    /* Create personal action-pool: */
    937203    m_pActionPool = UIActionPool::create(UIActionPoolType_Runtime);
     204    m_pMenuBarEditor->setActionPool(m_pActionPool);
     205
     206    /* Assign corresponding machine ID: */
     207    m_pMenuBarEditor->setMachineID(m_strMachineID);
     208    m_pStatusBarEditor->setMachineID(m_strMachineID);
    938209
    939210    /* Prepare scale-factor slider: */
     
    951222    vboxGlobal().setMinimumWidthAccordingSymbolCount(m_pEditorGuestScreenScale, 5);
    952223    connect(m_pEditorGuestScreenScale, SIGNAL(valueChanged(int)), this, SLOT(sltHandleGuestScreenScaleEditorChange()));
    953 }
    954 
    955 void UIMachineSettingsDisplay::prepareValidation()
    956 {
    957     /* Configure validation: */
    958     connect(m_pCheckbox3D, SIGNAL(stateChanged(int)), this, SLOT(revalidate()));
    959 #ifdef VBOX_WITH_VIDEOHWACCEL
    960     connect(m_pCheckbox2DVideo, SIGNAL(stateChanged(int)), this, SLOT(revalidate()));
    961 #endif /* VBOX_WITH_VIDEOHWACCEL */
    962     connect(m_pCheckboxRemoteDisplay, SIGNAL(toggled(bool)), this, SLOT(revalidate()));
    963     connect(m_pEditorRemoteDisplayPort, SIGNAL(textChanged(const QString&)), this, SLOT(revalidate()));
    964     connect(m_pEditorRemoteDisplayTimeout, SIGNAL(textChanged(const QString&)), this, SLOT(revalidate()));
    965 }
    966 
    967 void UIMachineSettingsDisplay::cleanupMachineWindowTab()
     224
     225    /* Translate finally: */
     226    retranslateUi();
     227}
     228
     229void UIMachineSettingsInterface::cleanup()
    968230{
    969231    /* Destroy personal action-pool: */
     
    971233}
    972234
    973 void UIMachineSettingsDisplay::cleanup()
    974 {
    975     /* Cleanup tabs: */
    976     cleanupMachineWindowTab();
    977 }
    978 
    979 void UIMachineSettingsDisplay::checkVRAMRequirements()
    980 {
    981     /* Make sure guest OS type is set: */
    982     if (m_guestOSType.isNull())
    983         return;
    984 
    985     /* Get monitors count and base video memory requirements: */
    986     int cGuestScreenCount = m_pEditorVideoScreenCount->value();
    987     quint64 uNeedMBytes = VBoxGlobal::requiredVideoMemory(m_guestOSType.GetId(), cGuestScreenCount) / _1M;
    988 
    989     /* Initial value: */
    990     m_iMaxVRAMVisible = cGuestScreenCount * 32;
    991 
    992     /* No more than m_iMaxVRAM: */
    993     if (m_iMaxVRAMVisible > m_iMaxVRAM)
    994         m_iMaxVRAMVisible = m_iMaxVRAM;
    995 
    996     /* No less than 128MB (if possible): */
    997     if (m_iMaxVRAMVisible < 128 && m_iMaxVRAM >= 128)
    998         m_iMaxVRAMVisible = 128;
    999 
    1000     /* No less than initial VRAM size (wtf?): */
    1001     if (m_iMaxVRAMVisible < m_iInitialVRAM)
    1002         m_iMaxVRAMVisible = m_iInitialVRAM;
    1003 
    1004 #ifdef VBOX_WITH_VIDEOHWACCEL
    1005     if (m_pCheckbox2DVideo->isChecked() && m_f2DVideoAccelerationSupported)
    1006     {
    1007         uNeedMBytes += VBoxGlobal::required2DOffscreenVideoMemory() / _1M;
    1008     }
    1009 #endif /* VBOX_WITH_VIDEOHWACCEL */
    1010 
    1011 #ifdef VBOX_WITH_CRHGSMI
    1012     if (m_pCheckbox3D->isChecked() && m_fWddmModeSupported)
    1013     {
    1014 # if 0
    1015         uNeedMBytes += VBoxGlobal::required3DWddmOffscreenVideoMemory(m_guestOSType.GetId(), cGuestScreenCount) / _1M;
    1016         uNeedMBytes = qMax(uNeedMBytes, 128);
    1017         uNeedMBytes = qMin(uNeedMBytes, 256);
    1018 # endif
    1019         /* No less than 256MB (if possible): */
    1020         if (m_iMaxVRAMVisible < 256 && m_iMaxVRAM >= 256)
    1021             m_iMaxVRAMVisible = 256;
    1022     }
    1023 #endif /* VBOX_WITH_CRHGSMI */
    1024 
    1025     m_pEditorVideoMemorySize->setMaximum(m_iMaxVRAMVisible);
    1026     m_pSliderVideoMemorySize->setMaximum(m_iMaxVRAMVisible);
    1027     m_pSliderVideoMemorySize->setPageStep(calcPageStep(m_iMaxVRAMVisible));
    1028     m_pSliderVideoMemorySize->setWarningHint(1, qMin((int)uNeedMBytes, m_iMaxVRAMVisible));
    1029     m_pSliderVideoMemorySize->setOptimalHint(qMin((int)uNeedMBytes, m_iMaxVRAMVisible), m_iMaxVRAMVisible);
    1030     m_pLabelVideoMemorySizeMax->setText(tr("<qt>%1&nbsp;MB</qt>").arg(m_iMaxVRAMVisible));
    1031 }
    1032 
    1033 bool UIMachineSettingsDisplay::shouldWeWarnAboutLowVideoMemory()
    1034 {
    1035     bool fResult = true;
    1036 
    1037     QStringList excludingOSList = QStringList()
    1038         << "Other" << "DOS" << "Netware" << "L4" << "QNX" << "JRockitVE";
    1039     if (excludingOSList.contains(m_guestOSType.GetId()))
    1040         fResult = false;
    1041 
    1042     return fResult;
    1043 }
    1044 
    1045 /* static */
    1046 int UIMachineSettingsDisplay::calcPageStep(int iMax)
    1047 {
    1048     /* Reasonable max. number of page steps is 32. */
    1049     uint page = ((uint)iMax + 31) / 32;
    1050     /* Make it a power of 2: */
    1051     uint p = page, p2 = 0x1;
    1052     while ((p >>= 1))
    1053         p2 <<= 1;
    1054     if (page != p2)
    1055         p2 <<= 1;
    1056     if (p2 < 4)
    1057         p2 = 4;
    1058     return (int)p2;
    1059 }
    1060 
    1061 void UIMachineSettingsDisplay::lookForCorrespondingSizePreset()
    1062 {
    1063     /* Look for video-capture size preset: */
    1064     lookForCorrespondingPreset(m_pComboVideoCaptureSize,
    1065                                QSize(m_pEditorVideoCaptureWidth->value(),
    1066                                      m_pEditorVideoCaptureHeight->value()));
    1067 }
    1068 
    1069 void UIMachineSettingsDisplay::updateVideoCaptureScreenCount()
    1070 {
    1071     /* Update copy of the cached item to get the desired result: */
    1072     QVector<BOOL> screens = m_cache.base().m_screens;
    1073     screens.resize(m_pEditorVideoScreenCount->value());
    1074     m_pScrollerVideoCaptureScreens->setValue(screens);
    1075 }
    1076 
    1077 void UIMachineSettingsDisplay::updateVideoCaptureSizeHint()
    1078 {
    1079     m_pLabelVideoCaptureSizeHint->setText(tr("<i>About %1MB per 5 minute video</i>").arg(m_pEditorVideoCaptureBitRate->value() * 300 / 8 / 1024));
    1080 }
    1081 
    1082 /* static */
    1083 void UIMachineSettingsDisplay::lookForCorrespondingPreset(QComboBox *pWhere, const QVariant &whichData)
    1084 {
    1085     /* Use passed iterator to look for corresponding preset of passed combo-box: */
    1086     int iLookupResult = pWhere->findData(whichData);
    1087     if (iLookupResult != -1 && pWhere->currentIndex() != iLookupResult)
    1088         pWhere->setCurrentIndex(iLookupResult);
    1089     else if (iLookupResult == -1 && pWhere->currentIndex() != 0)
    1090         pWhere->setCurrentIndex(0);
    1091 }
    1092 
    1093 /* static */
    1094 int UIMachineSettingsDisplay::calculateBitRate(int iFrameWidth, int iFrameHeight, int iFrameRate, int iQuality)
    1095 {
    1096     /* Linear quality<=>bit-rate scale-factor: */
    1097     double dResult = (double)iQuality
    1098                    * (double)iFrameWidth * (double)iFrameHeight * (double)iFrameRate
    1099                    / (double)10 /* translate quality to [%] */
    1100                    / (double)1024 /* translate bit-rate to [kbps] */
    1101                    / (double)18.75 /* linear scale factor */;
    1102     return (int)dResult;
    1103 }
    1104 
    1105 /* static */
    1106 int UIMachineSettingsDisplay::calculateQuality(int iFrameWidth, int iFrameHeight, int iFrameRate, int iBitRate)
    1107 {
    1108     /* Linear bit-rate<=>quality scale-factor: */
    1109     double dResult = (double)iBitRate
    1110                    / (double)iFrameWidth / (double)iFrameHeight / (double)iFrameRate
    1111                    * (double)10 /* translate quality to [%] */
    1112                    * (double)1024 /* translate bit-rate to [kbps] */
    1113                    * (double)18.75 /* linear scale factor */;
    1114     return (int)dResult;
    1115 }
    1116 
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsInterface.h

    r54194 r54199  
    11/** @file
    2  * VBox Qt GUI - UIMachineSettingsDisplay class declaration.
     2 * VBox Qt GUI - UIMachineSettingsInterface class declaration.
    33 */
    44
    55/*
    6  * Copyright (C) 2008-2014 Oracle Corporation
     6 * Copyright (C) 2008-2015 Oracle Corporation
    77 *
    88 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    1515 */
    1616
    17 #ifndef __UIMachineSettingsDisplay_h__
    18 #define __UIMachineSettingsDisplay_h__
     17#ifndef ___UIMachineSettingsInterface_h___
     18#define ___UIMachineSettingsInterface_h___
    1919
    2020/* GUI includes: */
    2121#include "UISettingsPage.h"
    22 #include "UIMachineSettingsDisplay.gen.h"
    23 
    24 /* COM includes: */
    25 #include "CGuestOSType.h"
     22#include "UIMachineSettingsInterface.gen.h"
    2623
    2724/* Forward declarations: */
    2825class UIActionPool;
    2926
    30 /* Machine settings / Display page / Data: */
    31 struct UIDataSettingsMachineDisplay
     27/* Machine settings / Interface page / Data: */
     28struct UIDataSettingsMachineInterface
    3229{
    3330    /* Constructor: */
    34     UIDataSettingsMachineDisplay()
    35         : m_iCurrentVRAM(0)
    36         , m_cGuestScreenCount(0)
    37         , m_f3dAccelerationEnabled(false)
    38 #ifdef VBOX_WITH_VIDEOHWACCEL
    39         , m_f2dAccelerationEnabled(false)
    40 #endif /* VBOX_WITH_VIDEOHWACCEL */
    41         , m_fRemoteDisplayServerSupported(false)
    42         , m_fRemoteDisplayServerEnabled(false)
    43         , m_strRemoteDisplayPort(QString())
    44         , m_remoteDisplayAuthType(KAuthType_Null)
    45         , m_uRemoteDisplayTimeout(0)
    46         , m_fRemoteDisplayMultiConnAllowed(false)
    47         , m_fVideoCaptureEnabled(false)
    48         , m_strVideoCaptureFolder(QString())
    49         , m_strVideoCaptureFilePath(QString())
    50         , m_iVideoCaptureFrameWidth(0)
    51         , m_iVideoCaptureFrameHeight(0)
    52         , m_iVideoCaptureFrameRate(0)
    53         , m_iVideoCaptureBitRate(0)
    54         , m_dScaleFactor(1)
     31    UIDataSettingsMachineInterface()
     32        : m_dScaleFactor(1.0)
    5533#ifdef Q_WS_MAC
    5634        , m_fUseUnscaledHiDPIOutput(false)
     
    6139
    6240    /* Functions: */
    63     bool equal(const UIDataSettingsMachineDisplay &other) const
     41    bool equal(const UIDataSettingsMachineInterface &other) const
    6442    {
    65         return (m_iCurrentVRAM == other.m_iCurrentVRAM) &&
    66                (m_cGuestScreenCount == other.m_cGuestScreenCount) &&
    67                (m_f3dAccelerationEnabled == other.m_f3dAccelerationEnabled) &&
    68 #ifdef VBOX_WITH_VIDEOHWACCEL
    69                (m_f2dAccelerationEnabled == other.m_f2dAccelerationEnabled) &&
    70 #endif /* VBOX_WITH_VIDEOHWACCEL */
    71                (m_fRemoteDisplayServerSupported == other.m_fRemoteDisplayServerSupported) &&
    72                (m_fRemoteDisplayServerEnabled == other.m_fRemoteDisplayServerEnabled) &&
    73                (m_strRemoteDisplayPort == other.m_strRemoteDisplayPort) &&
    74                (m_remoteDisplayAuthType == other.m_remoteDisplayAuthType) &&
    75                (m_uRemoteDisplayTimeout == other.m_uRemoteDisplayTimeout) &&
    76                (m_fRemoteDisplayMultiConnAllowed == other.m_fRemoteDisplayMultiConnAllowed) &&
    77                (m_fVideoCaptureEnabled == other.m_fVideoCaptureEnabled) &&
    78                (m_strVideoCaptureFilePath == other.m_strVideoCaptureFilePath) &&
    79                (m_iVideoCaptureFrameWidth == other.m_iVideoCaptureFrameWidth) &&
    80                (m_iVideoCaptureFrameHeight == other.m_iVideoCaptureFrameHeight) &&
    81                (m_iVideoCaptureFrameRate == other.m_iVideoCaptureFrameRate) &&
    82                (m_iVideoCaptureBitRate == other.m_iVideoCaptureBitRate) &&
    83                (m_screens == other.m_screens) &&
    84                (m_dScaleFactor == other.m_dScaleFactor) &&
     43        return (m_dScaleFactor == other.m_dScaleFactor) &&
    8544#ifdef Q_WS_MAC
    8645               (m_fUseUnscaledHiDPIOutput == other.m_fUseUnscaledHiDPIOutput) &&
     
    9150
    9251    /* Operators: */
    93     bool operator==(const UIDataSettingsMachineDisplay &other) const { return equal(other); }
    94     bool operator!=(const UIDataSettingsMachineDisplay &other) const { return !equal(other); }
     52    bool operator==(const UIDataSettingsMachineInterface &other) const { return equal(other); }
     53    bool operator!=(const UIDataSettingsMachineInterface &other) const { return !equal(other); }
    9554
    96     /* Variables: Video stuff: */
    97     int m_iCurrentVRAM;
    98     int m_cGuestScreenCount;
    99     bool m_f3dAccelerationEnabled;
    100 #ifdef VBOX_WITH_VIDEOHWACCEL
    101     bool m_f2dAccelerationEnabled;
    102 #endif /* VBOX_WITH_VIDEOHWACCEL */
    103 
    104     /* Variables: Remote Display stuff: */
    105     bool m_fRemoteDisplayServerSupported;
    106     bool m_fRemoteDisplayServerEnabled;
    107     QString m_strRemoteDisplayPort;
    108     KAuthType m_remoteDisplayAuthType;
    109     ulong m_uRemoteDisplayTimeout;
    110     bool m_fRemoteDisplayMultiConnAllowed;
    111 
    112     /* Variables: Video Capture stuff: */
    113     bool m_fVideoCaptureEnabled;
    114     QString m_strVideoCaptureFolder;
    115     QString m_strVideoCaptureFilePath;
    116     int m_iVideoCaptureFrameWidth;
    117     int m_iVideoCaptureFrameHeight;
    118     int m_iVideoCaptureFrameRate;
    119     int m_iVideoCaptureBitRate;
    120     QVector<BOOL> m_screens;
    121 
    122     /* Variables: Machine Window stuff: */
     55    /* Variables: */
    12356    double m_dScaleFactor;
    12457#ifdef Q_WS_MAC
     
    12861    bool m_fMiniToolBarAtTop;
    12962};
    130 typedef UISettingsCache<UIDataSettingsMachineDisplay> UICacheSettingsMachineDisplay;
     63typedef UISettingsCache<UIDataSettingsMachineInterface> UICacheSettingsMachineInterface;
    13164
    132 /* Machine settings / Display page: */
    133 class UIMachineSettingsDisplay : public UISettingsPageMachine,
    134                                  public Ui::UIMachineSettingsDisplay
     65/* Machine settings / Interface page: */
     66class UIMachineSettingsInterface : public UISettingsPageMachine,
     67                                   public Ui::UIMachineSettingsInterface
    13568{
    13669    Q_OBJECT;
     
    13871public:
    13972
    140     /** Constructor. */
    141     UIMachineSettingsDisplay();
     73    /** Constructor, early takes @a strMachineID into account for size-hint calculation. */
     74    UIMachineSettingsInterface(const QString strMachineID);
    14275    /** Destructor. */
    143     ~UIMachineSettingsDisplay();
    144 
    145     /* API: Correlation stuff: */
    146     void setGuestOSType(CGuestOSType guestOSType);
    147 #ifdef VBOX_WITH_VIDEOHWACCEL
    148     bool isAcceleration2DVideoSelected() const;
    149 #endif /* VBOX_WITH_VIDEOHWACCEL */
     76    ~UIMachineSettingsInterface();
    15077
    15178protected:
     
    16895    void saveFromCacheTo(QVariant &data);
    16996
    170     /* API: Validation stuff: */
    171     bool validate(QList<UIValidationMessage> &messages);
    172 
    17397    /* Helper: Navigation stuff: */
    17498    void setOrderAfter(QWidget *pWidget);
     
    182106private slots:
    183107
    184     /* Handlers: Video stuff: */
    185     void sltHandleVideoMemorySizeSliderChange();
    186     void sltHandleVideoMemorySizeEditorChange();
    187     void sltHandleVideoScreenCountSliderChange();
    188     void sltHandleVideoScreenCountEditorChange();
    189 
    190     /* Handlers: Video Capture stuff: */
    191     void sltHandleVideoCaptureCheckboxToggle();
    192     void sltHandleVideoCaptureFrameSizeComboboxChange();
    193     void sltHandleVideoCaptureFrameWidthEditorChange();
    194     void sltHandleVideoCaptureFrameHeightEditorChange();
    195     void sltHandleVideoCaptureFrameRateSliderChange();
    196     void sltHandleVideoCaptureFrameRateEditorChange();
    197     void sltHandleVideoCaptureQualitySliderChange();
    198     void sltHandleVideoCaptureBitRateEditorChange();
    199 
    200108    /* Handlers: Guest-screen scale-factor stuff: */
    201109    void sltHandleGuestScreenScaleSliderChange();
     
    206114    /** Prepare routine. */
    207115    void prepare();
    208     /** Prepare routine: Video tab. */
    209     void prepareVideoTab();
    210     /** Prepare routine: Remote Display tab. */
    211     void prepareRemoteDisplayTab();
    212     /** Prepare routine: Video Capture tab. */
    213     void prepareVideoCaptureTab();
    214     /** Prepare routine: Machine Window tab. */
    215     void prepareMachineWindowTab();
    216     /** Prepare routine: Validation. */
    217     void prepareValidation();
    218116
    219     /** Cleanup routine: Machine Window tab. */
    220     void cleanupMachineWindowTab();
    221117    /** Cleanup routine. */
    222118    void cleanup();
    223119
    224     /* Helpers: Video stuff: */
    225     void checkVRAMRequirements();
    226     bool shouldWeWarnAboutLowVideoMemory();
    227     static int calcPageStep(int iMax);
     120    /* Cache: */
     121    UICacheSettingsMachineInterface m_cache;
    228122
    229     /* Helpers: Video Capture stuff: */
    230     void lookForCorrespondingSizePreset();
    231     void updateVideoCaptureScreenCount();
    232     void updateVideoCaptureSizeHint();
    233     static void lookForCorrespondingPreset(QComboBox *pWhere, const QVariant &whichData);
    234     static int calculateBitRate(int iFrameWidth, int iFrameHeight, int iFrameRate, int iQuality);
    235     static int calculateQuality(int iFrameWidth, int iFrameHeight, int iFrameRate, int iBitRate);
    236 
    237     /* Guest OS type id: */
    238     CGuestOSType m_guestOSType;
    239     /* System minimum lower limit of VRAM (MiB). */
    240     int m_iMinVRAM;
    241     /* System maximum limit of VRAM (MiB). */
    242     int m_iMaxVRAM;
    243     /* Upper limit of VRAM in MiB for this dialog. This value is lower than
    244      * m_maxVRAM to save careless users from setting useless big values. */
    245     int m_iMaxVRAMVisible;
    246     /* Initial VRAM value when the dialog is opened. */
    247     int m_iInitialVRAM;
    248 #ifdef VBOX_WITH_VIDEOHWACCEL
    249     /* Specifies whether the guest OS supports 2D video-acceleration: */
    250     bool m_f2DVideoAccelerationSupported;
    251 #endif /* VBOX_WITH_VIDEOHWACCEL */
    252 #ifdef VBOX_WITH_CRHGSMI
    253     /* Specifies whether the guest OS supports WDDM: */
    254     bool m_fWddmModeSupported;
    255 #endif /* VBOX_WITH_CRHGSMI */
    256 
    257     /* Cache: */
    258     UICacheSettingsMachineDisplay m_cache;
    259 
     123    /** Holds the machine ID copy. */
     124    const QString m_strMachineID;
    260125    /** Holds the action-pool instance. */
    261126    UIActionPool *m_pActionPool;
    262127};
    263128
    264 #endif // __UIMachineSettingsDisplay_h__
    265 
     129#endif // ___UIMachineSettingsInterface_h___
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsInterface.ui

    r54194 r54199  
    33 VBox frontends: Qt4 GUI ("VirtualBox"):
    44
    5  Copyright (C) 2008-2014 Oracle Corporation
     5 Copyright (C) 2008-2015 Oracle Corporation
    66
    77 This file is part of VirtualBox Open Source Edition (OSE), as
     
    1313 hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
    1414 </comment>
    15  <class>UIMachineSettingsDisplay</class>
    16  <widget class="QWidget" name="UIMachineSettingsDisplay">
     15 <class>UIMachineSettingsInterface</class>
     16 <widget class="QWidget" name="UIMachineSettingsInterface">
    1717  <property name="geometry">
    1818   <rect>
     
    2323   </rect>
    2424  </property>
    25   <layout class="QVBoxLayout" name="m_pLayoutMain">
    26    <item>
    27     <widget class="QITabWidget" name="m_pTabWidget">
    28      <widget class="QWidget" name="m_pTabVideo">
    29       <attribute name="title">
    30        <string>&amp;Video</string>
    31       </attribute>
    32       <layout class="QVBoxLayout" name="m_pLayoutTabVideo">
    33        <item>
    34         <widget class="QWidget" name="m_pContainerVideo">
    35          <layout class="QGridLayout" name="m_pLayoutContainerVideo">
    36           <item row="0" column="0">
    37            <widget class="QLabel" name="m_pLabelVideoMemorySize">
    38             <property name="text">
    39              <string>Video &amp;Memory:</string>
    40             </property>
    41             <property name="alignment">
    42              <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
    43             </property>
    44             <property name="buddy">
    45              <cstring>m_pEditorVideoMemorySize</cstring>
    46             </property>
    47            </widget>
    48           </item>
    49           <item row="0" column="1" rowspan="2">
    50            <layout class="QGridLayout" name="m_pLayoutVideoMemorySizeSlider">
    51             <property name="spacing">
    52              <number>0</number>
    53             </property>
    54             <item row="0" column="0" colspan="3">
    55              <widget class="QIAdvancedSlider" name="m_pSliderVideoMemorySize">
    56               <property name="whatsThis">
    57                <string>Controls the amount of video memory provided to the virtual machine.</string>
    58               </property>
    59               <property name="orientation">
    60                <enum>Qt::Horizontal</enum>
    61               </property>
    62              </widget>
    63             </item>
    64             <item row="1" column="0">
    65              <widget class="QLabel" name="m_pLabelVideoMemorySizeMin"/>
    66             </item>
    67             <item row="1" column="1">
    68              <spacer name="m_pSpacerVideoMemorySize">
    69               <property name="orientation">
    70                <enum>Qt::Horizontal</enum>
    71               </property>
    72               <property name="sizeHint" stdset="0">
    73                <size>
    74                 <width>0</width>
    75                 <height>0</height>
    76                </size>
    77               </property>
    78              </spacer>
    79             </item>
    80             <item row="1" column="2">
    81              <widget class="QLabel" name="m_pLabelVideoMemorySizeMax"/>
    82             </item>
    83            </layout>
    84           </item>
    85           <item row="0" column="2">
    86            <widget class="QSpinBox" name="m_pEditorVideoMemorySize">
    87             <property name="whatsThis">
    88              <string>Controls the amount of video memory provided to the virtual machine.</string>
    89             </property>
    90            </widget>
    91           </item>
    92           <item row="0" column="3">
    93            <widget class="QLabel" name="m_pLabelVideoMemoryUnit">
    94             <property name="text">
    95              <string>MB</string>
    96             </property>
    97            </widget>
    98           </item>
    99           <item row="2" column="0">
    100            <widget class="QLabel" name="m_pLabelVideoScreenCount">
    101             <property name="text">
    102              <string>Mo&amp;nitor Count:</string>
    103             </property>
    104             <property name="alignment">
    105              <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
    106             </property>
    107             <property name="buddy">
    108              <cstring>m_pEditorVideoScreenCount</cstring>
    109             </property>
    110            </widget>
    111           </item>
    112           <item row="2" column="1" rowspan="2">
    113            <layout class="QGridLayout" name="m_pLayoutVideoScreenCount">
    114             <property name="spacing">
    115              <number>0</number>
    116             </property>
    117             <item row="0" column="0" colspan="3">
    118              <widget class="QIAdvancedSlider" name="m_pSliderVideoScreenCount">
    119               <property name="whatsThis">
    120                <string>Controls the amount of virtual monitors provided to the virtual machine.</string>
    121               </property>
    122               <property name="orientation">
    123                <enum>Qt::Horizontal</enum>
    124               </property>
    125              </widget>
    126             </item>
    127             <item row="1" column="0">
    128              <widget class="QLabel" name="m_pLabelVideoScreenCountMin"/>
    129             </item>
    130             <item row="1" column="1">
    131              <spacer name="m_pSpacerVideoScreenCount">
    132               <property name="orientation">
    133                <enum>Qt::Horizontal</enum>
    134               </property>
    135               <property name="sizeHint" stdset="0">
    136                <size>
    137                 <width>0</width>
    138                 <height>0</height>
    139                </size>
    140               </property>
    141              </spacer>
    142             </item>
    143             <item row="1" column="2">
    144              <widget class="QLabel" name="m_pLabelVideoScreenCountMax"/>
    145             </item>
    146            </layout>
    147           </item>
    148           <item row="2" column="2">
    149            <widget class="QSpinBox" name="m_pEditorVideoScreenCount">
    150             <property name="whatsThis">
    151              <string>Controls the amount of virtual monitors provided to the virtual machine.</string>
    152             </property>
    153            </widget>
    154           </item>
    155           <item row="4" column="0">
    156            <widget class="QLabel" name="m_pLabelVideoOptions">
    157             <property name="text">
    158              <string>Extended Features:</string>
    159             </property>
    160             <property name="alignment">
    161              <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
    162             </property>
    163            </widget>
    164           </item>
    165           <item row="4" column="1" colspan="2">
    166            <widget class="QCheckBox" name="m_pCheckbox3D">
    167             <property name="sizePolicy">
    168              <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
    169               <horstretch>0</horstretch>
    170               <verstretch>0</verstretch>
    171              </sizepolicy>
    172             </property>
    173             <property name="whatsThis">
    174              <string>When checked, the virtual machine will be given access to the 3D graphics capabilities available on the host.</string>
    175             </property>
    176             <property name="text">
    177              <string>Enable &amp;3D Acceleration</string>
    178             </property>
    179            </widget>
    180           </item>
    181           <item row="5" column="1" colspan="2">
    182            <widget class="QCheckBox" name="m_pCheckbox2DVideo">
    183             <property name="sizePolicy">
    184              <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
    185               <horstretch>0</horstretch>
    186               <verstretch>0</verstretch>
    187              </sizepolicy>
    188             </property>
    189             <property name="whatsThis">
    190              <string>When checked, the virtual machine will be given access to the Video Acceleration capabilities available on the host.</string>
    191             </property>
    192             <property name="text">
    193              <string>Enable &amp;2D Video Acceleration</string>
    194             </property>
    195            </widget>
    196           </item>
    197          </layout>
    198         </widget>
    199        </item>
    200        <item>
    201         <spacer name="m_pStretchVideo">
    202          <property name="orientation">
    203           <enum>Qt::Vertical</enum>
    204          </property>
    205          <property name="sizeHint" stdset="0">
    206           <size>
    207            <width>0</width>
    208            <height>0</height>
    209           </size>
    210          </property>
    211         </spacer>
    212        </item>
    213       </layout>
    214      </widget>
    215      <widget class="QWidget" name="m_pTabRemoteDisplay">
    216       <attribute name="title">
    217        <string>&amp;Remote Display</string>
    218       </attribute>
    219       <layout class="QVBoxLayout" name="m_pLayoutTabRemoteDisplay">
    220        <item>
    221         <widget class="QWidget" name="m_pContainerRemoteDisplay">
    222          <layout class="QGridLayout" name="m_pLayoutContainerRemoteDisplay">
    223           <item row="0" column="0" colspan="2">
    224            <widget class="QCheckBox" name="m_pCheckboxRemoteDisplay">
    225             <property name="whatsThis">
    226              <string>When checked, the VM will act as a Remote Desktop Protocol (RDP) server, allowing remote clients to connect and operate the VM (when it is running) using a standard RDP client.</string>
    227             </property>
    228             <property name="text">
    229              <string>&amp;Enable Server</string>
    230             </property>
    231             <property name="checked">
    232              <bool>false</bool>
    233             </property>
    234            </widget>
    235           </item>
    236           <item row="1" column="0">
    237            <spacer name="m_pSpacerContainerRemoteDisplay">
    238             <property name="orientation">
    239              <enum>Qt::Horizontal</enum>
    240             </property>
    241             <property name="sizeType">
    242              <enum>QSizePolicy::Fixed</enum>
    243             </property>
    244             <property name="sizeHint" stdset="0">
    245              <size>
    246               <width>20</width>
    247               <height>0</height>
    248              </size>
    249             </property>
    250            </spacer>
    251           </item>
    252           <item row="1" column="1">
    253            <widget class="QWidget" name="m_pContainerRemoteDisplayOptions">
    254             <layout class="QGridLayout" name="m_pLayoutContainerRemoteDisplayServer">
    255              <item row="0" column="0">
    256               <widget class="QLabel" name="m_pLabelRemoteDisplayPort">
    257                <property name="text">
    258                 <string>Server &amp;Port:</string>
    259                </property>
    260                <property name="alignment">
    261                 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
    262                </property>
    263                <property name="buddy">
    264                 <cstring>m_pEditorRemoteDisplayPort</cstring>
    265                </property>
    266               </widget>
    267              </item>
    268              <item row="0" column="1">
    269               <widget class="QLineEdit" name="m_pEditorRemoteDisplayPort">
    270                <property name="whatsThis">
    271                 <string>The VRDP Server port number. You may specify &lt;tt&gt;0&lt;/tt&gt; (zero), to select port 3389, the standard port for RDP.</string>
    272                </property>
    273               </widget>
    274              </item>
    275              <item row="1" column="0">
    276               <widget class="QLabel" name="m_pLabelRemoteDisplayAuthMethod">
    277                <property name="text">
    278                 <string>Authentication &amp;Method:</string>
    279                </property>
    280                <property name="alignment">
    281                 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
    282                </property>
    283                <property name="buddy">
    284                 <cstring>m_pComboRemoteDisplayAuthMethod</cstring>
    285                </property>
    286               </widget>
    287              </item>
    288              <item row="1" column="1">
    289               <widget class="QComboBox" name="m_pComboRemoteDisplayAuthMethod">
    290                <property name="whatsThis">
    291                 <string>Defines the VRDP authentication method.</string>
    292                </property>
    293               </widget>
    294              </item>
    295              <item row="2" column="0">
    296               <widget class="QLabel" name="m_pLabelRemoteDisplayTimeout">
    297                <property name="text">
    298                 <string>Authentication &amp;Timeout:</string>
    299                </property>
    300                <property name="alignment">
    301                 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
    302                </property>
    303                <property name="buddy">
    304                 <cstring>m_pEditorRemoteDisplayTimeout</cstring>
    305                </property>
    306               </widget>
    307              </item>
    308              <item row="2" column="1">
    309               <widget class="QLineEdit" name="m_pEditorRemoteDisplayTimeout">
    310                <property name="whatsThis">
    311                 <string>Specifies the timeout for guest authentication, in milliseconds.</string>
    312                </property>
    313               </widget>
    314              </item>
    315              <item row="3" column="0">
    316               <widget class="QLabel" name="m_pLabelRemoteDisplayOptions">
    317                <property name="text">
    318                 <string>Extended Features:</string>
    319                </property>
    320                <property name="alignment">
    321                 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
    322                </property>
    323               </widget>
    324              </item>
    325              <item row="3" column="1">
    326               <widget class="QCheckBox" name="m_pCheckboxMultipleConn">
    327                <property name="sizePolicy">
    328                 <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
    329                  <horstretch>0</horstretch>
    330                  <verstretch>0</verstretch>
    331                 </sizepolicy>
    332                </property>
    333                <property name="whatsThis">
    334                 <string>Specifies whether multiple simultaneous connections to the VM are permitted.</string>
    335                </property>
    336                <property name="text">
    337                 <string>&amp;Allow Multiple Connections</string>
    338                </property>
    339               </widget>
    340              </item>
    341             </layout>
    342            </widget>
    343           </item>
    344          </layout>
    345         </widget>
    346        </item>
    347        <item>
    348         <spacer name="m_pStretchRemoteDisplay">
    349          <property name="orientation">
    350           <enum>Qt::Vertical</enum>
    351          </property>
    352          <property name="sizeHint" stdset="0">
    353           <size>
    354            <width>0</width>
    355            <height>0</height>
    356           </size>
    357          </property>
    358         </spacer>
    359        </item>
    360       </layout>
    361      </widget>
    362      <widget class="QWidget" name="m_pTabVideoCapture">
    363       <attribute name="title">
    364        <string>Video &amp;Capture</string>
    365       </attribute>
    366       <layout class="QVBoxLayout" name="m_pLayoutTabVideoCapture">
    367        <item>
    368         <widget class="QWidget" name="m_pContainerVideoCapture">
    369          <layout class="QGridLayout" name="m_pLayoutContainerVideoCapture">
    370           <item row="0" column="0" colspan="2">
    371            <widget class="QCheckBox" name="m_pCheckboxVideoCapture">
    372             <property name="checked">
    373              <bool>false</bool>
    374             </property>
    375             <property name="whatsThis">
    376              <string>When checked, VirtualBox will record the virtual machine session as a video file.</string>
    377             </property>
    378             <property name="text">
    379              <string>&amp;Enable Video Capture</string>
    380             </property>
    381            </widget>
    382           </item>
    383           <item row="1" column="0">
    384            <spacer name="m_pLeftSpacer">
    385             <property name="orientation">
    386              <enum>Qt::Horizontal</enum>
    387             </property>
    388             <property name="sizeHint" stdset="0">
    389              <size>
    390               <width>20</width>
    391               <height>0</height>
    392              </size>
    393             </property>
    394            </spacer>
    395           </item>
    396           <item row="1" column="1">
    397            <widget class="QWidget" name="m_pContainerVideoCaptureOptions">
    398             <property name="sizePolicy">
    399              <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
    400               <horstretch>1</horstretch>
    401               <verstretch>0</verstretch>
    402              </sizepolicy>
    403             </property>
    404             <layout class="QGridLayout" name="m_pContainerLayoutVideoCapture">
    405              <item row="0" column="0">
    406               <widget class="QLabel" name="m_pLabelVideoCapturePath">
    407                <property name="text">
    408                 <string>File &amp;Path:</string>
    409                </property>
    410                <property name="alignment">
    411                 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
    412                </property>
    413                <property name="buddy">
    414                 <cstring>m_pEditorVideoCapturePath</cstring>
    415                </property>
    416               </widget>
    417              </item>
    418              <item row="0" column="1" colspan="3">
    419               <widget class="VBoxFilePathSelectorWidget" name="m_pEditorVideoCapturePath">
    420                <property name="whatsThis">
    421                 <string>This setting determines the filename VirtualBox uses to save the recorded content.</string>
    422                </property>
    423               </widget>
    424              </item>
    425              <item row="1" column="0">
    426               <widget class="QLabel" name="m_pLabelVideoCaptureSize">
    427                <property name="text">
    428                 <string>Frame &amp;Size:</string>
    429                </property>
    430                <property name="alignment">
    431                 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
    432                </property>
    433                <property name="buddy">
    434                 <cstring>m_pComboVideoCaptureSize</cstring>
    435                </property>
    436               </widget>
    437              </item>
    438              <item row="1" column="1">
    439               <widget class="QComboBox" name="m_pComboVideoCaptureSize">
    440                <property name="sizePolicy">
    441                 <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
    442                  <horstretch>1</horstretch>
    443                  <verstretch>0</verstretch>
    444                 </sizepolicy>
    445                </property>
    446                <property name="whatsThis">
    447                 <string>This setting determines the resolution (frame size) of the recorded video.</string>
    448                </property>
    449               </widget>
    450              </item>
    451              <item row="1" column="2">
    452               <widget class="QSpinBox" name="m_pEditorVideoCaptureWidth">
    453                <property name="whatsThis">
    454                 <string>This setting determines the &lt;b>horizontal&lt;/b> resolution (frame width) of the recorded video.</string>
    455                </property>
    456               </widget>
    457              </item>
    458              <item row="1" column="3">
    459               <widget class="QSpinBox" name="m_pEditorVideoCaptureHeight">
    460                <property name="whatsThis">
    461                 <string>This setting determines the &lt;b>vertical&lt;/b> resolution (frame height) of the recorded video.</string>
    462                </property>
    463               </widget>
    464              </item>
    465              <item row="2" column="0">
    466               <widget class="QLabel" name="m_pLabelVideoCaptureFrameRate">
    467                <property name="text">
    468                 <string>&amp;Frame Rate:</string>
    469                </property>
    470                <property name="alignment">
    471                 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
    472                </property>
    473                <property name="buddy">
    474                 <cstring>m_pSliderVideoCaptureFrameRate</cstring>
    475                </property>
    476               </widget>
    477              </item>
    478              <item row="2" column="1" rowspan="2">
    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>. Additional frames will be skipped. Reducing this value will increase the number of skipped frames and reduce 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>
    515              </item>
    516              <item row="2" column="2">
    517               <widget class="QSpinBox" name="m_pEditorVideoCaptureFrameRate">
    518                <property name="whatsThis">
    519                 <string>This setting determines the maximum number of &lt;b>frames per second&lt;/b>. Additional frames will be skipped. Reducing this value will increase the number of skipped frames and reduce the file size.</string>
    520                </property>
    521               </widget>
    522              </item>
    523              <item row="2" column="3">
    524               <widget class="QLabel" name="m_pLabelVideoCaptureFrameRateUnits"/>
    525              </item>
    526              <item row="4" column="0">
    527               <widget class="QLabel" name="m_pLabelVideoCaptureRate">
    528                <property name="text">
    529                 <string>&amp;Quality:</string>
    530                </property>
    531                <property name="alignment">
    532                 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
    533                </property>
    534                <property name="buddy">
    535                 <cstring>m_pSliderVideoCaptureQuality</cstring>
    536                </property>
    537               </widget>
    538              </item>
    539              <item row="4" column="1" rowspan="2">
    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 will make the video look better at 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>
    592              </item>
    593              <item row="4" column="2">
    594               <widget class="QSpinBox" name="m_pEditorVideoCaptureBitRate">
    595                <property name="whatsThis">
    596                 <string>This setting determines the bitrate in &lt;b>kilobits per second&lt;/b>. Increasing this value will make the video look better at the cost of an increased file size.</string>
    597                </property>
    598               </widget>
    599              </item>
    600              <item row="4" column="3">
    601               <widget class="QLabel" name="m_pLabelVideoCaptureBitRateUnits"/>
    602              </item>
    603              <item row="6" column="1">
    604               <widget class="QLabel" name="m_pLabelVideoCaptureSizeHint"/>
    605              </item>
    606              <item row="7" column="0">
    607               <widget class="QLabel" name="m_pLabelVideoCaptureScreens">
    608                <property name="text">
    609                 <string>&amp;Screens:</string>
    610                </property>
    611                <property name="alignment">
    612                 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignTop</set>
    613                </property>
    614                <property name="buddy">
    615                 <cstring>m_pScrollerVideoCaptureScreens</cstring>
    616                </property>
    617               </widget>
    618              </item>
    619              <item row="7" column="1" colspan="3">
    620               <widget class="UIFilmContainer" name="m_pScrollerVideoCaptureScreens">
    621                <property name="whatsThis">
    622                 <string></string>
    623                </property>
    624               </widget>
    625              </item>
    626             </layout>
    627            </widget>
    628           </item>
    629          </layout>
    630         </widget>
    631        </item>
    632        <item>
    633         <spacer name="m_pStretchVideoCapture">
    634          <property name="orientation">
    635           <enum>Qt::Vertical</enum>
    636          </property>
    637          <property name="sizeHint" stdset="0">
    638           <size>
    639            <width>0</width>
    640            <height>0</height>
    641           </size>
    642          </property>
    643         </spacer>
    644        </item>
    645       </layout>
    646      </widget>
    647      <widget class="QWidget" name="m_pTabMachineWindow">
    648       <attribute name="title">
    649        <string>Machine &amp;Window</string>
    650       </attribute>
    651       <layout class="QGridLayout" name="m_pLayoutTabMachineWindow">
    652        <item row="0" column="0" colspan="3">
    653         <widget class="UIMenuBarEditorWidget" name="m_pMenuBarEditor">
    654          <property name="whatsThis">
    655           <string>Allows to modify VM menu-bar contents.</string>
    656          </property>
    657         </widget>
    658        </item>
    659        <item row="1" column="0">
    660         <widget class="QLabel" name="m_pLabelGuestScreenScale">
    661          <property name="text">
    662           <string>Screen Scale Factor:</string>
    663          </property>
    664          <property name="alignment">
    665           <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
    666          </property>
    667         </widget>
    668        </item>
    669        <item row="1" column="1" rowspan="2">
    670         <layout class="QGridLayout" name="m_pLayoutGuestScreenScaleSlider">
    671          <property name="spacing">
    672           <number>0</number>
    673          </property>
    674          <item row="0" column="0" colspan="3">
    675           <widget class="QIAdvancedSlider" name="m_pSliderGuestScreenScale">
    676            <property name="whatsThis">
    677             <string>This setting determines the guest screen scale factor.</string>
    678            </property>
    679            <property name="orientation">
    680             <enum>Qt::Horizontal</enum>
    681            </property>
    682           </widget>
    683          </item>
    684          <item row="1" column="0">
    685           <widget class="QLabel" name="m_pLabelGuestScreenScaleMin">
    686            <property name="text">
    687             <string>100%</string>
    688            </property>
    689           </widget>
    690          </item>
    691          <item row="1" column="1">
    692           <spacer name="m_pSpacerGuestScreenScale">
    693            <property name="orientation">
    694             <enum>Qt::Horizontal</enum>
    695            </property>
    696            <property name="sizeHint" stdset="0">
    697             <size>
    698              <width>0</width>
    699              <height>0</height>
    700             </size>
    701            </property>
    702           </spacer>
    703          </item>
    704          <item row="1" column="2">
    705           <widget class="QLabel" name="m_pLabelGuestScreenScaleMax">
    706            <property name="text">
    707             <string>200%</string>
    708            </property>
    709           </widget>
    710          </item>
    711         </layout>
    712        </item>
    713        <item row="1" column="2">
    714         <widget class="QSpinBox" name="m_pEditorGuestScreenScale">
    715          <property name="whatsThis">
    716           <string>This setting determines the guest screen scale factor.</string>
    717          </property>
    718          <property name="suffix">
    719           <string>%</string>
    720          </property>
    721         </widget>
    722        </item>
    723        <item row="3" column="0">
    724         <widget class="QLabel" name="m_pLabelHiDPI">
    725          <property name="text">
    726           <string>HiDPI:</string>
    727          </property>
    728          <property name="alignment">
    729           <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
    730          </property>
    731         </widget>
    732        </item>
    733        <item row="3" column="1" colspan="2">
    734         <widget class="QCheckBox" name="m_pCheckBoxUnscaledHiDPIOutput">
    735          <property name="sizePolicy">
    736           <sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding">
    737            <horstretch>0</horstretch>
    738            <verstretch>0</verstretch>
    739           </sizepolicy>
    740          </property>
    741          <property name="whatsThis">
    742           <string>If checked, guest screen contents will not be scaled up to compensate for high host screen resolutions.</string>
    743          </property>
    744          <property name="text">
    745           <string>Use &amp;Unscaled HiDPI Output</string>
    746          </property>
    747         </widget>
    748        </item>
    749        <item row="4" column="0">
    750         <widget class="QLabel" name="m_pLabelMiniToolBar">
    751          <property name="text">
    752           <string>Mini ToolBar:</string>
    753          </property>
    754          <property name="alignment">
    755           <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
    756          </property>
    757         </widget>
    758        </item>
    759        <item row="4" column="1" colspan="2">
    760         <widget class="QCheckBox" name="m_pCheckBoxShowMiniToolBar">
    761          <property name="sizePolicy">
    762           <sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding">
    763            <horstretch>0</horstretch>
    764            <verstretch>0</verstretch>
    765           </sizepolicy>
    766          </property>
    767          <property name="whatsThis">
    768           <string>If checked, show the Mini ToolBar in Fullscreen and Seamless modes.</string>
    769          </property>
    770          <property name="text">
    771           <string>Show in &amp;Fullscreen/Seamless</string>
    772          </property>
    773          <property name="checked">
    774           <bool>true</bool>
    775          </property>
    776         </widget>
    777        </item>
    778        <item row="5" column="1" colspan="2">
    779         <widget class="QCheckBox" name="m_pComboToolBarAlignment">
    780          <property name="sizePolicy">
    781           <sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding">
    782            <horstretch>0</horstretch>
    783            <verstretch>0</verstretch>
    784           </sizepolicy>
    785          </property>
    786          <property name="whatsThis">
    787           <string>If checked, show the Mini ToolBar at the top of the screen, rather than in its default position at the bottom of the screen.</string>
    788          </property>
    789          <property name="text">
    790           <string>Show at &amp;Top of Screen</string>
    791          </property>
    792          <property name="checked">
    793           <bool>false</bool>
    794          </property>
    795         </widget>
    796        </item>
    797        <item row="6" column="0" colspan="3">
    798         <spacer name="m_pSpacer">
    799          <property name="orientation">
    800           <enum>Qt::Vertical</enum>
    801          </property>
    802          <property name="sizeHint" stdset="0">
    803           <size>
    804            <width>0</width>
    805            <height>0</height>
    806           </size>
    807          </property>
    808         </spacer>
    809        </item>
    810        <item row="7" column="0" colspan="3">
    811         <widget class="UIStatusBarEditorWidget" name="m_pStatusBarEditor">
    812          <property name="whatsThis">
    813           <string>Allows to modify VM status-bar contents.</string>
    814          </property>
    815         </widget>
    816        </item>
    817       </layout>
    818      </widget>
     25  <layout class="QGridLayout" name="m_pLayoutMain">
     26   <item row="0" column="0" colspan="3">
     27    <widget class="UIMenuBarEditorWidget" name="m_pMenuBarEditor">
     28     <property name="whatsThis">
     29      <string>Allows to modify VM menu-bar contents.</string>
     30     </property>
     31    </widget>
     32   </item>
     33   <item row="1" column="0">
     34    <widget class="QLabel" name="m_pLabelGuestScreenScale">
     35     <property name="text">
     36      <string>Screen Scale Factor:</string>
     37     </property>
     38     <property name="alignment">
     39      <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
     40     </property>
     41    </widget>
     42   </item>
     43   <item row="1" column="1" rowspan="2">
     44    <layout class="QGridLayout" name="m_pLayoutGuestScreenScaleSlider">
     45     <property name="spacing">
     46      <number>0</number>
     47     </property>
     48     <item row="0" column="0" colspan="3">
     49      <widget class="QIAdvancedSlider" name="m_pSliderGuestScreenScale">
     50       <property name="whatsThis">
     51        <string>This setting determines the guest screen scale factor.</string>
     52       </property>
     53       <property name="orientation">
     54        <enum>Qt::Horizontal</enum>
     55       </property>
     56      </widget>
     57     </item>
     58     <item row="1" column="0">
     59      <widget class="QLabel" name="m_pLabelGuestScreenScaleMin">
     60       <property name="text">
     61        <string>100%</string>
     62       </property>
     63      </widget>
     64     </item>
     65     <item row="1" column="1">
     66      <spacer name="m_pSpacerGuestScreenScale">
     67       <property name="orientation">
     68        <enum>Qt::Horizontal</enum>
     69       </property>
     70       <property name="sizeHint" stdset="0">
     71        <size>
     72         <width>0</width>
     73         <height>0</height>
     74        </size>
     75       </property>
     76      </spacer>
     77     </item>
     78     <item row="1" column="2">
     79      <widget class="QLabel" name="m_pLabelGuestScreenScaleMax">
     80       <property name="text">
     81        <string>200%</string>
     82       </property>
     83      </widget>
     84     </item>
     85    </layout>
     86   </item>
     87   <item row="1" column="2">
     88    <widget class="QSpinBox" name="m_pEditorGuestScreenScale">
     89     <property name="whatsThis">
     90      <string>This setting determines the guest screen scale factor.</string>
     91     </property>
     92     <property name="suffix">
     93      <string>%</string>
     94     </property>
     95    </widget>
     96   </item>
     97   <item row="3" column="0">
     98    <widget class="QLabel" name="m_pLabelHiDPI">
     99     <property name="text">
     100      <string>HiDPI:</string>
     101     </property>
     102     <property name="alignment">
     103      <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
     104     </property>
     105    </widget>
     106   </item>
     107   <item row="3" column="1" colspan="2">
     108    <widget class="QCheckBox" name="m_pCheckBoxUnscaledHiDPIOutput">
     109     <property name="sizePolicy">
     110      <sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding">
     111       <horstretch>0</horstretch>
     112       <verstretch>0</verstretch>
     113      </sizepolicy>
     114     </property>
     115     <property name="whatsThis">
     116      <string>If checked, guest screen contents will not be scaled up to compensate for high host screen resolutions.</string>
     117     </property>
     118     <property name="text">
     119      <string>Use &amp;Unscaled HiDPI Output</string>
     120     </property>
     121    </widget>
     122   </item>
     123   <item row="4" column="0">
     124    <widget class="QLabel" name="m_pLabelMiniToolBar">
     125     <property name="text">
     126      <string>Mini ToolBar:</string>
     127     </property>
     128     <property name="alignment">
     129      <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
     130     </property>
     131    </widget>
     132   </item>
     133   <item row="4" column="1" colspan="2">
     134    <widget class="QCheckBox" name="m_pCheckBoxShowMiniToolBar">
     135     <property name="sizePolicy">
     136      <sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding">
     137       <horstretch>0</horstretch>
     138       <verstretch>0</verstretch>
     139      </sizepolicy>
     140     </property>
     141     <property name="whatsThis">
     142      <string>If checked, show the Mini ToolBar in Fullscreen and Seamless modes.</string>
     143     </property>
     144     <property name="text">
     145      <string>Show in &amp;Fullscreen/Seamless</string>
     146     </property>
     147     <property name="checked">
     148      <bool>true</bool>
     149     </property>
     150    </widget>
     151   </item>
     152   <item row="5" column="1" colspan="2">
     153    <widget class="QCheckBox" name="m_pComboToolBarAlignment">
     154     <property name="sizePolicy">
     155      <sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding">
     156       <horstretch>0</horstretch>
     157       <verstretch>0</verstretch>
     158      </sizepolicy>
     159     </property>
     160     <property name="whatsThis">
     161      <string>If checked, show the Mini ToolBar at the top of the screen, rather than in its default position at the bottom of the screen.</string>
     162     </property>
     163     <property name="text">
     164      <string>Show at &amp;Top of Screen</string>
     165     </property>
     166     <property name="checked">
     167      <bool>false</bool>
     168     </property>
     169    </widget>
     170   </item>
     171   <item row="6" column="0" colspan="3">
     172    <spacer name="m_pSpacer">
     173     <property name="orientation">
     174      <enum>Qt::Vertical</enum>
     175     </property>
     176     <property name="sizeHint" stdset="0">
     177      <size>
     178       <width>0</width>
     179       <height>0</height>
     180      </size>
     181     </property>
     182    </spacer>
     183   </item>
     184   <item row="7" column="0" colspan="3">
     185    <widget class="UIStatusBarEditorWidget" name="m_pStatusBarEditor">
     186     <property name="whatsThis">
     187      <string>Allows to modify VM status-bar contents.</string>
     188     </property>
    819189    </widget>
    820190   </item>
     
    826196   <extends>QSlider</extends>
    827197   <header>QIAdvancedSlider.h</header>
    828   </customwidget>
    829   <customwidget>
    830    <class>QITabWidget</class>
    831    <extends>QTabWidget</extends>
    832    <header>QITabWidget.h</header>
    833   </customwidget>
    834   <customwidget>
    835    <class>VBoxFilePathSelectorWidget</class>
    836    <extends>QComboBox</extends>
    837    <header>VBoxFilePathSelectorWidget.h</header>
    838    <container>1</container>
    839   </customwidget>
    840   <customwidget>
    841    <class>UIFilmContainer</class>
    842    <extends>QWidget</extends>
    843    <header>UIFilmContainer.h</header>
    844198  </customwidget>
    845199  <customwidget>
     
    856210 <resources/>
    857211 <connections>
    858   <connection>
    859    <sender>m_pCheckboxRemoteDisplay</sender>
    860    <signal>toggled(bool)</signal>
    861    <receiver>m_pContainerRemoteDisplayOptions</receiver>
    862    <slot>setEnabled(bool)</slot>
    863   </connection>
    864212  <connection>
    865213   <sender>m_pCheckBoxShowMiniToolBar</sender>
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