VirtualBox

Ignore:
Timestamp:
Feb 26, 2013 1:45:12 PM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
83967
Message:

FE/Qt: Multi-screen support: Cleanup multi-screen layout (part 2).

Location:
trunk/src/VBox/Frontends/VirtualBox/src/runtime
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMultiScreenLayout.cpp

    r44828 r44830  
    4444{
    4545    /* Calculate host/guest screen count: */
    46     CMachine machine = m_pMachineLogic->session().GetMachine();
    47     /* Get host/guest monitor count: */
    48 #if (QT_VERSION >= 0x040600)
    49     m_cHostScreens = QApplication::desktop()->screenCount();
    50 #else /* (QT_VERSION >= 0x040600) */
    51     m_cHostScreens = QApplication::desktop()->numScreens();
    52 #endif /* !(QT_VERSION >= 0x040600) */
    53     m_cGuestScreens = machine.GetMonitorCount();
     46    calculateHostMonitorCount();
     47    calculateGuestScreenCount();
    5448}
    5549
     
    275269}
    276270
     271void UIMultiScreenLayout::calculateHostMonitorCount()
     272{
     273#if (QT_VERSION >= 0x040600)
     274    m_cHostScreens = QApplication::desktop()->screenCount();
     275#else /* (QT_VERSION >= 0x040600) */
     276    m_cHostScreens = QApplication::desktop()->numScreens();
     277#endif /* !(QT_VERSION >= 0x040600) */
     278}
     279
     280void UIMultiScreenLayout::calculateGuestScreenCount()
     281{
     282    CMachine machine = m_pMachineLogic->session().GetMachine();
     283    m_cGuestScreens = machine.GetMonitorCount();
     284}
     285
    277286quint64 UIMultiScreenLayout::memoryRequirements(const QMap<int, int> *pScreenLayout) const
    278287{
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMultiScreenLayout.h

    r44828 r44830  
    6565private:
    6666
     67    /* Helpers: Prepare stuff: */
     68    void calculateHostMonitorCount();
     69    void calculateGuestScreenCount();
     70
    6771    /* Other helpers: */
    6872    quint64 memoryRequirements(const QMap<int, int> *pScreenLayout) const;
Note: See TracChangeset for help on using the changeset viewer.

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