void UIMachineSettingsDisplay::prepareScreenTab()
{
    /* Prepare memory-size slider: */
    CSystemProperties sys = vboxGlobal().virtualBox().GetSystemProperties();
    m_iMinVRAM = sys.GetMinGuestVRAM();
    m_iMaxVRAM = sys.GetMaxGuestVRAM();
    m_iMaxVRAMVisible = m_iMaxVRAM;
    const uint cHostScreens = QApplication::desktop()->screenCount();
    m_pSliderVideoMemorySize->setMinimum(m_iMinVRAM);
    m_pSliderVideoMemorySize->setMaximum(m_iMaxVRAMVisible);
    m_pSliderVideoMemorySize->setPageStep(calcPageStep(m_iMaxVRAMVisible));
    m_pSliderVideoMemorySize->setSingleStep(m_pSliderVideoMemorySize->pageStep() / 4);
    m_pSliderVideoMemorySize->setTickInterval(m_pSliderVideoMemorySize->pageStep());
    m_pSliderVideoMemorySize->setSnappingEnabled(true);
    m_pSliderVideoMemorySize->setErrorHint(0, 1);
    connect(m_pSliderVideoMemorySize, SIGNAL(valueChanged(int)), this, SLOT(sltHandleVideoMemorySizeSliderChange()));

    /* Prepare memory-size editor: */
    vboxGlobal().setMinimumWidthAccordingSymbolCount(m_pEditorVideoMemorySize, 4);
    m_pEditorVideoMemorySize->setMinimum(m_iMinVRAM);
    m_pEditorVideoMemorySize->setMaximum(m_iMaxVRAMVisible);
    connect(m_pEditorVideoMemorySize, SIGNAL(valueChanged(int)), this, SLOT(sltHandleVideoMemorySizeEditorChange()));

    /* Prepare screen-count slider: */
    const uint cMinGuestScreens = 1;
    const uint cMaxGuestScreens = sys.GetMaxGuestMonitors();
    const uint cMaxGuestScreensForSlider = qMin(cMaxGuestScreens, (uint)8);
    m_pSliderVideoScreenCount->setMinimum(cMinGuestScreens);
    m_pSliderVideoScreenCount->setMaximum(cMaxGuestScreensForSlider);
    m_pSliderVideoScreenCount->setPageStep(1);
    m_pSliderVideoScreenCount->setSingleStep(1);
    m_pSliderVideoScreenCount->setTickInterval(1);
    m_pSliderVideoScreenCount->setOptimalHint(cMinGuestScreens, cHostScreens);
    m_pSliderVideoScreenCount->setWarningHint(cHostScreens, cMaxGuestScreensForSlider);
    connect(m_pSliderVideoScreenCount, SIGNAL(valueChanged(int)), this, SLOT(sltHandleVideoScreenCountSliderChange()));

    /* Prepare screen-count editor: */
    vboxGlobal().setMinimumWidthAccordingSymbolCount(m_pEditorVideoScreenCount, 3);
    m_pEditorVideoScreenCount->setMinimum(1);
    m_pEditorVideoScreenCount->setMaximum(cMaxGuestScreens);
    connect(m_pEditorVideoScreenCount, SIGNAL(valueChanged(int)), this, SLOT(sltHandleVideoScreenCountEditorChange()));

    /* Prepare scale-factor slider: */
    m_pSliderGuestScreenScale->setMinimum(100);
    m_pSliderGuestScreenScale->setMaximum(200);
    m_pSliderGuestScreenScale->setPageStep(10);
    m_pSliderGuestScreenScale->setSingleStep(1);
    m_pSliderGuestScreenScale->setTickInterval(10);
    m_pSliderGuestScreenScale->setSnappingEnabled(true);
    connect(m_pSliderGuestScreenScale, SIGNAL(valueChanged(int)), this, SLOT(sltHandleGuestScreenScaleSliderChange()));

    /* Prepare scale-factor editor: */
    m_pEditorGuestScreenScale->setMinimum(100);
    m_pEditorGuestScreenScale->setMaximum(200);
    vboxGlobal().setMinimumWidthAccordingSymbolCount(m_pEditorGuestScreenScale, 5);
    connect(m_pEditorGuestScreenScale, SIGNAL(valueChanged(int)), this, SLOT(sltHandleGuestScreenScaleEditorChange()));
}
void UIMachineSettingsDisplay::prepareVideoTab()
{
    /* Prepare memory-size slider: */
    CSystemProperties sys = vboxGlobal().virtualBox().GetSystemProperties();
    m_iMinVRAM = sys.GetMinGuestVRAM();
    m_iMaxVRAM = sys.GetMaxGuestVRAM();
    m_iMaxVRAMVisible = m_iMaxVRAM;
    const uint cHostScreens = QApplication::desktop()->screenCount();
    m_pSliderVideoMemorySize->setMinimum(m_iMinVRAM);
    m_pSliderVideoMemorySize->setMaximum(m_iMaxVRAMVisible);
    m_pSliderVideoMemorySize->setPageStep(calcPageStep(m_iMaxVRAMVisible));
    m_pSliderVideoMemorySize->setSingleStep(m_pSliderVideoMemorySize->pageStep() / 4);
    m_pSliderVideoMemorySize->setTickInterval(m_pSliderVideoMemorySize->pageStep());
    m_pSliderVideoMemorySize->setSnappingEnabled(true);
    m_pSliderVideoMemorySize->setErrorHint(0, 1);
    connect(m_pSliderVideoMemorySize, SIGNAL(valueChanged(int)), this, SLOT(sltHandleVideoMemorySizeSliderChange()));

    /* Prepare memory-size editor: */
    vboxGlobal().setMinimumWidthAccordingSymbolCount(m_pEditorVideoMemorySize, 4);
    m_pEditorVideoMemorySize->setMinimum(m_iMinVRAM);
    m_pEditorVideoMemorySize->setMaximum(m_iMaxVRAMVisible);
    connect(m_pEditorVideoMemorySize, SIGNAL(valueChanged(int)), this, SLOT(sltHandleVideoMemorySizeEditorChange()));

    /* Prepare screen-count slider: */
    const uint cMinGuestScreens = 1;
    const uint cMaxGuestScreens = sys.GetMaxGuestMonitors();
    const uint cMaxGuestScreensForSlider = qMin(cMaxGuestScreens, (uint)8);
    m_pSliderVideoScreenCount->setMinimum(cMinGuestScreens);
    m_pSliderVideoScreenCount->setMaximum(cMaxGuestScreensForSlider);
    m_pSliderVideoScreenCount->setPageStep(1);
    m_pSliderVideoScreenCount->setSingleStep(1);
    m_pSliderVideoScreenCount->setTickInterval(1);
    m_pSliderVideoScreenCount->setOptimalHint(cMinGuestScreens, cHostScreens);
    m_pSliderVideoScreenCount->setWarningHint(cHostScreens, cMaxGuestScreensForSlider);
    connect(m_pSliderVideoScreenCount, SIGNAL(valueChanged(int)), this, SLOT(sltHandleVideoScreenCountSliderChange()));

    /* Prepare screen-count editor: */
    vboxGlobal().setMinimumWidthAccordingSymbolCount(m_pEditorVideoScreenCount, 3);
    m_pEditorVideoScreenCount->setMinimum(1);
    m_pEditorVideoScreenCount->setMaximum(cMaxGuestScreens);
    connect(m_pEditorVideoScreenCount, SIGNAL(valueChanged(int)), this, SLOT(sltHandleVideoScreenCountEditorChange()));

#ifndef VBOX_WITH_VIDEOHWACCEL
    /* Hide check-box if not supported: */
    m_pCheckbox2DVideo->setVisible(false);
#endif /* VBOX_WITH_VIDEOHWACCEL */
}