VirtualBox

Ignore:
Timestamp:
Oct 18, 2013 10:23:05 AM (11 years ago)
Author:
vboxsync
Message:

FE/Qt: Runtime UI: Some small cleanup.

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

Legend:

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

    r48950 r49176  
    146146}
    147147
     148void UIMachineViewNormal::saveMachineViewSettings()
     149{
     150    /* Store guest size in case we are switching to fullscreen: */
     151    storeGuestSizeHint(QSize(frameBuffer()->width(), frameBuffer()->height()));
     152}
     153
     154void UIMachineViewNormal::setGuestAutoresizeEnabled(bool fEnabled)
     155{
     156    if (m_bIsGuestAutoresizeEnabled != fEnabled)
     157    {
     158        m_bIsGuestAutoresizeEnabled = fEnabled;
     159
     160        if (m_bIsGuestAutoresizeEnabled && uisession()->isGuestSupportsGraphics())
     161            sltPerformGuestResize();
     162    }
     163}
     164
     165/**
     166 * Resends guest size-hint if necessary.
     167 * If the last guest size hint was sent to switch to
     168 * fullscreen or seamless mode then send one to restore the old view size.
     169 * @note This method also does some hacks to suppress intermediary resizes
     170 *       to the old fullscreen size.
     171 */
    148172void UIMachineViewNormal::maybeResendResizeHint()
    149173{
     
    167191            sltPerformGuestResize(hint);
    168192        }
    169     }
    170 }
    171 
    172 void UIMachineViewNormal::saveMachineViewSettings()
    173 {
    174     /* Store guest size in case we are switching to fullscreen: */
    175     storeGuestSizeHint(QSize(frameBuffer()->width(), frameBuffer()->height()));
    176 }
    177 
    178 void UIMachineViewNormal::setGuestAutoresizeEnabled(bool fEnabled)
    179 {
    180     if (m_bIsGuestAutoresizeEnabled != fEnabled)
    181     {
    182         m_bIsGuestAutoresizeEnabled = fEnabled;
    183 
    184         if (m_bIsGuestAutoresizeEnabled && uisession()->isGuestSupportsGraphics())
    185             sltPerformGuestResize();
    186193    }
    187194}
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.h

    r46361 r49176  
    6060    void prepareConsoleConnections();
    6161    //void loadMachineViewSettings();
    62     /** If the last guest size hint was sent to switch to fullscreen or
    63      * seamless mode then send one to restore the old view size.
    64      * @note This method also does some hacks to suppress intermediary resizes
    65      *        to the old fullscreen size. */
    66     void maybeResendResizeHint();
    6762
    6863    /* Cleanup helpers: */
     
    7671
    7772    /* Private helpers: */
     73    void maybeResendResizeHint();
    7874    void normalizeGeometry(bool fAdjustPosition);
    7975    QRect workingArea() const;
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineViewScale.h

    r46361 r49176  
    5858
    5959    /* Prepare helpers: */
    60     // void prepareFrameBuffer();
    61     //void loadMachineViewSettings();
     60    //void loadMachineViewSettings() {}
    6261
    6362    /* Cleanup helpers: */
    6463    void saveMachineViewSettings();
    65     //void cleanupConnections() {}
    66     //void cleanupFrameBuffer() {}
    6764
    6865    /* Private helpers: */
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